mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-08 05:33:34 +00:00
fix todrive for "gam print adminroles"
This commit is contained in:
11
src/gam.py
11
src/gam.py
@ -1619,6 +1619,15 @@ def doPrintAdminRoles():
|
|||||||
roles = callGAPIpages(cd.roles(), u'list', u'items',
|
roles = callGAPIpages(cd.roles(), u'list', u'items',
|
||||||
customer=GC_Values[GC_CUSTOMER_ID])
|
customer=GC_Values[GC_CUSTOMER_ID])
|
||||||
roles_attrib = [{}]
|
roles_attrib = [{}]
|
||||||
|
todrive = False
|
||||||
|
i = 3
|
||||||
|
while i < len(sys.argv):
|
||||||
|
if sys.argv[i].lower() == u'todrive':
|
||||||
|
todrive = True
|
||||||
|
i += 1
|
||||||
|
else:
|
||||||
|
print u'ERROR: %s is not a valid argument for "gam print adminroles".' % sys.argv[i]
|
||||||
|
sys.exit(2)
|
||||||
for role in roles:
|
for role in roles:
|
||||||
role_attrib = {}
|
role_attrib = {}
|
||||||
for key, value in role.items():
|
for key, value in role.items():
|
||||||
@ -1630,7 +1639,7 @@ def doPrintAdminRoles():
|
|||||||
roles_attrib[0][key] = key
|
roles_attrib[0][key] = key
|
||||||
role_attrib[key] = value
|
role_attrib[key] = value
|
||||||
roles_attrib.append(role_attrib)
|
roles_attrib.append(role_attrib)
|
||||||
output_csv(roles_attrib, roles_attrib[0], u'Admin Roles', False)
|
output_csv(roles_attrib, roles_attrib[0], u'Admin Roles', todrive)
|
||||||
|
|
||||||
def doPrintAdmins():
|
def doPrintAdmins():
|
||||||
cd = buildGAPIObject(u'directory')
|
cd = buildGAPIObject(u'directory')
|
||||||
|
Reference in New Issue
Block a user