Logo Search packages:      
Sourcecode: zope-cmfldap version File versions

def CMFLDAP::LDAPMemberDataTool::LDAPMemberData::setSecurityProfile (   self,
  password = None,
  roles = None,
  domains = None 
)

Set the user's basic security profile 

Definition at line 203 of file LDAPMemberDataTool.py.

00203                                                                          :
        """ Set the user's basic security profile """
        acl = self.acl_users
        u = self.getUser()
        user_dn = u.getUserDN()
        
        if password is not None:
            acl.manage_editUserPassword(user_dn, password)
            u.__ = password

        if roles is not None:
            all_roles = acl.getGroups()
            role_dns = []
            my_new_roles = []
            
            for role_name, role_dn in all_roles:
                if role_name in roles:
                    my_new_roles.append(role_name)
                    role_dns.append(role_dn)
                    
            u.roles = my_new_roles
            acl.manage_editUserRoles(user_dn, role_dns)

        if domains is not None:
            u.domains = domains


    def getPassword(self):


Generated by  Doxygen 1.6.0   Back to index