mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 12:51:36 +00:00
Updated the defaults in gam print shareddriveorganizers to match the most common use case, not the script.
This commit is contained in:
@@ -1,3 +1,21 @@
|
|||||||
|
7.08.02
|
||||||
|
|
||||||
|
Updated the defaults in `gam print shareddriveorganizers` to match the most common use case, not the script.
|
||||||
|
|
||||||
|
* `domainlist` - The workspace primary domain
|
||||||
|
* `includetypes` - user
|
||||||
|
* `oneorganizer` - True
|
||||||
|
* `shownoorganizerdrives` - True
|
||||||
|
* `includefileorganizers` - False
|
||||||
|
|
||||||
|
To select organizers from any domain, use: `domainlist ""`
|
||||||
|
|
||||||
|
These commands produce the same result.
|
||||||
|
```
|
||||||
|
gam redirect csv ./TeamDriveOrganizers.csv print shareddriveorganizers domainlist mydomain.com includetypes user oneorganizer shownoorganizerdrives
|
||||||
|
gam redirect csv ./TeamDriveOrganizers.csv print shareddriveorganizers
|
||||||
|
```
|
||||||
|
|
||||||
7.08.01
|
7.08.01
|
||||||
|
|
||||||
Added option `shareddrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))` to
|
Added option `shareddrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))` to
|
||||||
|
|||||||
@@ -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.08.01'
|
__version__ = '7.08.02'
|
||||||
__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
|
||||||
@@ -12338,7 +12338,7 @@ def checkServiceAccount(users):
|
|||||||
invalidOauth2serviceJsonExit(f'Authentication{auth_error}')
|
invalidOauth2serviceJsonExit(f'Authentication{auth_error}')
|
||||||
_getSvcAcctData() # needed to read in GM.OAUTH2SERVICE_JSON_DATA
|
_getSvcAcctData() # needed to read in GM.OAUTH2SERVICE_JSON_DATA
|
||||||
if GM.Globals[GM.SVCACCT_SCOPES_DEFINED] and API.IAM not in GM.Globals[GM.SVCACCT_SCOPES]:
|
if GM.Globals[GM.SVCACCT_SCOPES_DEFINED] and API.IAM not in GM.Globals[GM.SVCACCT_SCOPES]:
|
||||||
GM.Globals[GM.SVCACCT_SCOPES][API.IAM] = [API.CLOUD_PLATFORM_SCOPE]
|
GM.Globals[GM.SVCACCT_SCOPES][API.IAM] = [API.IAM_SCOPE]
|
||||||
key_type = GM.Globals[GM.OAUTH2SERVICE_JSON_DATA].get('key_type', 'default')
|
key_type = GM.Globals[GM.OAUTH2SERVICE_JSON_DATA].get('key_type', 'default')
|
||||||
if key_type == 'default':
|
if key_type == 'default':
|
||||||
printMessage(Msg.SERVICE_ACCOUNT_CHECK_PRIVATE_KEY_AGE)
|
printMessage(Msg.SERVICE_ACCOUNT_CHECK_PRIVATE_KEY_AGE)
|
||||||
@@ -66071,8 +66071,8 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|||||||
showNoOrganizerDrives = SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP['false']
|
showNoOrganizerDrives = SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP['false']
|
||||||
fieldsList = ['role', 'type', 'emailAddress']
|
fieldsList = ['role', 'type', 'emailAddress']
|
||||||
cd = entityList = orgUnitId = query = matchPattern = None
|
cd = entityList = orgUnitId = query = matchPattern = None
|
||||||
domainList = []
|
domainList = [GC.Values[GC.DOMAIN]]
|
||||||
oneOrganizer = False
|
oneOrganizer = True
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if csvPF and myarg == 'todrive':
|
if csvPF and myarg == 'todrive':
|
||||||
@@ -66104,7 +66104,7 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|||||||
elif myarg in ADMIN_ACCESS_OPTIONS:
|
elif myarg in ADMIN_ACCESS_OPTIONS:
|
||||||
useDomainAdminAccess = True
|
useDomainAdminAccess = True
|
||||||
elif myarg == 'domainlist':
|
elif myarg == 'domainlist':
|
||||||
domainList = set(getString(Cmd.OB_DOMAIN_NAME_LIST).replace(',', ' ').lower().split())
|
domainList = set(getString(Cmd.OB_DOMAIN_NAME_LIST, minLen=0).replace(',', ' ').lower().split())
|
||||||
elif myarg == 'includetypes':
|
elif myarg == 'includetypes':
|
||||||
for itype in getString(Cmd.OB_ORGANIZER_TYPE_LIST).lower().replace(',', ' ').split():
|
for itype in getString(Cmd.OB_ORGANIZER_TYPE_LIST).lower().replace(',', ' ').split():
|
||||||
if itype in PRINT_ORGANIZER_TYPES:
|
if itype in PRINT_ORGANIZER_TYPES:
|
||||||
@@ -66133,7 +66133,7 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
|||||||
usageErrorExit(Msg.ONLY_ADMINISTRATORS_CAN_SPECIFY_SHARED_DRIVE_ORGUNIT)
|
usageErrorExit(Msg.ONLY_ADMINISTRATORS_CAN_SPECIFY_SHARED_DRIVE_ORGUNIT)
|
||||||
csvPF.AddTitles(['orgUnit', 'orgUnitId'])
|
csvPF.AddTitles(['orgUnit', 'orgUnitId'])
|
||||||
if not includeTypes:
|
if not includeTypes:
|
||||||
includeTypes = PRINT_ORGANIZER_TYPES
|
includeTypes = set(['user'])
|
||||||
fields = getItemFieldsFromFieldsList('permissions', fieldsList, True)
|
fields = getItemFieldsFromFieldsList('permissions', fieldsList, True)
|
||||||
i, count, users = getEntityArgument(users)
|
i, count, users = getEntityArgument(users)
|
||||||
for user in users:
|
for user in users:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (C) 2024 Ross Scroggs All Rights Reserved.
|
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||||
#
|
#
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
@@ -649,7 +649,7 @@ _SVCACCT_SCOPES = [
|
|||||||
'api': IAM,
|
'api': IAM,
|
||||||
'offByDefault': True,
|
'offByDefault': True,
|
||||||
'subscopes': [],
|
'subscopes': [],
|
||||||
'scope': 'https://www.googleapis.com/auth/iam'},
|
'scope': IAM_SCOPE},
|
||||||
{'name': 'Keep API',
|
{'name': 'Keep API',
|
||||||
'api': KEEP,
|
'api': KEEP,
|
||||||
'subscopes': READONLY,
|
'subscopes': READONLY,
|
||||||
|
|||||||
Reference in New Issue
Block a user