Alexd
unread,May 22, 2013, 8:26:58 AM5/22/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-a...@googlegroups.com
Hi,
First of all thank you for this great contribution to Django, great work !
I just wanted to contribute the below code I had to write to support a type of group I use to store roles : organizationalRole
This objectclass is described in RFC 2256 and part of multiple LDAP implementation (OpenLDAP, ApacheDS ... ) so I thing it would be useful to others to find it as a built-in type of group ( config.py )
config.py :
class GroupOfRolesType(MemberDNGroupType):
"""
An LDAPGroupType subclass that handles groups of class GroupOfRoles.
"""
def __init__(self, name_attr='cn'):
super(GroupOfRolesType, self).__init__('roleOccupant', name_attr)
class NestedGroupOfRolesType(NestedMemberDNGroupType):
"""
An LDAPGroupType subclass that handles groups of class GroupOfRolesType
with nested group references.
"""
def __init__(self, name_attr='cn'):
super(NestedGroupOfRolesType, self).__init__('roleOccupant', name_attr)