diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 8c4ea65c..d1f7f2cb 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -5031,18 +5031,18 @@ gam delete permissions to +gam copy shareddriveacls to [adminaccess|asadmin] [showpermissionsmessages []] [excludepermissionsfromdomains|includepermissionsfromdomains ] (mappermissionsdomain )* -gam sync teamdriveacls with +gam sync shareddriveacls with [adminaccess|asadmin] [showpermissionsmessages []] [excludepermissionsfromdomains|includepermissionsfromdomains ] (mappermissionsdomain )* -gam print teamdriveacls [todrive *] +gam print shareddriveacls [todrive *] [teamdriveadminquery|query ] [matchname ] [orgunit|org|ou ] [user|group [checkgroups]] (role|roles )* @@ -5050,7 +5050,7 @@ gam print teamdriveacls [todrive *] [oneitemperrow] [*|(fields )] (addcsvdata )* [formatjson [quotechar ]] -gam show teamdriveacls +gam show shareddriveacls [teamdriveadminquery|query ] [matchname ] [orgunit|org|ou ] [user|group [checkgroups]] (role|roles )* @@ -5060,18 +5060,18 @@ gam show teamdriveacls In these commands, you specify an administrator and then indicate that you want domain administrator access with the adminaccess option. -gam copy teamdriveacls to +gam copy shareddriveacls to [adminaccess|asadmin] [showpermissionsmessages []] [excludepermissionsfromdomains|includepermissionsfromdomains ] (mappermissionsdomain )* -gam sync teamdriveacls with +gam sync shareddriveacls with [adminaccess|asadmin] [showpermissionsmessages []] [excludepermissionsfromdomains|includepermissionsfromdomains ] (mappermissionsdomain )* -gam print teamdriveacls [todrive *] +gam print shareddriveacls [todrive *] [adminaccess|asadmin] [teamdriveadminquery|query ] [matchname ] [orgunit|org|ou ] [user|group [checkgroups]] (role|roles )* @@ -5080,7 +5080,7 @@ gam print teamdriveacls [todrive *] [shownopermissionsdrives false|true|only] (addcsvdata )* [formatjson [quotechar ]] -gam show teamdriveacls +gam show shareddriveacls [adminaccess|asadmin] [teamdriveadminquery|query ] [matchname ] [orgunit|org|ou ] [user|group [checkgroups]] (role|roles )* diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index aa70a557..dd6575af 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,8 @@ +7.09.06 + +Upddated `gam print|show shareddrives', `gam print|show shareddriveacls', `gam print shareddriveorganizers` +to display the Shared Drives in ascending name order; the API returns them in an unidentifiable order. + 7.09.05 Improved output of `gam info|show chromeschemas [std]` to more accurately display the schemas. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 926b35fc..f7267bfe 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.09.05' +__version__ = '7.09.06' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -65775,13 +65775,13 @@ def printShowSharedDrives(users, useDomainAdminAccess=False): entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count) Ind.Increment() j = 0 - for shareddrive in matchedFeed: + for shareddrive in sorted(matchedFeed, key=lambda k: k['name']): j += 1 shareddrive = stripNonShowFields(shareddrive) _showSharedDrive(user, shareddrive, j, jcount, FJQC) Ind.Decrement() else: - for shareddrive in matchedFeed: + for shareddrive in sorted(matchedFeed, key=lambda k: k['name']): shareddrive = stripNonShowFields(shareddrive) if FJQC.formatJSON: row = {'User': user, 'id': shareddrive['id'], 'name': shareddrive['name']} @@ -66156,7 +66156,7 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False): entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count) Ind.Increment() j = 0 - for shareddrive in matchFeed: + for shareddrive in sorted(matchFeed, key=lambda k: k['name']): j += 1 if not FJQC.formatJSON: _showDriveFilePermissions(Ent.SHAREDDRIVE, f'{shareddrive["name"]} ({shareddrive["id"]}) - {shareddrive["createdTime"]}', @@ -66170,7 +66170,7 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False): Ind.Decrement() elif matchFeed: if oneItemPerRow: - for shareddrive in matchFeed: + for shareddrive in sorted(matchFeed, key=lambda k: k['name']): baserow = {'User': user, 'id': shareddrive['id'], 'name': shareddrive['name'], 'createdTime': shareddrive['createdTime']} if addCSVData: baserow.update(addCSVData) @@ -66191,7 +66191,7 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False): baserow['JSON'] = json.dumps({}) csvPF.WriteRowNoFilter(baserow) else: - for shareddrive in matchFeed: + for shareddrive in sorted(matchFeed, key=lambda k: k['name']): baserow = {'User': user, 'id': shareddrive['id'], 'name': shareddrive['name'], 'createdTime': shareddrive['createdTime']} if addCSVData: baserow.update(addCSVData) @@ -66392,7 +66392,7 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False): pass if len(matchFeed) == 0: setSysExitRC(NO_ENTITIES_FOUND_RC) - for shareddrive in matchFeed: + for shareddrive in sorted(matchFeed, key=lambda k: k['name']): row = {'id': shareddrive['id'], 'name': shareddrive['name'], 'organizers': delimiter.join(shareddrive['organizers']), 'createdTime': shareddrive['createdTime']}