mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Added choices text and hyperlink to option showwebviewlink
This commit is contained in:
@@ -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> ::=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user