gam7 7.10.3__py3-none-any.whl → 7.10.5__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 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.10.03'
28
+ __version__ = '7.10.05'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -13548,52 +13548,55 @@ def doReportUsage():
13548
13548
  NL_SPACES_PATTERN = re.compile(r'\n +')
13549
13549
  DISABLED_REASON_TIME_PATTERN = re.compile(r'.*(\d{4}/\d{2}/\d{2}-\d{2}:\d{2}:\d{2})')
13550
13550
 
13551
+ REPORT_ALIASES_CHOICE_MAP = {
13552
+ 'access': 'accesstransparency',
13553
+ 'calendars': 'calendar',
13554
+ 'cloud': 'gcp',
13555
+ 'currents': 'gplus',
13556
+ 'customers': 'customer',
13557
+ 'domain': 'customer',
13558
+ 'devices': 'mobile',
13559
+ 'doc': 'drive',
13560
+ 'docs': 'drive',
13561
+ 'enterprisegroups': 'groupsenterprise',
13562
+ 'gemini': 'geminiinworkspaceapps',
13563
+ 'geminiforworkspace': 'geminiinworkspaceapps',
13564
+ 'group': 'groups',
13565
+ 'google+': 'gplus',
13566
+ 'hangoutsmeet': 'meet',
13567
+ 'logins': 'login',
13568
+ 'lookerstudio': 'datastudio',
13569
+ 'oauthtoken': 'token',
13570
+ 'tokens': 'token',
13571
+ 'users': 'user',
13572
+ }
13573
+
13551
13574
  REPORT_CHOICE_MAP = {
13552
- 'access': 'access_transparency',
13553
13575
  'accesstransparency': 'access_transparency',
13554
13576
  'admin': 'admin',
13555
13577
  'calendar': 'calendar',
13556
- 'calendars': 'calendar',
13557
13578
  'chat': 'chat',
13558
13579
  'chrome': 'chrome',
13559
- 'classroom': 'classroom',
13560
- 'cloud': 'gcp',
13561
13580
  'contextawareaccess': 'context_aware_access',
13562
- 'currents': 'gplus',
13563
13581
  'customer': 'customer',
13564
- 'customers': 'customer',
13565
13582
  'datastudio': 'data_studio',
13566
- 'devices': 'mobile',
13567
- 'doc': 'drive',
13568
- 'docs': 'drive',
13569
- 'domain': 'customer',
13570
13583
  'drive': 'drive',
13571
- 'enterprisegroups': 'groups_enterprise',
13572
13584
  'gcp': 'gcp',
13573
- 'gemini': 'gemini_for_workspace',
13574
- 'geminiforworkspace': 'gemini_for_workspace',
13585
+ 'geminiinworkspaceapps': 'gemini_in_workspace_apps',
13575
13586
  'gplus': 'gplus',
13576
- 'google+': 'gplus',
13577
- 'group': 'groups',
13578
13587
  'groups': 'groups',
13579
13588
  'groupsenterprise': 'groups_enterprise',
13580
- 'hangoutsmeet': 'meet',
13581
13589
  'jamboard': 'jamboard',
13582
13590
  'keep': 'keep',
13583
13591
  'login': 'login',
13584
- 'logins': 'login',
13585
- 'lookerstudio': 'data_studio',
13586
13592
  'meet': 'meet',
13587
13593
  'mobile': 'mobile',
13588
- 'oauthtoken': 'token',
13589
13594
  'rules': 'rules',
13590
13595
  'saml': 'saml',
13591
13596
  'token': 'token',
13592
- 'tokens': 'token',
13593
13597
  'usage': 'usage',
13594
13598
  'usageparameters': 'usageparameters',
13595
13599
  'user': 'user',
13596
- 'users': 'user',
13597
13600
  'useraccounts': 'user_accounts',
13598
13601
  'vault': 'vault',
13599
13602
  }
@@ -13883,7 +13886,7 @@ def doReport():
13883
13886
  if dyn_choice.replace('_', '') not in REPORT_CHOICE_MAP and \
