|
|
@ -213,16 +213,17 @@ class ldapUser(_error): |
|
|
|
else: |
|
|
|
dictOut[dictAttr] = "" |
|
|
|
elif dictAttr == "groups": |
|
|
|
userGroups = [] |
|
|
|
userGroupsData = [] |
|
|
|
for groupDN in groupsDNs: |
|
|
|
searchGroup = self.ldapObj.ldapSearch(groupDN, |
|
|
|
ldap.SCOPE_ONELEVEL, |
|
|
|
"%s=%s" %(ldapAttr,userName), |
|
|
|
["cn"]) |
|
|
|
["cn","gidNumber"]) |
|
|
|
if searchGroup: |
|
|
|
userGroups += map(lambda x: x[0][1]["cn"][0], |
|
|
|
userGroupsData += map(lambda x: (x[0][1]["cn"][0], |
|
|
|
x[0][1]["gidNumber"][0]), |
|
|
|
searchGroup) |
|
|
|
dictOut[dictAttr] = userGroups |
|
|
|
dictOut[dictAttr] = userGroupsData |
|
|
|
if uid and gid: |
|
|
|
return dictOut |
|
|
|
else: |
|
|
|