Logo Search packages:      
Sourcecode: zope-ldapmultiplugins version File versions  Download package

def LDAPMultiPlugins::LDAPMultiPlugin::LDAPMultiPlugin::getGroupsForPrincipal (   self,
  request = None,
  attr = None 

Fulfill GroupsPlugin requirements 

Definition at line 116 of file LDAPMultiPlugin.py.

00116                                                                   :
        """ Fulfill GroupsPlugin requirements """
        acl = self._getLDAPUserFolder()

        if acl is None:
            return ()

        unmangled_userid = self._demangle(user.getId())
        if unmangled_userid is None:
            return ()

        ldap_user = acl.getUserById(unmangled_userid)

        if ldap_user is None:
            return ()

        groups = acl.getGroups(ldap_user.getUserDN(), attr=attr)

        return tuple([x[0] for x in groups])

    def enumerateUsers( self

Generated by  Doxygen 1.6.0   Back to index