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

def LDAPMultiPlugins::LDAPPluginBase::LDAPPluginBase::getPropertiesForUser (   self,
  request = None 

Fullfill PropertiesPlugin requirements 

Definition at line 90 of file LDAPPluginBase.py.

00090                                                       :
        """ Fullfill PropertiesPlugin 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 {}

        # XXX Direct attribute access. Waaa!
        properties = copy.deepcopy(ldap_user._properties)

        # Need to clean up: The propertysheet mechanism will
        # blow up if "None" is encountered
        for key, val in properties.items():
            if val is None:
                properties[key] = ''

        return properties

    def getRolesForPrincipal(self, user, request=None):

Generated by  Doxygen 1.6.0   Back to index