gam7 7.7.12__py3-none-any.whl → 7.7.13__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.07.12'
28
+ __version__ = '7.07.13'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -59838,6 +59838,7 @@ def copyDriveFile(users):
59838
59838
  # Source at root of Shared Drive?
59839
59839
  sourceMimeType = source['mimeType']
59840
59840
  if sourceMimeType == MIMETYPE_GA_FOLDER and source.get('driveId') and source['name'] == TEAM_DRIVE and not source.get('parents', []):
59841
+ copyMoveOptions['sourceIsMyDriveSharedDrive'] = True
59841
59842
  source['name'] = _getSharedDriveNameFromId(drive, source['driveId'])
59842
59843
  sourceName = source['name']
59843
59844
  sourceNameId = f"{sourceName}({source['id']})"
@@ -65416,12 +65417,14 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
65416
65417
  # (role|roles <SharedDriveACLRoleList>)*
65417
65418
  # [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
65418
65419
  # [guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
65420
+ # [showitemcountonly]
65419
65421
  # gam <UserTypeEntity> show shareddrives
65420
65422
  # [asadmin [shareddriveadminquery|query <QuerySharedDrive>]]
65421
65423
  # [matchname <REMatchPattrn>] [orgunit|org|ou <OrgUnitPath>]
65422
65424
  # (role|roles <SharedDriveACLRoleLIst>)*
65423
65425
  # [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
65424
65426
  # [guiroles [<Boolean>]] [formatjson]
65427
+ # [showitemcountonly]
65425
65428
  def printShowSharedDrives(users, useDomainAdminAccess=False):
65426
65429
  def stripNonShowFields(shareddrive):
65427
65430
  if orgUnitIdToPathMap:
@@ -65445,7 +65448,7 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65445
65448
  SHAREDDRIVE_FIELDS_CHOICE_MAP.update(SHAREDDRIVE_LIST_FIELDS_CHOICE_MAP)
65446
65449
  showOrgUnitPaths = True
65447
65450
  orgUnitIdToPathMap = None
65448
- guiRoles = False
65451
+ guiRoles = showItemCountOnly = False
65449
65452
  while Cmd.ArgumentsRemaining():
65450
65453
  myarg = getArgument()
65451
65454
  if csvPF and myarg == 'todrive':
@@ -65475,6 +65478,9 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65475
65478
  showOrgUnitPaths = not getBoolean()
65476
65479
  elif myarg == 'guiroles':
65477
65480
  guiRoles = getBoolean()
65481
+ elif myarg == 'showitemcountonly':
65482
+ showItemCountOnly = True
65483
+ showOrgUnitPaths = False
65478
65484
  else:
65479
65485
  FJQC.GetFormatJSONQuoteChar(myarg, True)
65480
65486
  if query and not useDomainAdminAccess:
@@ -65544,6 +65550,9 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65544
65550
  jcount = len(matchedFeed)
65545
65551
  if jcount == 0:
65546
65552
  setSysExitRC(NO_ENTITIES_FOUND_RC)
65553
+ if showItemCountOnly:
65554
+ writeStdout(f'{jcount}\n')
65555
+ return
65547
65556
  if not csvPF:
65548
65557
  if not FJQC.formatJSON:
65549
65558
  entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count)
@@ -65574,9 +65583,11 @@ def doPrintShowSharedDrives():
65574
65583
  # gam print oushareddrives [todrive <ToDriveAttribute>*]
65575
65584
  # [ou|org|orgunit <OrgUnitPath>]
65576
65585
  # [formatjson [quotechar <Character>]]
65586
+ # [showitemcountonly]
65577
65587
  # gam show oushareddrives
65578
65588
  # [ou|org|orgunit <OrgUnitPath>]
65579
65589
  # [formatjson]
65590
+ # [showitemcountonly]
65580
65591
  def doPrintShowOrgunitSharedDrives():
65581
65592
  def _getOrgUnitSharedDriveInfo(shareddrive):
65582
65593
  shareddrive['driveId'] = shareddrive['name'].rsplit(';')[1]
@@ -65605,12 +65616,15 @@ def doPrintShowOrgunitSharedDrives():
65605
65616
  csvPF = CSVPrintFile(['name', 'type', 'member', 'memberUri', 'driveId', 'driveName', 'orgUnitPath']) if Act.csvFormat() else None
65606
65617
  FJQC = FormatJSONQuoteChar(csvPF)
65607
65618
  orgUnitPath = '/'
65619
+ showItemCountOnly = False
65608
65620
  while Cmd.ArgumentsRemaining():
65609
65621
  myarg = getArgument()
65610
65622
  if csvPF and myarg == 'todrive':
65611
65623
  csvPF.GetTodriveParameters()
65612
65624
  elif myarg in {'ou', 'org', 'orgunit'}:
65613
65625
  orgUnitPath = getString(Cmd.OB_ORGUNIT_ITEM)
65626
+ elif myarg == 'showitemcountonly':
65627
+ showItemCountOnly = True
65614
65628
  else:
65615
65629
  FJQC.GetFormatJSONQuoteChar(myarg, True)
65616
65630
  if csvPF and FJQC.formatJSON:
@@ -65625,6 +65639,9 @@ def doPrintShowOrgunitSharedDrives():
65625
65639
  jcount = len(sds)
65626
65640
  if jcount == 0:
65627
65641
  setSysExitRC(NO_ENTITIES_FOUND_RC)
65642
+ if showItemCountOnly:
65643
+ writeStdout(f'{jcount}\n')
65644
+ return
65628
65645
  if not csvPF:
65629
65646
  if not FJQC.formatJSON:
65630
65647
  entityPerformActionNumItems([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], jcount, Ent.SHAREDDRIVE)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.7.12
3
+ Version: 7.7.13
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=G-u3EcbEw8f8nJNw-wbcZr5vjrebdXNbfGQSrWQZjDw,3501588
1
+ gam/__init__.py,sha256=AhV4_cWiGK-lKbV1Tp6YxPY-hJ2fox188ed6IUXQBxw,3502100
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.7.12.dist-info/METADATA,sha256=h3CdntwsA0-Q9gkONw0sSwea8d32VpAAbgxVRu8N0hM,2970
69
- gam7-7.7.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.7.12.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.7.12.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.7.12.dist-info/RECORD,,
68
+ gam7-7.7.13.dist-info/METADATA,sha256=WPtdXPqwrUOOf_hGpL1uaFn6aSaXKG59BMYGgrSZU0w,2970
69
+ gam7-7.7.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.7.13.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.7.13.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.7.13.dist-info/RECORD,,
File without changes