mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 21:01: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>]
|
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||||
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
||||||
[showwebviewlink]
|
[showwebviewlink text|hyperlink]
|
||||||
[formatjson [quotechar <Character>]]
|
[formatjson [quotechar <Character>]]
|
||||||
gam show shareddrives
|
gam show shareddrives
|
||||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||||
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
||||||
[showwebviewlink]
|
[showwebviewlink text|hyperlink]
|
||||||
[formatjson] [noorgunits [<Boolean>]]
|
[formatjson] [noorgunits [<Boolean>]]
|
||||||
|
|
||||||
gam print shareddriveorganizers [todrive <ToDriveAttribute>*]
|
gam print shareddriveorganizers [todrive <ToDriveAttribute>*]
|
||||||
@@ -4904,14 +4904,14 @@ gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
|
|||||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||||
(role|roles <SharedDriveACLRoleList>)*
|
(role|roles <SharedDriveACLRoleList>)*
|
||||||
[fields <SharedDriveFieldNameList>]
|
[fields <SharedDriveFieldNameList>]
|
||||||
[showwebviewlink]
|
[showwebviewlink text|hyperlink]
|
||||||
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
|
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
|
||||||
gam <UserTypeEntity> show shareddrives
|
gam <UserTypeEntity> show shareddrives
|
||||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||||
(role|roles <SharedDriveACLRoleList>)*
|
(role|roles <SharedDriveACLRoleList>)*
|
||||||
[fields <SharedDriveFieldNameList>]
|
[fields <SharedDriveFieldNameList>]
|
||||||
[showwebviewlink]
|
[showwebviewlink text|hyperlink]
|
||||||
[guiroles [<Boolean>]] [formatjson]
|
[guiroles [<Boolean>]] [formatjson]
|
||||||
|
|
||||||
<PermissionMatch> ::=
|
<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
|
7.10.09
|
||||||
|
|
||||||
Added option `showwebviewlink` to `gam [<UserTypeEntity>] print|show shareddrives` that
|
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>'
|
__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)'
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
#pylint: disable=wrong-import-position
|
#pylint: disable=wrong-import-position
|
||||||
@@ -65870,12 +65870,14 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
|
|||||||
'writer': 'writer',
|
'writer': 'writer',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SHOWWEBVIEWLINK_CHOICES = {'text', 'hyperlink'}
|
||||||
|
|
||||||
# gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
|
# gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
|
||||||
# [asadmin [shareddriveadminquery|query <QuerySharedDrive>]]
|
# [asadmin [shareddriveadminquery|query <QuerySharedDrive>]]
|
||||||
# [matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
# [matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||||
# (role|roles <SharedDriveACLRoleList>)*
|
# (role|roles <SharedDriveACLRoleList>)*
|
||||||
# [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
# [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
||||||
# [showwebviewlink]
|
# [showwebviewlink [text|hyperlink]]
|
||||||
# [guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
|
# [guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
|
||||||
# [showitemcountonly]
|
# [showitemcountonly]
|
||||||
# gam <UserTypeEntity> show shareddrives
|
# gam <UserTypeEntity> show shareddrives
|
||||||
@@ -65883,7 +65885,7 @@ SHAREDDRIVE_ACL_ROLES_MAP = {
|
|||||||
# [matchname <REMatchPattrn>] [orgunit|org|ou <OrgUnitPath>]
|
# [matchname <REMatchPattrn>] [orgunit|org|ou <OrgUnitPath>]
|
||||||
# (role|roles <SharedDriveACLRoleLIst>)*
|
# (role|roles <SharedDriveACLRoleLIst>)*
|
||||||
# [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
# [fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
||||||
# [showwebviewlink]
|
# [showwebviewlink [text|hyperlink]]
|
||||||
# [guiroles [<Boolean>]] [formatjson]
|
# [guiroles [<Boolean>]] [formatjson]
|
||||||
# [showitemcountonly]
|
# [showitemcountonly]
|
||||||
def printShowSharedDrives(users, useDomainAdminAccess=False):
|
def printShowSharedDrives(users, useDomainAdminAccess=False):
|
||||||
@@ -65893,7 +65895,10 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
|
|||||||
if td_ouid:
|
if td_ouid:
|
||||||
shareddrive['orgUnit'] = orgUnitIdToPathMap.get(f'id:{td_ouid}', UNKNOWN)
|
shareddrive['orgUnit'] = orgUnitIdToPathMap.get(f'id:{td_ouid}', UNKNOWN)
|
||||||
if showWebViewLink:
|
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:
|
if not showFields:
|
||||||
return shareddrive
|
return shareddrive
|
||||||
sshareddrive = {}
|
sshareddrive = {}
|
||||||
@@ -65912,7 +65917,7 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
|
|||||||
showOrgUnitPaths = True
|
showOrgUnitPaths = True
|
||||||
orgUnitIdToPathMap = None
|
orgUnitIdToPathMap = None
|
||||||
guiRoles = showItemCountOnly = False
|
guiRoles = showItemCountOnly = False
|
||||||
showWebViewLink = False
|
showWebViewLink = ''
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if csvPF and myarg == 'todrive':
|
if csvPF and myarg == 'todrive':
|
||||||
@@ -65943,7 +65948,7 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
|
|||||||
elif myarg == 'guiroles':
|
elif myarg == 'guiroles':
|
||||||
guiRoles = getBoolean()
|
guiRoles = getBoolean()
|
||||||
elif myarg == 'showwebviewlink':
|
elif myarg == 'showwebviewlink':
|
||||||
showWebViewLink = True
|
showWebViewLink = getChoice(SHOWWEBVIEWLINK_CHOICES)
|
||||||
elif myarg == 'showitemcountonly':
|
elif myarg == 'showitemcountonly':
|
||||||
showItemCountOnly = True
|
showItemCountOnly = True
|
||||||
showOrgUnitPaths = False
|
showOrgUnitPaths = False
|
||||||
|
|||||||
Reference in New Issue
Block a user