New built-in group type : organizationalRole

71 views
Skip to first unread message

Alexd

unread,
May 22, 2013, 8:26:58 AM5/22/13
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)

Peter Sagerson

unread,
Jun 4, 2013, 1:54:17 PM6/4/13
to django-a...@googlegroups.com
Sorry I let this get buried for a little while. In RFC 2256 (and its successor, 4519), I don't see a groupOfRoles, but I do see organizationalRole, which includes roleOccupant. Is that what you're using?

Thanks,
Peter
> --
> You received this message because you are subscribed to the Google Groups "django-auth-ldap" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-auth-ld...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

signature.asc

Alexd

unread,
Jun 5, 2013, 4:12:59 AM6/5/13
to django-a...@googlegroups.com
Yes "organizationalRole" is the objectclass and "roleOccupant" the attribute.
I realize "groupOfRoles" is an ambiguous nickname : something like "organizationalRoleGroupType" should make more sense (see the modified code below)

Thanks,
Alex


class OrganizationalRoleGroupType(MemberDNGroupType):
    """
    An LDAPGroupType subclass that handles groups of class organizationalRole.

    """
    def __init__(self, name_attr='cn'):
        super(OrganizationalRoleGroupType, self).__init__('roleOccupant', name_attr)


class NestedOrganizationalRoleGroupType(NestedMemberDNGroupType):
    """
    An LDAPGroupType subclass that handles groups of class OrganizationalRoleGroupType

    with nested group references.
    """
    def __init__(self, name_attr='cn'):
        super(NestedOrganizationalRoleGroupType, self).__init__('roleOccupant', name_attr)

Di majo

unread,
May 12, 2024, 1:41:52 PM5/12/24
to django-auth-ldap
MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
LOAN DEAL
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
IPIP/DTC
SLBC PROVIDER
CREDIT CARD TOP UP
DUMPS/ PINS
SEPA TRANSFER
WIRE TRANSFER
BITCOIN TOP UP
GLOBALPAY INC US
SKRILL USA
UNIONPAY RECEIVER

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP
+44 7529 555638

Reply all
Reply to author
Forward
0 new messages