mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-08 13:43:35 +00:00
Merge pull request #257 from taers232c/master
Handle orphaned Org Unit/Role Ids in print admins/adminroles
This commit is contained in:
@ -2096,7 +2096,7 @@ def buildOrgUnitIdToNameMap():
|
|||||||
def orgunit_from_orgunitid(orgunitid):
|
def orgunit_from_orgunitid(orgunitid):
|
||||||
if not GM_Globals[GM_MAP_ORGUNIT_ID_TO_NAME]:
|
if not GM_Globals[GM_MAP_ORGUNIT_ID_TO_NAME]:
|
||||||
buildOrgUnitIdToNameMap()
|
buildOrgUnitIdToNameMap()
|
||||||
return GM_Globals[GM_MAP_ORGUNIT_ID_TO_NAME][orgunitid]
|
return GM_Globals[GM_MAP_ORGUNIT_ID_TO_NAME].get(orgunitid, orgunitid)
|
||||||
|
|
||||||
def buildRoleIdToNameToIdMap():
|
def buildRoleIdToNameToIdMap():
|
||||||
cd = buildGAPIObject(u'directory')
|
cd = buildGAPIObject(u'directory')
|
||||||
@ -2113,7 +2113,7 @@ def buildRoleIdToNameToIdMap():
|
|||||||
def role_from_roleid(roleid):
|
def role_from_roleid(roleid):
|
||||||
if not GM_Globals[GM_MAP_ROLE_ID_TO_NAME]:
|
if not GM_Globals[GM_MAP_ROLE_ID_TO_NAME]:
|
||||||
buildRoleIdToNameToIdMap()
|
buildRoleIdToNameToIdMap()
|
||||||
return GM_Globals[GM_MAP_ROLE_ID_TO_NAME][roleid]
|
return GM_Globals[GM_MAP_ROLE_ID_TO_NAME].get(roleid, roleid)
|
||||||
|
|
||||||
def roleid_from_role(role):
|
def roleid_from_role(role):
|
||||||
if not GM_Globals[GM_MAP_ROLE_NAME_TO_ID]:
|
if not GM_Globals[GM_MAP_ROLE_NAME_TO_ID]:
|
||||||
|
Reference in New Issue
Block a user