gam7 7.7.12__py3-none-any.whl → 7.7.14__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.14'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -25949,7 +25949,7 @@ def _printChatItem(user, citem, parent, entityType, csvPF, FJQC, addCSVData=None
25949
25949
  def doSetupChat():
25950
25950
  checkForExtraneousArguments()
25951
25951
  _, chat , _ = buildChatServiceObject()
25952
- writeStdout(Msg.TO_SET_UP_GOOGLE_CHAT.format(setupChatURL(chat)))
25952
+ writeStdout(Msg.TO_SET_UP_GOOGLE_CHAT.format(setupChatURL(chat), GM.Globals[GM.OAUTH2SERVICE_JSON_DATA]['project_id']))
25953
25953
 
25954
25954
  def getSpaceName(myarg):
25955
25955
  if myarg == 'space':
@@ -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)
gam/gamlib/glmsgs.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- # Copyright (C) 2024 Ross Scroggs All Rights Reserved.
3
+ # Copyright (C) 2025 Ross Scroggs All Rights Reserved.
4
4
  #
5
5
  # All Rights Reserved.
6
6
  #
@@ -504,13 +504,15 @@ TO = 'To'
504
504
  TO_LC = 'to'
505
505
  TO_MAXIMUM_OF = 'to maximum of'
506
506
  TO_SET_UP_GOOGLE_CHAT = """
507
- To set up Google Chat for your API project, please go to:
507
+ To set up Google Chat for your current project, please go to:
508
508
 
509
509
  {0}
510
510
 
511
511
  and follow the instructions at:
512
512
 
513
513
  https://github.com/GAM-team/GAM/wiki/Chat-Bot#set-up-a-chat-bot
514
+
515
+ You'll use projects/{1}/topics/no-topic in Connection settings Cloud Pub/Sub Topic Name
514
516
  """
515
517
  TOTAL_ITEMS_IN_ENTITY = 'Total {0} in {1}'
516
518
  TRIMMED_MESSAGE_FROM_LENGTH_TO_MAXIMUM = 'Trimmed message of length {0} to maximum length {1}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.7.12
3
+ Version: 7.7.14
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
@@ -30,8 +30,8 @@ Requires-Dist: httplib2>=0.22.0
30
30
  Requires-Dist: lxml>=5.4.0
31
31
  Requires-Dist: passlib>=1.7.4
32
32
  Requires-Dist: pathvalidate>=3.2.3
33
- Requires-Dist: pyscard==2.2.1
34
33
  Requires-Dist: python-dateutil
34
+ Requires-Dist: yubikey-manager>=5.6.1
35
35
  Provides-Extra: yubikey
36
36
  Requires-Dist: yubikey-manager>=5.6.1; extra == 'yubikey'
37
37
  Description-Content-Type: text/markdown
@@ -1,4 +1,4 @@
1
- gam/__init__.py,sha256=G-u3EcbEw8f8nJNw-wbcZr5vjrebdXNbfGQSrWQZjDw,3501588
1
+ gam/__init__.py,sha256=pNA8quHXavQ-8k3mi2rD95PBjGwZiOjBjAmMBd3vSHM,3502154
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
@@ -31,7 +31,7 @@ gam/gamlib/glgapi.py,sha256=cGtvFvvBU3XQJLgtLCjs_V5VBUem_k0b5uUrK21VmeA,39491
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
34
- gam/gamlib/glmsgs.py,sha256=3wqw8Hq-l2n_TGkf7xhjQS9W6Xz5Ic2ErgsW3h-7qNM,33465
34
+ gam/gamlib/glmsgs.py,sha256=iHRQFm008jh2ZzuYCq3sLkxFtEupo9DLh1gzq_6Y41A,33562
35
35
  gam/gamlib/glskus.py,sha256=xJ1E2BZ_CGHN6I19c9i8DApb5bT5VT-hGyMEmQ5hSRY,15241
36
36
  gam/gamlib/gluprop.py,sha256=IyPLCyvn7-NHTUenM71YPQPXRZXx6CB5q-GtJ-FYd1c,11461
37
37
  gam/gamlib/glverlibs.py,sha256=A8rvegBF2nD6etbBRb8hsv-oZyjpD4VcUQ8PffW-bqU,992
@@ -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.14.dist-info/METADATA,sha256=urUdPW9nYyyyE_rjtaM_B1SCqLc8nUhIRmZ6FqpbX10,2978
69
+ gam7-7.7.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.7.14.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.7.14.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.7.14.dist-info/RECORD,,
File without changes