13884
13887
  dyn_choice not in REPORT_CHOICE_MAP.values():
13885
13888
  REPORT_CHOICE_MAP[dyn_choice.replace('_', '')] = dyn_choice
13886
- report = getChoice(REPORT_CHOICE_MAP, mapChoice=True)
13889
+ report = getChoice(REPORT_CHOICE_MAP, choiceAliases=REPORT_ALIASES_CHOICE_MAP, mapChoice=True)
13887
13890
  if report == 'usage':
13888
13891
  doReportUsage()
13889
13892
  return
@@ -59524,7 +59527,8 @@ def _copyPermissions(drive, user, i, count, j, jcount,
59524
59527
  entityActionPerformed(kvList, k, kcount)
59525
59528
  except (GAPI.notFound, GAPI.permissionNotFound,
59526
59529
  GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
59527
- GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner, GAPI.cannotModifyInheritedTeamDrivePermission,
59530
+ GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner,
59531
+ GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.cannotModifyInheritedPermission,
59528
59532
  GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded, GAPI.cannotDeletePermission) as e:
59529
59533
  entityActionFailedWarning(kvList, str(e), k, kcount)
59530
59534
  except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
@@ -59551,7 +59555,8 @@ def _copyPermissions(drive, user, i, count, j, jcount,
59551
59555
  entityActionPerformed(kvList, k, kcount)
59552
59556
  except (GAPI.notFound, GAPI.permissionNotFound,
59553
59557
  GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
59554
- GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner, GAPI.cannotModifyInheritedTeamDrivePermission,
59558
+ GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner,
59559
+ GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.cannotModifyInheritedPermission,
59555
59560
  GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded) as e:
59556
59561
  entityActionFailedWarning(kvList, str(e), k, kcount)
59557
59562
  except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
@@ -60558,7 +60563,8 @@ def _updateMoveFilePermissions(drive, user, i, count,
60558
60563
  entityActionPerformed(kvList, k, kcount)
60559
60564
  except (GAPI.notFound, GAPI.permissionNotFound,
60560
60565
  GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
60561
- GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner, GAPI.cannotModifyInheritedTeamDrivePermission,
60566
+ GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner,
60567
+ GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.cannotModifyInheritedPermission,
60562
60568
  GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded, GAPI.cannotDeletePermission) as e:
60563
60569
  entityActionFailedWarning(kvList, str(e), k, kcount)
60564
60570
  except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
@@ -63981,7 +63987,8 @@ def updateDriveFileACLs(users, useDomainAdminAccess=False):
63981
63987
  GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges,
63982
63988
  GAPI.publishOutNotPermitted, GAPI.shareInNotPermitted, GAPI.shareOutNotPermitted, GAPI.shareOutNotPermittedToUser,
63983
63989
  GAPI.organizerOnNonTeamDriveItemNotSupported, GAPI.fileOrganizerOnNonTeamDriveNotSupported,
63984
- GAPI.cannotUpdatePermission, GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.fieldNotWritable) as e:
63990
+ GAPI.cannotUpdatePermission, GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.cannotModifyInheritedPermission,
63991
+ GAPI.fieldNotWritable) as e:
63985
63992
  entityActionFailedWarning([Ent.USER, user, entityType, fileName], str(e), j, jcount)
63986
63993
  except (GAPI.notFound, GAPI.teamDriveDomainUsersOnlyRestriction, GAPI.teamDriveTeamMembersOnlyRestriction,
63987
63994
  GAPI.cannotShareTeamDriveTopFolderWithAnyoneOrDomains, GAPI.ownerOnTeamDriveItemNotSupported,
@@ -64254,7 +64261,8 @@ def deleteDriveFileACLs(users, useDomainAdminAccess=False):
64254
64261
  if updateSheetProtectedRanges and mimeType == MIMETYPE_GA_SPREADSHEET:
64255
64262
  _updateSheetProtectedRangesACLchange(sheet, user, i, count, j, jcount, fileId, fileName, False, permission)
64256
64263
  except (GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
64257
- GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner, GAPI.cannotModifyInheritedTeamDrivePermission,
64264
+ GAPI.fileNeverWritable, GAPI.badRequest, GAPI.cannotRemoveOwner,
64265
+ GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.cannotModifyInheritedPermission,
64258
64266
  GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded, GAPI.cannotDeletePermission) as e:
64259
64267
  entityActionFailedWarning([Ent.USER, user, entityType, fileName], str(e), j, jcount)
64260
64268
  except GAPI.notFound as e:
@@ -64310,7 +64318,8 @@ def deletePermissions(users, useDomainAdminAccess=False):
64310
64318
  fileId=ri[RI_ENTITY], permissionId=ri[RI_ITEM], supportsAllDrives=True)
64311
64319
  entityActionPerformed([Ent.DRIVE_FILE_OR_FOLDER_ID, ri[RI_ENTITY], Ent.PERMISSION_ID, ri[RI_ITEM]], int(ri[RI_J]), int(ri[RI_JCOUNT]))
64312
64320
  except (GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
64313
- GAPI.badRequest, GAPI.cannotRemoveOwner, GAPI.cannotModifyInheritedTeamDrivePermission,
64321
+ GAPI.badRequest, GAPI.cannotRemoveOwner,
64322
+ GAPI.cannotModifyInheritedTeamDrivePermission, GAPI.cannotModifyInheritedPermission,
64314
64323
  GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded, GAPI.permissionNotFound, GAPI.cannotDeletePermission,
64315
64324
  GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
64316
64325
  entityActionFailedWarning([Ent.DRIVE_FILE_OR_FOLDER_ID, ri[RI_ENTITY], Ent.PERMISSION_ID, ri[RI_ITEM]], str(e), int(ri[RI_J]), int(ri[RI_JCOUNT]))
gam/gamlib/glgapi.py CHANGED
@@ -41,6 +41,7 @@ CANNOT_DELETE_PERMISSION = 'cannotDeletePermission'
41
41
  CANNOT_DELETE_PRIMARY_CALENDAR = 'cannotDeletePrimaryCalendar'
42
42
  CANNOT_DELETE_PRIMARY_SENDAS = 'cannotDeletePrimarySendAs'
43
43
  CANNOT_DELETE_RESOURCE_WITH_CHILDREN = 'cannotDeleteResourceWithChildren'
44
+ CANNOT_MODIFY_INHERITED_PERMISSION = 'cannotModifyInheritedPermission'
44
45
  CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION = 'cannotModifyInheritedTeamDrivePermission'
45
46
  CANNOT_MODIFY_RESTRICTED_LABEL = 'cannotModifyRestrictedLabel'
46
47
  CANNOT_MODIFY_VIEWERS_CAN_COPY_CONTENT = 'cannotModifyViewersCanCopyContent'
@@ -248,10 +249,10 @@ DRIVE3_UPDATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID_OWNERSHIP_TRANSFER, CANN
248
249
  FILE_ORGANIZER_ON_FOLDERS_IN_SHARED_DRIVE_ONLY,
249
250
  FILE_ORGANIZER_ON_NON_TEAMDRIVE_NOT_SUPPORTED,
250
251
  CANNOT_UPDATE_PERMISSION,
251
- CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION,
252
+ CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION, CANNOT_MODIFY_INHERITED_PERMISSION,
252
253
  FIELD_NOT_WRITABLE, PERMISSION_NOT_FOUND]
253
254
  DRIVE3_DELETE_ACL_THROW_REASONS = [BAD_REQUEST, CANNOT_REMOVE_OWNER,
254
- CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION,
255
+ CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION, CANNOT_MODIFY_INHERITED_PERMISSION,
255
256
  INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
256
257
  NOT_FOUND, PERMISSION_NOT_FOUND, CANNOT_DELETE_PERMISSION]
257
258
  DRIVE3_MODIFY_LABEL_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, NOT_FOUND, FORBIDDEN, INTERNAL_ERROR,
@@ -398,6 +399,8 @@ class cannotDeletePrimarySendAs(Exception):
398
399
  pass
399
400
  class cannotDeleteResourceWithChildren(Exception):
400
401
  pass
402
+ class cannotModifyInheritedPermission(Exception):
403
+ pass
401
404
  class cannotModifyInheritedTeamDrivePermission(Exception):
402
405
  pass
403
406
  class cannotModifyRestrictedLabel(Exception):
@@ -698,6 +701,7 @@ REASON_EXCEPTION_MAP = {
698
701
  CANNOT_DELETE_PRIMARY_CALENDAR: cannotDeletePrimaryCalendar,
699
702
  CANNOT_DELETE_PRIMARY_SENDAS: cannotDeletePrimarySendAs,
700
703
  CANNOT_DELETE_RESOURCE_WITH_CHILDREN: cannotDeleteResourceWithChildren,
704
+ CANNOT_MODIFY_INHERITED_PERMISSION: cannotModifyInheritedPermission,
701
705
  CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION: cannotModifyInheritedTeamDrivePermission,
702
706
  CANNOT_MODIFY_RESTRICTED_LABEL: cannotModifyRestrictedLabel,
703
707
  CANNOT_MODIFY_VIEWERS_CAN_COPY_CONTENT: cannotModifyViewersCanCopyContent,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.10.3
3
+ Version: 7.10.5
4
4
  Summary: CLI tool to manage Google Workspace
5
5
  Project-URL: Homepage, https://github.com/GAM-team/GAM
6
6
  Project-URL: Issues, https://github.com/GAM-team/GAM/issues
@@ -1,4 +1,4 @@
1
- gam/__init__.py,sha256=JzySfzYuzMeCm1P16rv9PgAlftWL4GJrCRyWK-bAc0U,3532300
1
+ gam/__init__.py,sha256=43na6-5DeFjv9thgakgqlObqcafYJAq6uSq9nsszDNw,3532710
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
@@ -27,7 +27,7 @@ gam/gamlib/glapi.py,sha256=A6kdyCacc9tvTaxMUNvWj8jWbOrss8e8XdkqF1xbN70,34572
27
27
  gam/gamlib/glcfg.py,sha256=bNTckxzIM_HruxO2DfYsDbEgqOIz1RX6CbU6XOQQQyg,28296
28
28
  gam/gamlib/glclargs.py,sha256=Ohe746FOQqMlXlutH-XJ6E1unYNzf_EJhdubnPp3new,42472
29
29
  gam/gamlib/glentity.py,sha256=c9-7MAp0HruXEUVq8Nwkllxc4KypFeZRUFkvVzPwrwk,33760
30
- gam/gamlib/glgapi.py,sha256=cGtvFvvBU3XQJLgtLCjs_V5VBUem_k0b5uUrK21VmeA,39491
30
+ gam/gamlib/glgapi.py,sha256=648jvjKK5rT9Qdyz5Ybh6wAO6sxUwQu1L_ogRqj0zZ0,39762
31
31
  gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
32
32
  gam/gamlib/glglobals.py,sha256=J0xcHggVrUBzHJ5GruenKV-qV1zPKcK2qWgAgN3i5Jw,9608
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.10.3.dist-info/METADATA,sha256=uS18Csl28kbbMa1NlMs6rWeBhzrf616tpHHQxDRr0KE,2978
69
- gam7-7.10.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.10.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.10.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.10.3.dist-info/RECORD,,
68
+ gam7-7.10.5.dist-info/METADATA,sha256=TVwY4E3CKAMx-REeGF3s_z9ofAcu-Kq52mHDD32Pf5E,2978
69
+ gam7-7.10.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.10.5.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.10.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.10.5.dist-info/RECORD,,
File without changes