gam7 7.5.22__py3-none-any.whl → 7.6.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 +11 -8
- gam/gamlib/glgapi.py +13 -2
- {gam7-7.5.22.dist-info → gam7-7.6.1.dist-info}/METADATA +1 -1
- {gam7-7.5.22.dist-info → gam7-7.6.1.dist-info}/RECORD +7 -7
- {gam7-7.5.22.dist-info → gam7-7.6.1.dist-info}/WHEEL +0 -0
- {gam7-7.5.22.dist-info → gam7-7.6.1.dist-info}/entry_points.txt +0 -0
- {gam7-7.5.22.dist-info → gam7-7.6.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.
|
|
28
|
+
__version__ = '7.06.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
|
|
@@ -33563,14 +33563,14 @@ def doPrintGroups():
|
|
|
33563
33563
|
groupSettings.pop(key)
|
|
33564
33564
|
if FJQC.formatJSON:
|
|
33565
33565
|
row['email'] = groupEntity['email']
|
|
33566
|
-
row['JSON'] = json.dumps(groupEntity, ensure_ascii=False, sort_keys=True)
|
|
33566
|
+
row['JSON'] = json.dumps(cleanJSON(groupEntity), ensure_ascii=False, sort_keys=True)
|
|
33567
33567
|
if rolesSet and groupMembers is not None:
|
|
33568
33568
|
row['JSON-members'] = json.dumps(groupMembers, ensure_ascii=False, sort_keys=True)
|
|
33569
33569
|
if isinstance(groupSettings, dict):
|
|
33570
|
-
row['JSON-settings'] = json.dumps(groupSettings, ensure_ascii=False, sort_keys=True)
|
|
33570
|
+
row['JSON-settings'] = json.dumps(cleanJSON(groupSettings), ensure_ascii=False, sort_keys=True)
|
|
33571
33571
|
groupCloudIdentity = ciGroups.get(row['email'], {})
|
|
33572
33572
|
if groupCloudIdentity:
|
|
33573
|
-
row['JSON-cloudIdentity'] = json.dumps(groupCloudIdentity, ensure_ascii=False, sort_keys=True)
|
|
33573
|
+
row['JSON-cloudIdentity'] = json.dumps(cleanJSON(groupCloudIdentity, timeObjects=CIGROUP_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)
|
|
33574
33574
|
csvPF.WriteRowNoFilter(row)
|
|
33575
33575
|
return
|
|
33576
33576
|
for field in groupFieldsLists['cd']:
|
|
@@ -35935,7 +35935,7 @@ def doPrintCIGroups():
|
|
|
35935
35935
|
row = {}
|
|
35936
35936
|
if FJQC.formatJSON:
|
|
35937
35937
|
row['email'] = groupEntity['groupKey']['id'].lower()
|
|
35938
|
-
row['JSON'] = json.dumps(groupEntity, ensure_ascii=False, sort_keys=True)
|
|
35938
|
+
row['JSON'] = json.dumps(cleanJSON(groupEntity, timeObjects=CIGROUP_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)
|
|
35939
35939
|
if rolesSet and groupMembers is not None:
|
|
35940
35940
|
row['JSON-members'] = json.dumps(groupMembers, ensure_ascii=False, sort_keys=True)
|
|
35941
35941
|
csvPF.WriteRowNoFilter(row)
|
|
@@ -63090,7 +63090,8 @@ def createDriveFileACL(users, useDomainAdminAccess=False):
|
|
|
63090
63090
|
if showDetails:
|
|
63091
63091
|
_showDriveFilePermission(permission, printKeys, timeObjects)
|
|
63092
63092
|
except (GAPI.badRequest, GAPI.invalid, GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError,
|
|
63093
|
-
GAPI.cannotSetExpiration, GAPI.
|
|
63093
|
+
GAPI.cannotSetExpiration, GAPI.cannotSetExpirationOnAnyoneOrDomain,
|
|
63094
|
+
GAPI.expirationDateNotAllowedForSharedDriveMembers, GAPI.expirationDatesMustBeInTheFuture,
|
|
63094
63095
|
GAPI.insufficientFilePermissions, GAPI.unknownError, GAPI.ownershipChangeAcrossDomainNotPermitted,
|
|
63095
63096
|
GAPI.teamDriveDomainUsersOnlyRestriction, GAPI.teamDriveTeamMembersOnlyRestriction,
|
|
63096
63097
|
GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded,
|
|
@@ -63225,7 +63226,8 @@ def updateDriveFileACLs(users, useDomainAdminAccess=False):
|
|
|
63225
63226
|
if showDetails:
|
|
63226
63227
|
_showDriveFilePermission(permission, printKeys, timeObjects)
|
|
63227
63228
|
except (GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
|
|
63228
|
-
GAPI.cannotSetExpiration, GAPI.
|
|
63229
|
+
GAPI.cannotSetExpiration, GAPI.cannotSetExpirationOnAnyoneOrDomain,
|
|
63230
|
+
GAPI.expirationDateNotAllowedForSharedDriveMembers, GAPI.expirationDatesMustBeInTheFuture,
|
|
63229
63231
|
GAPI.badRequest, GAPI.invalidOwnershipTransfer, GAPI.cannotRemoveOwner,
|
|
63230
63232
|
GAPI.fileNeverWritable, GAPI.ownershipChangeAcrossDomainNotPermitted, GAPI.sharingRateLimitExceeded,
|
|
63231
63233
|
GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges,
|
|
@@ -63325,7 +63327,8 @@ def createDriveFilePermissions(users, useDomainAdminAccess=False):
|
|
|
63325
63327
|
body=_makePermissionBody(ri[RI_ITEM]), fields='', supportsAllDrives=True)
|
|
63326
63328
|
entityActionPerformed([Ent.DRIVE_FILE_OR_FOLDER_ID, ri[RI_ENTITY], Ent.PERMITTEE, ri[RI_ITEM]], int(ri[RI_J]), int(ri[RI_JCOUNT]))
|
|
63327
63329
|
except (GAPI.badRequest, GAPI.invalid, GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError,
|
|
63328
|
-
GAPI.cannotSetExpiration, GAPI.
|
|
63330
|
+
GAPI.cannotSetExpiration, GAPI.cannotSetExpirationOnAnyoneOrDomain,
|
|
63331
|
+
GAPI.expirationDateNotAllowedForSharedDriveMembers, GAPI.expirationDatesMustBeInTheFuture,
|
|
63329
63332
|
GAPI.insufficientFilePermissions, GAPI.unknownError, GAPI.ownershipChangeAcrossDomainNotPermitted,
|
|
63330
63333
|
GAPI.teamDriveDomainUsersOnlyRestriction, GAPI.teamDriveTeamMembersOnlyRestriction,
|
|
63331
63334
|
GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded,
|
gam/gamlib/glgapi.py
CHANGED
|
@@ -48,6 +48,7 @@ CANNOT_MOVE_TRASHED_ITEM_INTO_TEAMDRIVE = 'cannotMoveTrashedItemIntoTeamDrive'
|
|
|
48
48
|
CANNOT_MOVE_TRASHED_ITEM_OUT_OF_TEAMDRIVE = 'cannotMoveTrashedItemOutOfTeamDrive'
|
|
49
49
|
CANNOT_REMOVE_OWNER = 'cannotRemoveOwner'
|
|
50
50
|
CANNOT_SET_EXPIRATION = 'cannotSetExpiration'
|
|
51
|
+
CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN = 'cannotSetExpirationOnAnyoneOrDomain'
|
|
51
52
|
CANNOT_SHARE_GROUPS_WITHLINK = 'cannotShareGroupsWithLink'
|
|
52
53
|
CANNOT_SHARE_USERS_WITHLINK = 'cannotShareUsersWithLink'
|
|
53
54
|
CANNOT_SHARE_TEAMDRIVE_TOPFOLDER_WITH_ANYONEORDOMAINS = 'cannotShareTeamDriveTopFolderWithAnyoneOrDomains'
|
|
@@ -71,6 +72,7 @@ DOMAIN_POLICY = 'domainPolicy'
|
|
|
71
72
|
DOWNLOAD_QUOTA_EXCEEDED = 'downloadQuotaExceeded'
|
|
72
73
|
DUPLICATE = 'duplicate'
|
|
73
74
|
EVENT_DURATION_EXCEEDS_LIMIT = 'eventDurationExceedsLimit'
|
|
75
|
+
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE = 'expirationDatesMustBeInTheFuture'
|
|
74
76
|
EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS = 'expirationDateNotAllowedForSharedDriveMembers'
|
|
75
77
|
FAILED_PRECONDITION = 'failedPrecondition'
|
|
76
78
|
FIELD_IN_USE = 'fieldInUse'
|
|
@@ -211,7 +213,8 @@ DRIVE_COPY_THROW_REASONS = DRIVE_ACCESS_THROW_REASONS+[CANNOT_COPY_FILE, BAD_REQ
|
|
|
211
213
|
STORAGE_QUOTA_EXCEEDED, TEAMDRIVE_FILE_LIMIT_EXCEEDED, TEAMDRIVE_HIERARCHY_TOO_DEEP]
|
|
212
214
|
DRIVE_GET_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, DOWNLOAD_QUOTA_EXCEEDED]
|
|
213
215
|
DRIVE3_CREATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID, INVALID_SHARING_REQUEST, OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED,
|
|
214
|
-
CANNOT_SET_EXPIRATION,
|
|
216
|
+
CANNOT_SET_EXPIRATION, CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN,
|
|
217
|
+
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS,
|
|
215
218
|
NOT_FOUND, TEAMDRIVE_DOMAIN_USERS_ONLY_RESTRICTION, TEAMDRIVE_TEAM_MEMBERS_ONLY_RESTRICTION,
|
|
216
219
|
TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION, INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
|
|
217
220
|
PUBLISH_OUT_NOT_PERMITTED, SHARE_IN_NOT_PERMITTED, SHARE_OUT_NOT_PERMITTED, SHARE_OUT_NOT_PERMITTED_TO_USER,
|
|
@@ -228,7 +231,8 @@ DRIVE3_GET_ACL_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, FORBIDDEN, IN
|
|
|
228
231
|
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, INSUFFICIENT_FILE_PERMISSIONS,
|
|
229
232
|
UNKNOWN_ERROR, INVALID]
|
|
230
233
|
DRIVE3_UPDATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID_OWNERSHIP_TRANSFER, CANNOT_REMOVE_OWNER,
|
|
231
|
-
CANNOT_SET_EXPIRATION,
|
|
234
|
+
CANNOT_SET_EXPIRATION, CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN,
|
|
235
|
+
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS,
|
|
232
236
|
OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED,
|
|
233
237
|
NOT_FOUND, TEAMDRIVE_DOMAIN_USERS_ONLY_RESTRICTION, TEAMDRIVE_TEAM_MEMBERS_ONLY_RESTRICTION,
|
|
234
238
|
TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION, INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
|
|
@@ -300,6 +304,7 @@ REASON_MESSAGE_MAP = {
|
|
|
300
304
|
('userId', USER_NOT_FOUND),
|
|
301
305
|
('memberKey', INVALID_MEMBER),
|
|
302
306
|
('A system error has occurred', SYSTEM_ERROR),
|
|
307
|
+
('Expiration dates must be in the future', EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE),
|
|
303
308
|
('Invalid attribute value', INVALID_ATTRIBUTE_VALUE),
|
|
304
309
|
('Invalid Customer Id', INVALID_CUSTOMER_ID),
|
|
305
310
|
('Invalid Input: INVALID_OU_ID', INVALID_ORGUNIT),
|
|
@@ -405,6 +410,8 @@ class cannotRemoveOwner(Exception):
|
|
|
405
410
|
pass
|
|
406
411
|
class cannotSetExpiration(Exception):
|
|
407
412
|
pass
|
|
413
|
+
class cannotSetExpirationOnAnyoneOrDomain(Exception):
|
|
414
|
+
pass
|
|
408
415
|
class cannotShareGroupsWithLink(Exception):
|
|
409
416
|
pass
|
|
410
417
|
class cannotShareUsersWithLink(Exception):
|
|
@@ -449,6 +456,8 @@ class duplicate(Exception):
|
|
|
449
456
|
pass
|
|
450
457
|
class eventDurationExceedsLimit(Exception):
|
|
451
458
|
pass
|
|
459
|
+
class expirationDatesMustBeInTheFuture(Exception):
|
|
460
|
+
pass
|
|
452
461
|
class expirationDateNotAllowedForSharedDriveMembers(Exception):
|
|
453
462
|
pass
|
|
454
463
|
class failedPrecondition(Exception):
|
|
@@ -690,6 +699,7 @@ REASON_EXCEPTION_MAP = {
|
|
|
690
699
|
CANNOT_MOVE_TRASHED_ITEM_OUT_OF_TEAMDRIVE: cannotMoveTrashedItemOutOfTeamDrive,
|
|
691
700
|
CANNOT_REMOVE_OWNER: cannotRemoveOwner,
|
|
692
701
|
CANNOT_SET_EXPIRATION: cannotSetExpiration,
|
|
702
|
+
CANNOT_SET_EXPIRATION_ON_ANYONE_OR_DOMAIN: cannotSetExpirationOnAnyoneOrDomain,
|
|
693
703
|
CANNOT_SHARE_GROUPS_WITHLINK: cannotShareGroupsWithLink,
|
|
694
704
|
CANNOT_SHARE_USERS_WITHLINK: cannotShareUsersWithLink,
|
|
695
705
|
CANNOT_SHARE_TEAMDRIVE_TOPFOLDER_WITH_ANYONEORDOMAINS: cannotShareTeamDriveTopFolderWithAnyoneOrDomains,
|
|
@@ -712,6 +722,7 @@ REASON_EXCEPTION_MAP = {
|
|
|
712
722
|
DOWNLOAD_QUOTA_EXCEEDED: downloadQuotaExceeded,
|
|
713
723
|
DUPLICATE: duplicate,
|
|
714
724
|
EVENT_DURATION_EXCEEDS_LIMIT: eventDurationExceedsLimit,
|
|
725
|
+
EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE: expirationDatesMustBeInTheFuture,
|
|
715
726
|
EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS: expirationDateNotAllowedForSharedDriveMembers,
|
|
716
727
|
FAILED_PRECONDITION: failedPrecondition,
|
|
717
728
|
FIELD_IN_USE: fieldInUse,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=zGPIRz-Nt_GNWZw2mSrzfcD0uJo6BR93L4LkKVnY4PM,3485159
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=nJuWha0xm5dHw_5ptGphwRoO-r36Ccpqiww9pCEDbSc,67484
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -27,7 +27,7 @@ gam/gamlib/glapi.py,sha256=EAQXkaM13t6jjh9vL4eHJqIZRI5kmzeneiFs5xcWXfg,34304
|
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=cV011FpIWge4oi5_dJrdof66vUqX6UCvTGWWTNVmYEg,28055
|
|
28
28
|
gam/gamlib/glclargs.py,sha256=jQoPUJoENvoAe8-MjKfcW1gvLnvoxMbvWWYvtQZynfU,42196
|
|
29
29
|
gam/gamlib/glentity.py,sha256=ZLbyMl9NhN-MBf9Rxmho2dBYeS4SNLMctpeaKFZSbQ4,33801
|
|
30
|
-
gam/gamlib/glgapi.py,sha256=
|
|
30
|
+
gam/gamlib/glgapi.py,sha256=xk3pEaIE-zHrTNCn5rJYERqqpbN55E1wXlKoqvWP44E,39232
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=Y73xM1RNhIbtcqnMv1gcZF3wDWOeLWW-7SvoQyWw6tA,9659
|
|
33
33
|
gam/gamlib/glindent.py,sha256=RfBa2LDfLIqPLL5vMfC689TCVmqn8xf-qulSzkiatrc,1228
|
|
@@ -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.
|
|
69
|
-
gam7-7.
|
|
70
|
-
gam7-7.
|
|
71
|
-
gam7-7.
|
|
72
|
-
gam7-7.
|
|
68
|
+
gam7-7.6.1.dist-info/METADATA,sha256=74NkV4Tx265mneh_lTqF_oRgrrM9YAuvBL6Gn-r_hPo,2888
|
|
69
|
+
gam7-7.6.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.6.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.6.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|