gam7 7.10.8__py3-none-any.whl → 7.10.10__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.08'
28
+ __version__ = '7.10.10'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -65800,7 +65800,7 @@ def _showSharedDrive(user, shareddrive, j, jcount, FJQC):
65800
65800
  printKeyValueList(['hidden', shareddrive['hidden']])
65801
65801
  if 'createdTime' in shareddrive:
65802
65802
  printKeyValueList(['createdTime', formatLocalTime(shareddrive['createdTime'])])
65803
- for setting in ['backgroundImageLink', 'colorRgb', 'themeId', 'orgUnit', 'orgUnitId']:
65803
+ for setting in ['backgroundImageLink', 'colorRgb', 'themeId', 'orgUnit', 'orgUnitId', 'webViewLink']:
65804
65804
  if setting in shareddrive:
65805
65805
  printKeyValueList([setting, shareddrive[setting]])
65806
65806
  if 'role' in shareddrive:
@@ -65870,11 +65870,14 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
65870
65870
  'writer': 'writer',
65871
65871
  }
65872
65872
 
65873
+ SHOWWEBVIEWLINK_CHOICES = {'text', 'hyperlink'}
65874
+
65873
65875
  # gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
65874
65876
  # [asadmin [shareddriveadminquery|query <QuerySharedDrive>]]
65875
65877
  # [matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
65876
65878
  # (role|roles <SharedDriveACLRoleList>)*
65877
65879
  # [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
65880
+ # [showwebviewlink [text|hyperlink]]
65878
65881
  # [guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
65879
65882
  # [showitemcountonly]
65880
65883
  # gam <UserTypeEntity> show shareddrives
@@ -65882,6 +65885,7 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
65882
65885
  # [matchname <REMatchPattrn>] [orgunit|org|ou <OrgUnitPath>]
65883
65886
  # (role|roles <SharedDriveACLRoleLIst>)*
65884
65887
  # [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
65888
+ # [showwebviewlink [text|hyperlink]]
65885
65889
  # [guiroles [<Boolean>]] [formatjson]
65886
65890
  # [showitemcountonly]
65887
65891
  def printShowSharedDrives(users, useDomainAdminAccess=False):
@@ -65890,6 +65894,11 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65890
65894
  td_ouid = shareddrive.get('orgUnitId')
65891
65895
  if td_ouid:
65892
65896
  shareddrive['orgUnit'] = orgUnitIdToPathMap.get(f'id:{td_ouid}', UNKNOWN)
65897
+ if showWebViewLink:
65898
+ if showWebViewLink == 'text':
65899
+ shareddrive['webViewLink'] = 'https://drive.google.com/drive/folders/'+shareddrive['id']
65900
+ else:
65901
+ shareddrive['webViewLink'] = '=HYPERLINK("https://drive.google.com/drive/folders/'+shareddrive['id']+'", "'+shareddrive['name']+'")'
65893
65902
  if not showFields:
65894
65903
  return shareddrive
65895
65904
  sshareddrive = {}
@@ -65908,6 +65917,7 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65908
65917
  showOrgUnitPaths = True
65909
65918
  orgUnitIdToPathMap = None
65910
65919
  guiRoles = showItemCountOnly = False
65920
+ showWebViewLink = ''
65911
65921
  while Cmd.ArgumentsRemaining():
65912
65922
  myarg = getArgument()
65913
65923
  if csvPF and myarg == 'todrive':
@@ -65937,6 +65947,8 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65937
65947
  showOrgUnitPaths = not getBoolean()
65938
65948
  elif myarg == 'guiroles':
65939
65949
  guiRoles = getBoolean()
65950
+ elif myarg == 'showwebviewlink':
65951
+ showWebViewLink = getChoice(SHOWWEBVIEWLINK_CHOICES)
65940
65952
  elif myarg == 'showitemcountonly':
65941
65953
  showItemCountOnly = True
65942
65954
  showOrgUnitPaths = False
@@ -65961,6 +65973,14 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
65961
65973
  orgUnitIdToPathMap = getOrgUnitIdToPathMap(cd)
65962
65974
  if showFields:
65963
65975
  showFields.add('orgUnit')
65976
+ if showWebViewLink:
65977
+ if showFields:
65978
+ showFields.add('webViewLink')
65979
+ if csvPF:
65980
+ csvPF.AddTitle('webViewLink')
65981
+ if FJQC.formatJSON:
65982
+ csvPF.AddJSONTitles(['webViewLink'])
65983
+ csvPF.MoveJSONTitlesToEnd(['JSON'])
65964
65984
  i, count, users = getEntityArgument(users)
65965
65985
  for user in users:
65966
65986
  i += 1
@@ -66029,6 +66049,8 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
66029
66049
  row = {'User': user, 'id': shareddrive['id'], 'name': shareddrive['name']}
66030
66050
  if not useDomainAdminAccess:
66031
66051
  row['role'] = shareddrive['role'] if not guiRoles else SHAREDDRIVE_API_GUI_ROLES_MAP[shareddrive['role']]
66052
+ if showWebViewLink:
66053
+ row['webViewLink'] = shareddrive['webViewLink']
66032
66054
  row['JSON'] = json.dumps(cleanJSON(shareddrive, timeObjects=SHAREDDRIVE_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)
66033
66055
  csvPF.WriteRow(row)
66034
66056
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.10.8
3
+ Version: 7.10.10
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=dylNcZjzYccpgDnK8eV0UehP3HfMc_XbIv8AW7NKuf8,3534966
1
+ gam/__init__.py,sha256=C5XqLpxD3To__hnP3UlucBFjppN3jz8SHVudZbR_7Xk,3535865
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.10.8.dist-info/METADATA,sha256=aj7mavAYxuN9vF7DjO56zXVMgQoY2BW2SkVq27MFCv8,2978
69
- gam7-7.10.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.10.8.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.10.8.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.10.8.dist-info/RECORD,,
68
+ gam7-7.10.10.dist-info/METADATA,sha256=D8BHGKv5ivgdoRH1-SiRtsqbdjK1Bqgb7ZFJ2-kTV08,2979
69
+ gam7-7.10.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.10.10.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.10.10.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.10.10.dist-info/RECORD,,
File without changes