mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-07 07:41:38 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f12d3abfc1 | ||
|
|
474aa069b7 | ||
|
|
c49708cbae | ||
|
|
43ecba07bb | ||
|
|
51f8ebe8e2 | ||
|
|
28edce3aca | ||
|
|
fe1f0285f8 | ||
|
|
da83121d0d | ||
|
|
f58a69e374 | ||
|
|
2f40a164c5 | ||
|
|
58a3fa7313 | ||
|
|
39ce5b7349 | ||
|
|
860d44d819 | ||
|
|
5e90ff143e | ||
|
|
28e05bf09a | ||
|
|
0781e27993 | ||
|
|
a441dddc06 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -126,7 +126,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20250603
|
||||
key: gam-${{ matrix.jid }}-20250611
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
|
||||
@@ -2725,6 +2725,7 @@ gam print chromschemas [todrive <ToDriveAttribute>*]
|
||||
<ChromePolicySchemaFieldName>* [fields <ChromePolicySchemaFieldNameList>]
|
||||
[[formatjson [quotechar <Character>]]
|
||||
|
||||
gam info chromeschema std <SchemaName>
|
||||
gam show chromeschemas std
|
||||
[filter <String>]
|
||||
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
7.09.04
|
||||
|
||||
Fixed bug in `gam whatis <EmailItem>` where the check for an invitable user always failed.
|
||||
|
||||
Fixed bug in `gam print shareddriveorganizers` where no organizers were displayed when `domain` in `gam.cfg` was blank.
|
||||
|
||||
Updated to Python 3.13.5
|
||||
|
||||
7.09.03
|
||||
|
||||
Updated `gam <UserTypeEntity> create focustime|outofoffice ... timerange <Time> <Time>` to check
|
||||
that the first `<Time>` is less than the second `Time`; previously the event was not created.
|
||||
|
||||
For new installs the `enforce_expansive_access` Boolean variable in `gam.cfg` now defaults to True.
|
||||
For existing installations, if `enforce_expansive_access` has not been added to `gam.cfg`,
|
||||
a default value of True will be used.
|
||||
|
||||
7.09.02
|
||||
|
||||
Added command `gam info chromeschema std <SchemaName>` to display a Chrome policy schema in the same format as Legacy GAM.
|
||||
|
||||
Improved output of `gam show chromeschemas [std]` and `gam info chromeschema [std]` to more accurately display the schemas.
|
||||
|
||||
7.09.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print diskusage` where the `ownedByMe` column was
|
||||
blank for the top folder.
|
||||
|
||||
Fixed bug in `gam update chromepolicy` where the following error was generated
|
||||
when updating policies with simple numerical values.
|
||||
```
|
||||
ERROR: Missing argument: Expected <value>"
|
||||
```
|
||||
|
||||
7.09.00
|
||||
|
||||
Removed the overly broad service account `IAM and Access Management API` scope `https://www.googleapis.com/auth/cloud-platform`
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.09.00'
|
||||
__version__ = '7.09.04'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -13138,7 +13138,7 @@ def doWhatIs():
|
||||
entityUnknownWarning(Ent.EMAIL, email)
|
||||
setSysExitRC(ENTITY_IS_UKNOWN_RC)
|
||||
return
|
||||
if not invitableCheck or not getSvcAcctCredentials(API.CLOUDIDENTITY_USERINVITATIONS, _getAdminEmail(), softErrors=True):
|
||||
if not invitableCheck:
|
||||
isInvitableUser = False
|
||||
else:
|
||||
isInvitableUser, ci = _getIsInvitableUser(None, email)
|
||||
@@ -25947,7 +25947,7 @@ def exitIfChatNotConfigured(chat, kvList, errMsg, i, count):
|
||||
if (('No bot associated with this project.' in errMsg) or
|
||||
('Invalid project number.' in errMsg) or
|
||||
('Google Chat app not found.' in errMsg)):
|
||||
systemErrorExit(API_ACCESS_DENIED_RC, Msg.TO_SET_UP_GOOGLE_CHAT.format(setupChatURL(chat)))
|
||||
systemErrorExit(API_ACCESS_DENIED_RC, Msg.TO_SET_UP_GOOGLE_CHAT.format(setupChatURL(chat), GM.Globals[GM.OAUTH2SERVICE_JSON_DATA]['project_id']))
|
||||
entityActionFailedWarning(kvList, errMsg, i, count)
|
||||
|
||||
def _getChatAdminAccess(adminAPI, userAPI):
|
||||
@@ -28118,7 +28118,10 @@ def simplifyChromeSchema(schema):
|
||||
'settings': {}
|
||||
}
|
||||
fieldDescriptions = schema['fieldDescriptions']
|
||||
savedSettingName = ''
|
||||
savedTypeName = ''
|
||||
for mtype in schema['definition']['messageType']:
|
||||
numSettings = len(mtype['field'])
|
||||
for setting in mtype['field']:
|
||||
setting_name = setting['name']
|
||||
setting_dict = {'name': setting_name,
|
||||
@@ -28126,6 +28129,9 @@ def simplifyChromeSchema(schema):
|
||||
'descriptions': [],
|
||||
'type': setting['type'],
|
||||
}
|
||||
if mtype['name'] == savedTypeName and numSettings == 1:
|
||||
setting_dict['name'] = savedSettingName
|
||||
savedTypeName = ''
|
||||
if setting_dict['type'] == 'TYPE_STRING' and setting.get('label') == 'LABEL_REPEATED':
|
||||
setting_dict['type'] = 'TYPE_LIST'
|
||||
if setting_dict['type'] == 'TYPE_ENUM':
|
||||
@@ -28147,6 +28153,8 @@ def simplifyChromeSchema(schema):
|
||||
break
|
||||
break
|
||||
elif setting_dict['type'] == 'TYPE_MESSAGE':
|
||||
savedSettingName = setting_name
|
||||
savedTypeName = setting['typeName']
|
||||
continue
|
||||
else:
|
||||
setting_dict['enums'] = None
|
||||
@@ -28252,14 +28260,11 @@ def doDeleteChromePolicy():
|
||||
entityActionFailedWarning(kvList, str(e))
|
||||
|
||||
CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
# duration
|
||||
'chrome.users.AutoUpdateCheckPeriodNewV2':
|
||||
{'autoupdatecheckperiodminutesnew':
|
||||
{'casedField': 'autoUpdateCheckPeriodMinutesNew',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 720}},
|
||||
'chrome.users.Avatar':
|
||||
{'useravatarimage':
|
||||
{'casedField': 'userAvatarImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.users.BrowserSwitcherDelayDurationV2':
|
||||
{'browserswitcherdelayduration':
|
||||
{'casedField': 'browserSwitcherDelayDuration',
|
||||
@@ -28301,10 +28306,6 @@ CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
{'maxinvalidationfetchdelay':
|
||||
{'casedField': 'maxInvalidationFetchDelay',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 30, 'default': 10}},
|
||||
'chrome.users.PrintingMaxSheetsAllowed':
|
||||
{'printingmaxsheetsallowednullable':
|
||||
{'casedField': 'printingMaxSheetsAllowedNullable',
|
||||
'type': 'value', 'minVal': 1, 'maxVal': None}},
|
||||
'chrome.users.PrintJobHistoryExpirationPeriodNewV2':
|
||||
{'printjobhistoryexpirationperioddaysnew':
|
||||
{'casedField': 'printJobHistoryExpirationPeriodDaysNew',
|
||||
@@ -28312,7 +28313,16 @@ CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
'chrome.users.RelaunchNotificationWithDurationV2':
|
||||
{'relaunchnotificationperiodduration':
|
||||
{'casedField': 'relaunchNotificationPeriodDuration',
|
||||
'type': 'duration', 'minVal': -1, 'maxVal': None}},
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 168},
|
||||
'relaunchinitialquietperiodduration':
|
||||
{'casedField': 'relaunchInitialQuietPeriodDuration',
|
||||
'type': 'duration', 'minVal': 0, 'maxVal': None},
|
||||
'relaunchwindowstarttime':
|
||||
{'casedField': 'relaunchWindowStartTime',
|
||||
'type': 'timeOfDay'},
|
||||
'relaunchwindowdurationmin':
|
||||
{'casedField': 'relaunchWindowDurationMin',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 1440}},
|
||||
'chrome.users.SecurityTokenSessionSettingsV2':
|
||||
{'securitytokensessionnotificationseconds':
|
||||
{'casedField': 'securityTokenSessionNotificationSeconds',
|
||||
@@ -28328,10 +28338,6 @@ CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
'updatessuppressedstarttime':
|
||||
{'casedField': 'updatesSuppressedStartTime',
|
||||
'type': 'timeOfDay'}},
|
||||
'chrome.users.Wallpaper':
|
||||
{'wallpaperimage':
|
||||
{'casedField': 'wallpaperImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.devices.EnableReportUploadFrequencyV2':
|
||||
{'reportdeviceuploadfrequency':
|
||||
{'casedField': 'reportDeviceUploadFrequency',
|
||||
@@ -28340,10 +28346,6 @@ CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
{'uptimelimitduration':
|
||||
{'casedField': 'uptimeLimitDuration',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 365}},
|
||||
'chrome.devices.SignInWallpaperImage':
|
||||
{'devicewallpaperimage':
|
||||
{'casedField': 'deviceWallpaperImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.devices.kiosk.AcPowerSettingsV2':
|
||||
{'acidletimeout':
|
||||
{'casedField': 'acIdleTimeout',
|
||||
@@ -28370,10 +28372,6 @@ CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
'batteryscreenofftimeout':
|
||||
{'casedField': 'batteryScreenOffTimeout',
|
||||
'type': 'duration', 'minVal': 0, 'maxVal': 35000}},
|
||||
'chrome.devices.managedguest.Avatar':
|
||||
{'useravatarimage':
|
||||
{'casedField': 'userAvatarImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.devices.managedguest.BrowsingDataLifetimeV2':
|
||||
{'browsinghistoryttl':
|
||||
{'casedField': 'browsingHistoryTtl',
|
||||
@@ -28415,6 +28413,56 @@ CHROME_SCHEMA_SPECIAL_CASES = {
|
||||
{'sessiondurationlimit':
|
||||
{'casedField': 'sessionDurationLimit',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 1440}},
|
||||
# value
|
||||
'chrome.users.GaiaLockScreenOfflineSigninTimeLimitDays':
|
||||
{'gaialockscreenofflinesignintimelimitdays':
|
||||
{'casedField': 'gaiaLockScreenOfflineSigninTimeLimitDays',
|
||||
'type': 'value', 'minVal': 0, 'maxVal': 365}},
|
||||
'chrome.users.GaiaOfflineSigninTimeLimitDays':
|
||||
{'gaiaofflinesignintimelimitdays':
|
||||
{'casedField': 'gaiaOfflineSigninTimeLimitDays',
|
||||
'type': 'value', 'minVal': 0, 'maxVal': 365}},
|
||||
'chrome.users.PrintingMaxSheetsAllowed':
|
||||
{'printingmaxsheetsallowednullable':
|
||||
{'casedField': 'printingMaxSheetsAllowedNullable',
|
||||
'type': 'value', 'minVal': 1, 'maxVal': None}},
|
||||
'chrome.users.RemoteAccessHostClipboardSizeBytes':
|
||||
{'remoteaccesshostclipboardsizebytes':
|
||||
{'casedField': 'remoteAccessHostClipboardSizeBytes',
|
||||
'type': 'value', 'minVal': 0, 'maxVal': 2147483647}},
|
||||
'chrome.users.SamlLockScreenOfflineSigninTimeLimitDays':
|
||||
{'samllockscreenofflinesignintimelimitdays':
|
||||
{'casedField': 'samlLockScreenOfflineSigninTimeLimitDays',
|
||||
'type': 'value', 'minVal': 0, 'maxVal': 365}},
|
||||
'chrome.devices.ExtensionCacheSize':
|
||||
{'extensioncachesize':
|
||||
{'casedField': 'extensionCacheSize',
|
||||
'type': 'value', 'minVal': 1048576, 'maxVal': None, 'default': 268435456}},
|
||||
'chrome.devices.managedguest.PrintingMaxSheetsAllowed':
|
||||
{'printingmaxsheetsallowednullable':
|
||||
{'casedField': 'printingMaxSheetsAllowedNullable',
|
||||
'type': 'value', 'minVal': 1, 'maxVal': None}},
|
||||
'chrome.devices.managedguest.RemoteAccessHostClipboardSizeBytes':
|
||||
{'remoteaccesshostclipboardsizebytes':
|
||||
{'casedField': 'remoteAccessHostClipboardSizeBytes',
|
||||
'type': 'value', 'minVal': 0, 'maxVal': 2147483647}},
|
||||
# downloadUri
|
||||
'chrome.users.Avatar':
|
||||
{'useravatarimage':
|
||||
{'casedField': 'userAvatarImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.users.Wallpaper':
|
||||
{'wallpaperimage':
|
||||
{'casedField': 'wallpaperImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.devices.SignInWallpaperImage':
|
||||
{'devicewallpaperimage':
|
||||
{'casedField': 'deviceWallpaperImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.devices.managedguest.Avatar':
|
||||
{'useravatarimage':
|
||||
{'casedField': 'userAvatarImage',
|
||||
'type': 'downloadUri'}},
|
||||
'chrome.devices.managedguest.Wallpaper':
|
||||
{'wallpaperimage':
|
||||
{'casedField': 'wallpaperImage',
|
||||
@@ -28436,7 +28484,7 @@ def doUpdateChromePolicy():
|
||||
return value
|
||||
#if vtype == timeOfDay:
|
||||
hours, minutes = value.split(':')
|
||||
return {vtype: {'hours': hours, 'minutes': minutes}}
|
||||
return {vtype: {'hours': int(hours), 'minutes': int(minutes)}}
|
||||
|
||||
cp = buildGAPIObject(API.CHROMEPOLICY)
|
||||
cd = buildGAPIObject(API.DIRECTORY)
|
||||
@@ -28892,7 +28940,7 @@ def _showChromePolicySchema(schema, FJQC, i=0, count=0):
|
||||
return
|
||||
printEntity([Ent.CHROME_POLICY_SCHEMA, schema['name']], i, count)
|
||||
Ind.Increment()
|
||||
showJSON(None, schema)
|
||||
showJSON(None, schema, dictObjectsKey={'messageType': 'name', 'field': 'name', 'fieldDescriptions': 'field'})
|
||||
Ind.Decrement()
|
||||
|
||||
CHROME_POLICY_SCHEMA_FIELDS_CHOICE_MAP = {
|
||||
@@ -28915,6 +28963,9 @@ CHROME_POLICY_SCHEMA_FIELDS_CHOICE_MAP = {
|
||||
# [formatjson]
|
||||
def doInfoChromePolicySchemas():
|
||||
cp = buildGAPIObject(API.CHROMEPOLICY)
|
||||
if checkArgumentPresent('std'):
|
||||
doInfoChromePolicySchemasStd(cp)
|
||||
return
|
||||
FJQC = FormatJSONQuoteChar()
|
||||
fieldsList = []
|
||||
name = _getChromePolicySchemaName()
|
||||
@@ -28943,7 +28994,7 @@ def doInfoChromePolicySchemas():
|
||||
# [filter <String>]
|
||||
# <ChromePolicySchemaFieldName>* [fields <ChromePolicySchemaFieldNameList>]
|
||||
# [[formatjson [quotechar <Character>]]
|
||||
def doPrintShowChromeSchemas():
|
||||
def doPrintShowChromePolicySchemas():
|
||||
def _printChromePolicySchema(schema):
|
||||
row = flattenJSON(schema)
|
||||
if not FJQC.formatJSON:
|
||||
@@ -28957,10 +29008,12 @@ def doPrintShowChromeSchemas():
|
||||
row['JSON'] = json.dumps(cleanJSON(schema), ensure_ascii=False, sort_keys=True)
|
||||
csvPF.WriteRowNoFilter(row)
|
||||
|
||||
if checkArgumentPresent('std'):
|
||||
doShowChromeSchemasStd()
|
||||
return
|
||||
cp = buildGAPIObject(API.CHROMEPOLICY)
|
||||
if checkArgumentPresent('std'):
|
||||
if not Act.csvFormat():
|
||||
doShowChromePolicySchemasStd(cp)
|
||||
return
|
||||
unknownArgumentExit()
|
||||
parent = _getCustomersCustomerIdWithC()
|
||||
csvPF = CSVPrintFile(['name', 'schemaName', 'policyDescription',
|
||||
'policyApiLifecycle.policyApiLifecycleStage',
|
||||
@@ -29020,9 +29073,51 @@ def doPrintShowChromeSchemas():
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Chrome Policy Schemas')
|
||||
|
||||
def _showChromePolicySchemaStd(schema):
|
||||
printKeyValueList([f'{schema.get("name")}', f'{schema.get("description")}'])
|
||||
Ind.Increment()
|
||||
for val in schema['settings'].values():
|
||||
vtype = val.get('type')
|
||||
printKeyValueList([f'{val.get("name")}', f'{vtype}'])
|
||||
Ind.Increment()
|
||||
if vtype == 'TYPE_ENUM':
|
||||
enums = val.get('enums', [])
|
||||
descriptions = val.get('descriptions', [])
|
||||
for i in range(len(val.get('enums', []))):
|
||||
printKeyValueList([f'{enums[i]}', f'{descriptions[i]}'])
|
||||
elif vtype == 'TYPE_BOOL':
|
||||
pvs = val.get('descriptions')
|
||||
for pvi in pvs:
|
||||
if isinstance(pvi, dict):
|
||||
pvalue = pvi.get('value')
|
||||
pdescription = pvi.get('description')
|
||||
printKeyValueList([f'{pvalue}', f'{pdescription}'])
|
||||
elif isinstance(pvi, list):
|
||||
printKeyValueList([f'{pvi[0]}'])
|
||||
else:
|
||||
description = val.get('descriptions')
|
||||
if len(description) > 0:
|
||||
printKeyValueList([f'{description[0]}'])
|
||||
Ind.Decrement()
|
||||
Ind.Decrement()
|
||||
|
||||
# gam info chromeschema std <SchemaName>
|
||||
def doInfoChromePolicySchemasStd(cp):
|
||||
name = _getChromePolicySchemaName()
|
||||
checkForExtraneousArguments()
|
||||
try:
|
||||
schema = callGAPI(cp.customers().policySchemas(), 'get',
|
||||
throwReasons=[GAPI.NOT_FOUND, GAPI.BAD_REQUEST, GAPI.FORBIDDEN],
|
||||
name=name)
|
||||
_, schema_dict = simplifyChromeSchema(schema)
|
||||
_showChromePolicySchemaStd(schema_dict)
|
||||
except GAPI.notFound:
|
||||
entityUnknownWarning(Ent.CHROME_POLICY_SCHEMA, name)
|
||||
except (GAPI.badRequest, GAPI.forbidden):
|
||||
accessErrorExit(None)
|
||||
|
||||
# gam show chromeschemas std [filter <String>]
|
||||
def doShowChromeSchemasStd():
|
||||
cp = buildGAPIObject(API.CHROMEPOLICY)
|
||||
def doShowChromePolicySchemasStd(cp):
|
||||
sfilter = None
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
@@ -29038,33 +29133,8 @@ def doShowChromeSchemasStd():
|
||||
for schema in result:
|
||||
schema_name, schema_dict = simplifyChromeSchema(schema)
|
||||
schemas[schema_name.lower()] = schema_dict
|
||||
for _, value in sorted(iter(schemas.items())):
|
||||
printKeyValueList([f'{value.get("name")}', f'{value.get("description")}'])
|
||||
Ind.Increment()
|
||||
for val in value['settings'].values():
|
||||
vtype = val.get('type')
|
||||
printKeyValueList([f'{val.get("name")}', f'{vtype}'])
|
||||
Ind.Increment()
|
||||
if vtype == 'TYPE_ENUM':
|
||||
enums = val.get('enums', [])
|
||||
descriptions = val.get('descriptions', [])
|
||||
for i in range(len(val.get('enums', []))):
|
||||
printKeyValueList([f'{enums[i]}', f'{descriptions[i]}'])
|
||||
elif vtype == 'TYPE_BOOL':
|
||||
pvs = val.get('descriptions')
|
||||
for pvi in pvs:
|
||||
if isinstance(pvi, dict):
|
||||
pvalue = pvi.get('value')
|
||||
pdescription = pvi.get('description')
|
||||
printKeyValueList([f'{pvalue}', f'{pdescription}'])
|
||||
elif isinstance(pvi, list):
|
||||
printKeyValueList([f'{pvi[0]}'])
|
||||
else:
|
||||
description = val.get('descriptions')
|
||||
if len(description) > 0:
|
||||
printKeyValueList([f'{description[0]}'])
|
||||
Ind.Decrement()
|
||||
Ind.Decrement()
|
||||
for _, schema in sorted(iter(schemas.items())):
|
||||
_showChromePolicySchemaStd(schema)
|
||||
printBlankLine()
|
||||
|
||||
# gam create chromenetwork
|
||||
@@ -51525,6 +51595,9 @@ def getStatusEventDateTime(dateType, dateList):
|
||||
if dateType == 'timerange':
|
||||
startTime = getTimeOrDeltaFromNow(returnDateTime=True)[0]
|
||||
endTime = getTimeOrDeltaFromNow(returnDateTime=True)[0]
|
||||
if startTime >= endTime:
|
||||
Cmd.Backup()
|
||||
usageErrorExit(Msg.INVALID_EVENT_TIMERANGE.format(dateType, startTime, endTime))
|
||||
recurrence = []
|
||||
while checkArgumentPresent(['recurrence']):
|
||||
recurrence.append(getString(Cmd.OB_RECURRENCE))
|
||||
@@ -57296,6 +57369,7 @@ def printDiskUsage(users):
|
||||
topFolder['path'] = f'{SHARED_DRIVES}{pathDelimiter}{topFolder["name"]}'
|
||||
else:
|
||||
topFolder['path'] = topFolder['name']
|
||||
topFolder.pop('ownedByMe', None)
|
||||
elif topFolder['name'] == MY_DRIVE and not topFolder.get('parents'):
|
||||
topFolder['path'] = MY_DRIVE
|
||||
else:
|
||||
@@ -57306,7 +57380,6 @@ def printDiskUsage(users):
|
||||
if owners:
|
||||
topFolder['Owner'] = owners[0].get('emailAddress', 'Unknown')
|
||||
trashFolder['Owner'] = topFolder['Owner']
|
||||
topFolder.pop('ownedByMe', None)
|
||||
topFolder.pop('parents', None)
|
||||
topFolder.update(zeroFolderInfo)
|
||||
topFolder.pop(sizeField, None)
|
||||
@@ -66105,7 +66178,11 @@ def printSharedDriveOrganizers(users, useDomainAdminAccess=False):
|
||||
showNoOrganizerDrives = SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP['false']
|
||||
fieldsList = ['role', 'type', 'emailAddress']
|
||||
cd = entityList = orgUnitId = query = matchPattern = None
|
||||
domainList = [GC.Values[GC.DOMAIN]]
|
||||
domainList = set()
|
||||
if GC.Values[GC.DOMAIN]:
|
||||
domainList.add(GC.Values[GC.DOMAIN])
|
||||
else:
|
||||
domainList.add(GM.Globals[GM.DECODED_ID_TOKEN].get('hd', 'UNKNOWN').lower())
|
||||
oneOrganizer = True
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
@@ -76101,7 +76178,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_CHROMENEEDSATTN: doPrintShowChromeNeedsAttn,
|
||||
Cmd.ARG_CHROMEPOLICY: doPrintShowChromePolicies,
|
||||
Cmd.ARG_CHROMEPROFILE: doPrintShowChromeProfiles,
|
||||
Cmd.ARG_CHROMESCHEMA: doPrintShowChromeSchemas,
|
||||
Cmd.ARG_CHROMESCHEMA: doPrintShowChromePolicySchemas,
|
||||
Cmd.ARG_CHROMESNVALIDITY: doPrintChromeSnValidity,
|
||||
Cmd.ARG_CHROMEVERSIONS: doPrintShowChromeVersions,
|
||||
Cmd.ARG_CIGROUP: doPrintCIGroups,
|
||||
@@ -76233,7 +76310,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_CHROMENEEDSATTN: doPrintShowChromeNeedsAttn,
|
||||
Cmd.ARG_CHROMEPOLICY: doPrintShowChromePolicies,
|
||||
Cmd.ARG_CHROMEPROFILE: doPrintShowChromeProfiles,
|
||||
Cmd.ARG_CHROMESCHEMA: doPrintShowChromeSchemas,
|
||||
Cmd.ARG_CHROMESCHEMA: doPrintShowChromePolicySchemas,
|
||||
Cmd.ARG_CHROMEVERSIONS: doPrintShowChromeVersions,
|
||||
Cmd.ARG_CIGROUPMEMBERS: doShowCIGroupMembers,
|
||||
Cmd.ARG_CIPOLICY: doPrintShowCIPolicies,
|
||||
|
||||
@@ -379,7 +379,7 @@ Defaults = {
|
||||
DEVICE_MAX_RESULTS: '200',
|
||||
DOMAIN: '',
|
||||
DRIVE_DIR: '',
|
||||
ENFORCE_EXPANSIVE_ACCESS: FALSE,
|
||||
ENFORCE_EXPANSIVE_ACCESS: TRUE,
|
||||
DRIVE_MAX_RESULTS: '1000',
|
||||
DRIVE_V3_BETA: FALSE,
|
||||
DRIVE_V3_NATIVE_NAMES: TRUE,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2024 Ross Scroggs All Rights Reserved.
|
||||
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
|
||||
@@ -310,6 +310,7 @@ INVALID_ATTENDEE_CHANGE = 'Invalid attendee change "{0}"'
|
||||
INVALID_CHARSET = 'Invalid charset "{0}"'
|
||||
INVALID_DATE_TIME_RANGE = '{0} {1} must be greater than/equal to {2} {3}'
|
||||
INVALID_ENTITY = 'Invalid {0}, {1}'
|
||||
INVALID_EVENT_TIMERANGE = '{0} {1} must be less than {2}'
|
||||
INVALID_FILE_SELECTION_WITH_ADMIN_ACCESS = 'Invalid file selection with adminaccess|asadmin'
|
||||
INVALID_GROUP = 'Invalid Group'
|
||||
INVALID_HTTP_HEADER = 'Invalid http header data: {0}'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2023 Ross Scroggs All Rights Reserved.
|
||||
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2023 Ross Scroggs All Rights Reserved.
|
||||
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,32 @@ 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.09.03
|
||||
|
||||
Updated `gam <UserTypeEntity> create focustime|outofoffice ... timerange <Time> <Time>` to check
|
||||
that the first `<Time>` is less than the second `Time`; previously the event was not created.
|
||||
|
||||
For new installs the `enforce_expansive_access` Boolean variable in `gam.cfg` now defaults to True.
|
||||
For existing installations, if `enforce_expansive_access` has not been added to `gam.cfg`,
|
||||
a default value of True will be used.
|
||||
|
||||
### 7.09.02
|
||||
|
||||
Added command `gam info chromeschema std <SchemaName>` to display a Chrome policy schema in the same format as Legacy GAM.
|
||||
|
||||
Improved output of `gam show chromeschemas [std]` and `gam info chromeschema [std]` to more accurately display the schemas.
|
||||
|
||||
### 7.09.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print diskusage` where the `ownedByMe` column was
|
||||
blank for the top folder.
|
||||
|
||||
Fixed bug in `gam update chromepolicy` where the following error was generated
|
||||
when updating policies with simple numerical values.
|
||||
```
|
||||
ERROR: Missing argument: Expected <value>"
|
||||
```
|
||||
|
||||
### 7.09.00
|
||||
|
||||
Removed the overly broad service account `IAM and Access Management API` scope `https://www.googleapis.com/auth/cloud-platform`
|
||||
|
||||
@@ -152,7 +152,7 @@ gam update group|groups <GroupEntity> create|add [<GroupRole>]
|
||||
[preview] [actioncsv]
|
||||
<UserItem>|<UserTypeEntity>
|
||||
```
|
||||
To add a group as a memmber of another group, just specify its email address.
|
||||
To add a group as a member of another group, just specify its email address.
|
||||
```
|
||||
gam update group group1@domain.com add member group2@domain.com
|
||||
```
|
||||
@@ -208,7 +208,7 @@ gam update group|groups <GroupEntity> delete|remove [<GroupRole>]
|
||||
```
|
||||
`<GroupRole>` is ignored, deletions take place regardless of role.
|
||||
|
||||
To remove a group as a memmber of another group, just specify its email address.
|
||||
To remove a group as a member of another group, just specify its email address.
|
||||
```
|
||||
gam update group group1@domain.com remove group2@domain.com
|
||||
```
|
||||
|
||||
@@ -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.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.09.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 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.09.00 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM 7.09.03 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.09.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 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.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.09.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 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.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.09.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 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.09.00
|
||||
Latest: 7.09.03
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.09.00
|
||||
7.09.03
|
||||
```
|
||||
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.09.00 - https://github.com/GAM-team/GAM
|
||||
GAM 7.09.03 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
|
||||
@@ -337,7 +337,7 @@ enforce_expansive_access
|
||||
gam <UserTypeEntity> move drivefile
|
||||
gam <UserTypeEntity> transfer ownership
|
||||
gam <UserTypeEntity> claim ownership
|
||||
Default: False
|
||||
Default: True
|
||||
event_max_results
|
||||
When retrieving lists of Calendar events from API,
|
||||
how many should be retrieved in each API call
|
||||
|
||||
Reference in New Issue
Block a user