gam7 7.8.0__py3-none-any.whl → 7.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gam7 might be problematic. Click here for more details.
- gam/__init__.py +59 -27
- {gam7-7.8.0.dist-info → gam7-7.8.1.dist-info}/METADATA +1 -1
- {gam7-7.8.0.dist-info → gam7-7.8.1.dist-info}/RECORD +6 -6
- {gam7-7.8.0.dist-info → gam7-7.8.1.dist-info}/WHEEL +0 -0
- {gam7-7.8.0.dist-info → gam7-7.8.1.dist-info}/entry_points.txt +0 -0
- {gam7-7.8.0.dist-info → gam7-7.8.1.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
|
28
|
-
__version__ = '7.08.
|
|
28
|
+
__version__ = '7.08.01'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -66053,7 +66053,9 @@ def doPrintShowSharedDriveACLs():
|
|
|
66053
66053
|
PRINT_ORGANIZER_TYPES = {'group', 'user'}
|
|
66054
66054
|
|
|
66055
66055
|
# gam [<UserTypeEntity>] print shareddriveorganizers [todrive <ToDriveAttribute>*]
|
|
66056
|
-
# [adminaccess|asadmin]
|
|
66056
|
+
# [adminaccess|asadmin]
|
|
66057
|
+
# [(shareddriveadminquery|query <QuerySharedDrive>) |
|
|
66058
|
+
# (shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>)))]
|
|
66057
66059
|
# [matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
|
66058
66060
|
# [domainlist <DomainList>]
|
|
66059
66061
|
# [includetypes user|group]
|
|
@@ -66068,7 +66070,7 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|
|
66068
66070
|
includeTypes = set()
|
|
66069
66071
|
showNoOrganizerDrives = SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP['false']
|
|
66070
66072
|
fieldsList = ['role', 'type', 'emailAddress']
|
|
66071
|
-
cd = orgUnitId = query = matchPattern = None
|
|
66073
|
+
cd = entityList = orgUnitId = query = matchPattern = None
|
|
66072
66074
|
domainList = []
|
|
66073
66075
|
oneOrganizer = False
|
|
66074
66076
|
while Cmd.ArgumentsRemaining():
|
|
@@ -66077,7 +66079,15 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|
|
66077
66079
|
csvPF.GetTodriveParameters()
|
|
66078
66080
|
elif myarg == 'delimiter':
|
|
66079
66081
|
delimiter = getCharacter()
|
|
66082
|
+
elif myarg in {'shareddrive', 'shareddrives', 'teamdrive', 'teamdrives'}:
|
|
66083
|
+
sharedDriveArg = myarg
|
|
66084
|
+
itemList = getString(Cmd.OB_SHAREDDRIVE_ID_LIST)
|
|
66085
|
+
if itemList != 'select':
|
|
66086
|
+
entityList = itemList.replace(',', ' ').split()
|
|
66087
|
+
else:
|
|
66088
|
+
entityList = getEntityList(Cmd.OB_SHAREDDRIVE_ID_LIST)
|
|
66080
66089
|
elif myarg in {'teamdriveadminquery', 'shareddriveadminquery', 'query'}:
|
|
66090
|
+
queryArg = myarg
|
|
66081
66091
|
queryLocation = Cmd.Location()
|
|
66082
66092
|
query = getString(Cmd.OB_QUERY, minLen=0) or None
|
|
66083
66093
|
if query:
|
|
@@ -66110,9 +66120,13 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|
|
66110
66120
|
roles.add('fileOrganizer')
|
|
66111
66121
|
else:
|
|
66112
66122
|
unknownArgumentExit()
|
|
66113
|
-
if query
|
|
66114
|
-
|
|
66115
|
-
|
|
66123
|
+
if query:
|
|
66124
|
+
if not useDomainAdminAccess:
|
|
66125
|
+
Cmd.SetLocation(queryLocation-1)
|
|
66126
|
+
usageErrorExit(Msg.ONLY_ADMINISTRATORS_CAN_PERFORM_SHARED_DRIVE_QUERIES)
|
|
66127
|
+
if entityList:
|
|
66128
|
+
Cmd.SetLocation(queryLocation-1)
|
|
66129
|
+
usageErrorExit(Msg.ARE_MUTUALLY_EXCLUSIVE.format(queryArg, sharedDriveArg))
|
|
66116
66130
|
if orgUnitId is not None:
|
|
66117
66131
|
if not useDomainAdminAccess:
|
|
66118
66132
|
Cmd.SetLocation(orgLocation-1)
|
|
@@ -66127,28 +66141,46 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|
|
66127
66141
|
user, drive = buildGAPIServiceObject(API.DRIVE3, user, i, count)
|
|
66128
66142
|
if not drive:
|
|
66129
66143
|
continue
|
|
66130
|
-
if
|
|
66131
|
-
|
|
66132
|
-
|
|
66144
|
+
if entityList is None:
|
|
66145
|
+
if useDomainAdminAccess:
|
|
66146
|
+
printGettingAllAccountEntities(Ent.SHAREDDRIVE, query)
|
|
66147
|
+
pageMessage = getPageMessage()
|
|
66148
|
+
else:
|
|
66149
|
+
printGettingAllEntityItemsForWhom(Ent.SHAREDDRIVE, user, i, count, query)
|
|
66150
|
+
pageMessage = getPageMessageForWhom()
|
|
66151
|
+
try:
|
|
66152
|
+
feed = callGAPIpages(drive.drives(), 'list', 'drives',
|
|
66153
|
+
pageMessage=pageMessage,
|
|
66154
|
+
throwReasons=GAPI.DRIVE_USER_THROW_REASONS+[GAPI.INVALID_QUERY, GAPI.INVALID,
|
|
66155
|
+
GAPI.QUERY_REQUIRES_ADMIN_CREDENTIALS,
|
|
66156
|
+
GAPI.NO_LIST_TEAMDRIVES_ADMINISTRATOR_PRIVILEGE,
|
|
66157
|
+
GAPI.FILE_NOT_FOUND],
|
|
66158
|
+
q=query, useDomainAdminAccess=useDomainAdminAccess,
|
|
66159
|
+
fields='nextPageToken,drives(id,name,createdTime,orgUnitId)', pageSize=100)
|
|
66160
|
+
except (GAPI.invalidQuery, GAPI.invalid, GAPI.queryRequiresAdminCredentials,
|
|
66161
|
+
GAPI.noListTeamDrivesAdministratorPrivilege, GAPI.fileNotFound) as e:
|
|
66162
|
+
entityActionFailedWarning([Ent.USER, user, Ent.SHAREDDRIVE, None], str(e), i, count)
|
|
66163
|
+
continue
|
|
66164
|
+
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
|
|
66165
|
+
userDriveServiceNotEnabledWarning(user, str(e), i, count)
|
|
66166
|
+
continue
|
|
66133
66167
|
else:
|
|
66134
|
-
|
|
66135
|
-
|
|
66136
|
-
|
|
66137
|
-
|
|
66138
|
-
|
|
66139
|
-
|
|
66140
|
-
|
|
66141
|
-
|
|
66142
|
-
|
|
66143
|
-
|
|
66144
|
-
|
|
66145
|
-
|
|
66146
|
-
|
|
66147
|
-
|
|
66148
|
-
|
|
66149
|
-
|
|
66150
|
-
userDriveServiceNotEnabledWarning(user, str(e), i, count)
|
|
66151
|
-
continue
|
|
66168
|
+
feed = []
|
|
66169
|
+
jcount = len(entityList)
|
|
66170
|
+
j = 0
|
|
66171
|
+
for driveId in entityList:
|
|
66172
|
+
j +=1
|
|
66173
|
+
try:
|
|
66174
|
+
feed.append(callGAPI(drive.drives(), 'get',
|
|
66175
|
+
throwReasons=GAPI.DRIVE_USER_THROW_REASONS+[GAPI.NOT_FOUND],
|
|
66176
|
+
useDomainAdminAccess=useDomainAdminAccess,
|
|
66177
|
+
driveId=driveId, fields='id,name,createdTime,orgUnitId'))
|
|
66178
|
+
except (GAPI.fileNotFound, GAPI.notFound) as e:
|
|
66179
|
+
entityActionNotPerformedWarning([Ent.USER, user, Ent.SHAREDDRIVE_ID, driveId], str(e), j, jcount)
|
|
66180
|
+
continue
|
|
66181
|
+
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
|
|
66182
|
+
userDriveServiceNotEnabledWarning(user, str(e), i, count)
|
|
66183
|
+
break
|
|
66152
66184
|
matchFeed = []
|
|
66153
66185
|
jcount = len(feed)
|
|
66154
66186
|
j = 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=lAyeM6G9tA4Gb2Lvl865y6ErSDDYtGY_laDZsG--SmE,3513774
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=82Ak7btW_2XvocLUvAwPmpx8Chi0oqtZUG1gseLK_t4,50235
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.8.
|
|
69
|
-
gam7-7.8.
|
|
70
|
-
gam7-7.8.
|
|
71
|
-
gam7-7.8.
|
|
72
|
-
gam7-7.8.
|
|
68
|
+
gam7-7.8.1.dist-info/METADATA,sha256=hROgYCJUA2X_WKqgJKVV5jwf3q58_oAD8-6nw9gYwiA,2977
|
|
69
|
+
gam7-7.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.8.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.8.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|