Compare commits

...

2 Commits

Author SHA1 Message Date
Ross Scroggs
170e188f1f Added choices text and hyperlink to option showwebviewlink 2025-06-30 12:11:05 -07:00
Ross Scroggs
60d6188769 Added option showwebviewlink to gam print|show shareddrives
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Push wiki / pushwiki (push) Has been cancelled
2025-06-30 09:43:50 -07:00
8 changed files with 44 additions and 21 deletions

View File

@@ -4817,13 +4817,13 @@ gam print shareddrives [todrive <ToDriveAttribute>*]
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[showwebviewlink]
[showwebviewlink text|hyperlink]
[formatjson [quotechar <Character>]]
gam show shareddrives
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
[showwebviewlink]
[showwebviewlink text|hyperlink]
[formatjson] [noorgunits [<Boolean>]]
gam print shareddriveorganizers [todrive <ToDriveAttribute>*]
@@ -4904,14 +4904,14 @@ gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[showwebviewlink]
[showwebviewlink text|hyperlink]
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
gam <UserTypeEntity> show shareddrives
[teamdriveadminquery|query <QueryTeamDrive>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
(role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[showwebviewlink]
[showwebviewlink text|hyperlink]
[guiroles [<Boolean>]] [formatjson]
<PermissionMatch> ::=

View File

@@ -1,3 +1,9 @@
7.10.10
Added choices `text` and `hyperlink` to option `showwebviewlink` in `gam [<UserTypeEntity>] print|show shareddrives`.
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
* `showwebviewlink hyperlink` - Dsiplays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveNamw>")
7.10.09
Added option `showwebviewlink` to `gam [<UserTypeEntity>] print|show shareddrives` that

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.10.09'
__version__ = '7.10.10'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -65870,12 +65870,14 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
'writer': 'writer',
}
SHOWWEBVIEWLINK_CHOICES = {'text', 'hyperlink'}
# gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
# [asadmin [shareddriveadminquery|query <QuerySharedDrive>]]
# [matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
# (role|roles <SharedDriveACLRoleList>)*
# [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
# [showwebviewlink]
# [showwebviewlink [text|hyperlink]]
# [guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
# [showitemcountonly]
# gam <UserTypeEntity> show shareddrives
@@ -65883,7 +65885,7 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
# [matchname <REMatchPattrn>] [orgunit|org|ou <OrgUnitPath>]
# (role|roles <SharedDriveACLRoleLIst>)*
# [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
# [showwebviewlink]
# [showwebviewlink [text|hyperlink]]
# [guiroles [<Boolean>]] [formatjson]
# [showitemcountonly]
def printShowSharedDrives(users, useDomainAdminAccess=False):
@@ -65893,7 +65895,10 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
if td_ouid:
shareddrive['orgUnit'] = orgUnitIdToPathMap.get(f'id:{td_ouid}', UNKNOWN)
if showWebViewLink:
shareddrive['webViewLink'] = 'https://drive.google.com/drive/folders/'+shareddrive['id']
if showWebViewLink == 'text':
shareddrive['webViewLink'] = 'https://drive.google.com/drive/folders/'+shareddrive['id']
else:
shareddrive['webViewLink'] = '=HYPERLINK("https://drive.google.com/drive/folders/'+shareddrive['id']+'", "'+shareddrive['name']+'")'
if not showFields:
return shareddrive
sshareddrive = {}
@@ -65912,7 +65917,7 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
showOrgUnitPaths = True
orgUnitIdToPathMap = None
guiRoles = showItemCountOnly = False
showWebViewLink = False
showWebViewLink = ''
while Cmd.ArgumentsRemaining():
myarg = getArgument()
if csvPF and myarg == 'todrive':
@@ -65943,7 +65948,7 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
elif myarg == 'guiroles':
guiRoles = getBoolean()
elif myarg == 'showwebviewlink':
showWebViewLink = True
showWebViewLink = getChoice(SHOWWEBVIEWLINK_CHOICES)
elif myarg == 'showitemcountonly':
showItemCountOnly = True
showOrgUnitPaths = False

View File

@@ -10,6 +10,11 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.10.09
Added option `showwebviewlink` to `gam [<UserTypeEntity>] print|show shareddrives` that
displays the web view link for the Shared Drive: `https://drive.google.com/drive/folders/<SharedDriveID>`.
### 7.10.08
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option

View File

@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin$ gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAM 7.10.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.10.09 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt.
C:\>del C:\GAMConfig\oauth2.txt
C:\>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAM 7.10.08 - https://github.com/GAM-team/GAM - pythonsource
GAM 7.10.09 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
Windows-10-10.0.17134 AMD64

View File

@@ -372,7 +372,9 @@ By default, Gam displays the information as an indented list of keys and values.
gam [<UserTypeEntity>] show shareddrives
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[fields <SharedDriveFieldNameList>] [formatjson]
[fields <SharedDriveFieldNameList>]
[showwebviewlink]
[formatjson]
```
By default, all Shared Drives are displayed; use the following options to select a subset of Shared Drives:
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives
@@ -385,7 +387,9 @@ By default, Gam displays the information as an indented list of keys and values.
gam [<UserTypeEntity>] print shareddrives [todrive <ToDriveAttribute>*]
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
[fields <SharedDriveFieldNameList>] [formatjson [quotechar <Character>]]
[fields <SharedDriveFieldNameList>]
[showwebviewlink]
[formatjson [quotechar <Character>]]
```
By default, all Shared Drives are displayed; use the following options to select a subset of Shared Drives:
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives

View File

@@ -318,6 +318,7 @@ gam <UserTypeEntity> show shareddriveinfo <SharedDriveEntity>
gam <UserTypeEntity> show shareddrives
[matchname <REMatchPattern>] (role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>]
[showwebviewlink]
[guiroles [<Boolean>] [formatjson]
```
By default, Gam displays all Teams Drives accessible by the user.
@@ -329,7 +330,9 @@ By default, Gam displays the information as an indented list of keys and values.
```
gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
[matchname <REMatchPattern>] (role|roles <SharedDriveACLRoleList>)*
[fields <SharedDriveFieldNameList>] [formatjson [quotechar <Character>]]
[fields <SharedDriveFieldNameList>]
[showwebviewlink]
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
```
By default, Gam displays all Teams Drives accessible by the user.
* `matchname <REMatchPattern>` - Display Shared Drives with names that match a pattern.

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.10.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.10.09 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information
```
gam version timeoffset
GAM 7.10.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.10.09 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information
```
gam version extended
GAM 7.10.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.10.09 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7
Version Check:
Current: 5.35.08
Latest: 7.10.08
Latest: 7.10.09
echo $?
1
```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details
```
gam version simple
7.10.08
7.10.09
```
In Linux/MacOS you can do:
```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 7.10.08 - https://github.com/GAM-team/GAM
GAM 7.10.09 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64