gam7 7.18.1__py3-none-any.whl → 7.18.3__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.18.01'
28
+ __version__ = '7.18.03'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -10672,9 +10672,6 @@ Select all default scopes by entering an 's'; yields [*] for default scopes, [ ]
10672
10672
  Unselect all scopes by entering a 'u'; yields [ ] for all scopes
10673
10673
  Exit without changes/authorization by entering an 'e'
10674
10674
  Continue to authorization by entering a 'c'
10675
- '''
10676
- if clientAccess:
10677
- oauth2_menu += ''' Note, if all scopes are selected, Google will probably generate an authorization error
10678
10675
  '''
10679
10676
  menu = oauth2_menu % tuple(range(numScopes))
10680
10677
  selectedScopes = ['*'] * numScopes
@@ -10776,7 +10773,25 @@ Continue to authorization by entering a 'c'
10776
10773
  break
10777
10774
  sys.stdout.write(f'{ERROR_PREFIX}Invalid input "{choice}"\n')
10778
10775
  if selection == 'c':
10779
- break
10776
+ if clientAccess:
10777
+ numSelectedScopes = 0
10778
+ i = 0
10779
+ for a_scope in scopesList:
10780
+ if selectedScopes[i] == '*':
10781
+ if a_scope['scope']:
10782
+ numSelectedScopes += 1
10783
+ elif selectedScopes[i] != ' ':
10784
+ numSelectedScopes += 1
10785
+ i += 1
10786
+ if numSelectedScopes <= API.NUM_CLIENT_SCOPES_ERROR_LIMIT:
10787
+ break
10788
+ # If number of scopes is > 48 we'll probably get an error
10789
+ writeStdout(Msg.NUM_SELECTED_CLIENT_SCOPES.format(numSelectedScopes, API.NUM_CLIENT_SCOPES_ERROR_LIMIT))
10790
+ choice = readStdin('\nPlease enter c to continue to authorization or any other key to amend selection: ')
10791
+ if choice and choice.lower() == 'c':
10792
+ break
10793
+ else:
10794
+ break
10780
10795
  return selectedScopes
10781
10796
 
10782
10797
  def _localhost_to_ip():
gam/gamlib/glapi.py CHANGED
@@ -119,6 +119,7 @@ USERINFO_PROFILE_SCOPE = 'https://www.googleapis.com/auth/userinfo.profile' # pr
119
119
  VAULT_SCOPES = ['https://www.googleapis.com/auth/ediscovery', 'https://www.googleapis.com/auth/ediscovery.readonly']
120
120
  REQUIRED_SCOPES = [USERINFO_EMAIL_SCOPE, USERINFO_PROFILE_SCOPE]
121
121
  REQUIRED_SCOPES_SET = set(REQUIRED_SCOPES)
122
+ NUM_CLIENT_SCOPES_ERROR_LIMIT = 48
122
123
  #
123
124
  JWT_APIS = {
124
125
  ACCESSCONTEXTMANAGER: [CLOUD_PLATFORM_SCOPE],
gam/gamlib/glmsgs.py CHANGED
@@ -433,6 +433,7 @@ NO_SVCACCT_ACCESS_ALLOWED = 'No Service Account Access allowed'
433
433
  NO_TRANSFER_LACK_OF_DISK_SPACE = 'Transfer not performed due to lack of target drive space.'
434
434
  NO_USAGE_PARAMETERS_DATA_AVAILABLE = 'No usage parameters data available.'
435
435
  NO_USER_COUNTS_DATA_AVAILABLE = 'No User counts data available.'
436
+ NUM_SELECTED_CLIENT_SCOPES = '\n{0} scopes are selected, if more than {1} scopes are selected, Google will probably generate a "Something went wrong" error\n'
436
437
  OAUTH2_GO_TO_LINK_MESSAGE = """
437
438
  Go to the following link in a browser on this computer or on another computer:
438
439
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.18.1
3
+ Version: 7.18.3
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=LLcHrGsoakwCpuZYjaorAZYoRB8twyEGao6HIQA-gQg,3574736
1
+ gam/__init__.py,sha256=IuejoFwuNltKresUI9ioszMMmb8xBs9LjSpjHZJwIkE,3575349
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
@@ -23,7 +23,7 @@ gam/atom/token_store.py,sha256=7E6Ecvxa86WCvl1pJAhv78jg9OxQv8pMtIUcPhZCq04,3803
23
23
  gam/atom/url.py,sha256=pxO1TlORxyKQTQ1bkBE1unFzjnv9c8LjJkm-UEORShY,4276
24
24
  gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
25
25
  gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
26
- gam/gamlib/glapi.py,sha256=kjiB-6k4B7l1XIHdWZzW5woBtrViwfvE6cjwQVjijVw,35725
26
+ gam/gamlib/glapi.py,sha256=YPa_XvdoltFLSSrZOZ9thAwrAB_PU9BzJAIO6cUOSWI,35760
27
27
  gam/gamlib/glcfg.py,sha256=J4w16Nfk282S7iuSmk3601GHgt_MJ4qWeSzF5y7ZzX0,28139
28
28
  gam/gamlib/glclargs.py,sha256=u4OFdkNogXVBV7K7oH4pXTc8TmAEJPvnqy3r0NblD60,43800
29
29
  gam/gamlib/glentity.py,sha256=WsSwlzwgp3uwYLDu8t5seFNKoZ9Bj0bTGRjTXcC56Ro,34694
@@ -31,7 +31,7 @@ gam/gamlib/glgapi.py,sha256=pdBbwNtnCwFWxJGaP-_3hdTjSNoOCJF2yo76WdQOi1k,40426
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=c6ff4fetFjcMtOA37-jdkNNdQVgmFgbkzoUPt99vcpI,33804
34
+ gam/gamlib/glmsgs.py,sha256=Acd7kdtYcBJwTxQIosXR3cEc4ze8yeMQvFMlFb9e9Qs,33963
35
35
  gam/gamlib/glskus.py,sha256=e1u3zw1MGQjBgAFXqjrGWQl2d7eYpVlMYGpIKNwjskQ,15360
36
36
  gam/gamlib/gluprop.py,sha256=IyPLCyvn7-NHTUenM71YPQPXRZXx6CB5q-GtJ-FYd1c,11461
37
37
  gam/gamlib/glverlibs.py,sha256=xoQXiwcE_-HVYKv-VYA8O0mazRsc9mN-_ysj1dAlMyc,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.18.1.dist-info/METADATA,sha256=nKF2U5OFqxRrUcplrUrgwTDQgDuGQNDKq-NiF35fUmU,2940
69
- gam7-7.18.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.18.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.18.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.18.1.dist-info/RECORD,,
68
+ gam7-7.18.3.dist-info/METADATA,sha256=ai7pzoGdGh0EOpT7wsAyrIymufCu77HLCsu8qs51jMQ,2940
69
+ gam7-7.18.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.18.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.18.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.18.3.dist-info/RECORD,,
File without changes