mirror of
https://github.com/GAM-team/GAM.git
synced 2025-05-12 12:17:20 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
db74a6e22a | ||
|
e147ebb253 | ||
|
5674c58b81 | ||
|
74b62c5cb9 |
@ -1,4 +1,10 @@
|
|||||||
|
7.07.01
|
||||||
|
|
||||||
|
Fixed bug in `gam print|show chromepolicies` that caused a trap. Made additional
|
||||||
|
updates to handle changes in the Chrome Policy API.
|
||||||
|
|
||||||
7.07.00
|
7.07.00
|
||||||
|
|
||||||
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
||||||
|
|
||||||
The following commands have been eliminated.
|
The following commands have been eliminated.
|
||||||
|
@ -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.07.00'
|
__version__ = '7.07.01'
|
||||||
__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
|
||||||
@ -28183,78 +28183,174 @@ def doDeleteChromePolicy():
|
|||||||
except (GAPI.notFound, GAPI.permissionDenied, GAPI.invalidArgument, GAPI.serviceNotAvailable, GAPI.quotaExceeded) as e:
|
except (GAPI.notFound, GAPI.permissionDenied, GAPI.invalidArgument, GAPI.serviceNotAvailable, GAPI.quotaExceeded) as e:
|
||||||
entityActionFailedWarning(kvList, str(e))
|
entityActionFailedWarning(kvList, str(e))
|
||||||
|
|
||||||
CHROME_SCHEMA_TYPE_MESSAGE = {
|
CHROME_SCHEMA_SPECIAL_CASES = {
|
||||||
'chrome.users.AutoUpdateCheckPeriodNew':
|
|
||||||
{'autoupdatecheckperiodminutesnew':
|
|
||||||
{'casedField': 'autoUpdateCheckPeriodMinutesNew',
|
|
||||||
'type': 'duration', 'minVal': 1, 'maxVal': 720, 'scale': 60}},
|
|
||||||
'chrome.users.AutoUpdateCheckPeriodNewV2':
|
'chrome.users.AutoUpdateCheckPeriodNewV2':
|
||||||
{'autoupdatecheckperiodminutesnew':
|
{'autoupdatecheckperiodminutesnew':
|
||||||
{'casedField': 'autoUpdateCheckPeriodMinutesNew',
|
{'casedField': 'autoUpdateCheckPeriodMinutesNew',
|
||||||
'type': 'duration', 'minVal': 1, 'maxVal': 720, 'scale': 60}},
|
'type': 'duration', 'minVal': 1, 'maxVal': 720}},
|
||||||
'chrome.users.BrowserSwitcherDelayDuration':
|
|
||||||
{'browserswitcherdelayduration':
|
|
||||||
{'casedField': 'browserSwitcherDelayDuration',
|
|
||||||
'type': 'duration', 'minVal': 0, 'maxVal': 30, 'scale': 1}},
|
|
||||||
'chrome.users.CloudReportingUploadFrequencyV2':
|
|
||||||
{'cloudreportinguploadfrequency':
|
|
||||||
{'casedField': 'cloudReportingUploadFrequency',
|
|
||||||
'type': 'count', 'minVal': 3, 'maxVal': 24, 'scale': 1}},
|
|
||||||
'chrome.users.FetchKeepaliveDurationSecondsOnShutdown':
|
|
||||||
{'fetchkeepalivedurationsecondsonshutdown':
|
|
||||||
{'casedField': 'fetchKeepaliveDurationSecondsOnShutdown',
|
|
||||||
'type': 'duration', 'minVal': 0, 'maxVal': 5, 'scale': 1}},
|
|
||||||
'chrome.users.MaxInvalidationFetchDelay':
|
|
||||||
{'maxinvalidationfetchdelay':
|
|
||||||
{'casedField': 'maxInvalidationFetchDelay',
|
|
||||||
'type': 'duration', 'minVal': 1, 'maxVal': 30, 'scale': 1, 'default': 10}},
|
|
||||||
'chrome.users.PrintingMaxSheetsAllowed':
|
|
||||||
{'printingmaxsheetsallowednullable':
|
|
||||||
{'casedField': 'printingMaxSheetsAllowedNullable',
|
|
||||||
'type': 'value', 'minVal': 1, 'maxVal': None, 'scale': 1}},
|
|
||||||
'chrome.users.PrintJobHistoryExpirationPeriodNew':
|
|
||||||
{'printjobhistoryexpirationperioddaysnew':
|
|
||||||
{'casedField': 'printJobHistoryExpirationPeriodDaysNew',
|
|
||||||
'type': 'duration', 'minVal': -1, 'maxVal': None, 'scale': 86400}},
|
|
||||||
'chrome.users.RelaunchNotificationWithDurationV2':
|
|
||||||
{'relaunchnotificationperiodduration':
|
|
||||||
{'casedField': 'relaunchNotificationPeriodDuration',
|
|
||||||
'type': 'duration', 'minVal': -1, 'maxVal': None, 'scale': 3600}},
|
|
||||||
'chrome.users.SecurityTokenSessionSettings':
|
|
||||||
{'securitytokensessionnotificationseconds':
|
|
||||||
{'casedField': 'securityTokenSessionNotificationSeconds',
|
|
||||||
'type': 'duration', 'minVal': 0, 'maxVal': 9999, 'scale': 1}},
|
|
||||||
'chrome.users.SessionLength':
|
|
||||||
{'sessiondurationlimit':
|
|
||||||
{'casedField': 'sessionDurationLimit',
|
|
||||||
'type': 'duration', 'minVal': 1, 'maxVal': 1440, 'scale': 60}},
|
|
||||||
'chrome.users.UpdatesSuppressed':
|
|
||||||
{'updatessuppresseddurationmin':
|
|
||||||
{'casedField': 'updatesSuppressedDurationMin',
|
|
||||||
'type': 'count', 'minVal': 1, 'maxVal': 1440, 'scale': 1},
|
|
||||||
'updatessuppressedstarttime':
|
|
||||||
{'casedField': 'updatesSuppressedStartTime',
|
|
||||||
'type': 'timeOfDay'}},
|
|
||||||
'chrome.devices.managedguest.Avatar':
|
|
||||||
{'useravatarimage':
|
|
||||||
{'casedField': 'userAvatarImage',
|
|
||||||
'type': 'downloadUri'}},
|
|
||||||
'chrome.devices.managedguest.Wallpaper':
|
|
||||||
{'wallpaperimage':
|
|
||||||
{'casedField': 'wallpaperImage',
|
|
||||||
'type': 'downloadUri'}},
|
|
||||||
'chrome.devices.SignInWallpaperImage':
|
|
||||||
{'devicewallpaperimage':
|
|
||||||
{'casedField': 'deviceWallpaperImage',
|
|
||||||
'type': 'downloadUri'}},
|
|
||||||
'chrome.users.Avatar':
|
'chrome.users.Avatar':
|
||||||
{'useravatarimage':
|
{'useravatarimage':
|
||||||
{'casedField': 'userAvatarImage',
|
{'casedField': 'userAvatarImage',
|
||||||
'type': 'downloadUri'}},
|
'type': 'downloadUri'}},
|
||||||
|
'chrome.users.BrowserSwitcherDelayDurationV2':
|
||||||
|
{'browserswitcherdelayduration':
|
||||||
|
{'casedField': 'browserSwitcherDelayDuration',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 30}},
|
||||||
|
'chrome.users.BrowsingDataLifetimeV2':
|
||||||
|
{'browsinghistoryttl':
|
||||||
|
{'casedField': 'browsingHistoryTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'downloadhistoryttl':
|
||||||
|
{'casedField': 'downloadHistoryTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'cookiesandothersitedatattl':
|
||||||
|
{'casedField': 'cookiesAndOtherSiteDataTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'cachedimagesandfilesttl':
|
||||||
|
{'casedField': 'cachedImagesAndFilesTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'passwordsigninttl':
|
||||||
|
{'casedField': 'passwordSigninTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'autofillttl':
|
||||||
|
{'casedField': 'autofillTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'sitesettingsttl':
|
||||||
|
{'casedField': 'siteSettingsTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'hostedappdatattl':
|
||||||
|
{'casedField': 'hostedAppDataTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None}},
|
||||||
|
'chrome.users.CloudReportingUploadFrequencyV2':
|
||||||
|
{'cloudreportinguploadfrequency':
|
||||||
|
{'casedField': 'cloudReportingUploadFrequency',
|
||||||
|
'type': 'duration', 'minVal': 3, 'maxVal': 24}},
|
||||||
|
'chrome.users.FetchKeepaliveDurationSecondsOnShutdownV2':
|
||||||
|
{'fetchkeepalivedurationsecondsonshutdown':
|
||||||
|
{'casedField': 'fetchKeepaliveDurationSecondsOnShutdown',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 5}},
|
||||||
|
'chrome.users.MaxInvalidationFetchDelayV2':
|
||||||
|
{'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',
|
||||||
|
'type': 'duration', 'minVal': -1, 'maxVal': None}},
|
||||||
|
'chrome.users.RelaunchNotificationWithDurationV2':
|
||||||
|
{'relaunchnotificationperiodduration':
|
||||||
|
{'casedField': 'relaunchNotificationPeriodDuration',
|
||||||
|
'type': 'duration', 'minVal': -1, 'maxVal': None}},
|
||||||
|
'chrome.users.SecurityTokenSessionSettingsV2':
|
||||||
|
{'securitytokensessionnotificationseconds':
|
||||||
|
{'casedField': 'securityTokenSessionNotificationSeconds',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 9999}},
|
||||||
|
'chrome.users.SessionLengthV2':
|
||||||
|
{'sessiondurationlimit':
|
||||||
|
{'casedField': 'sessionDurationLimit',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': 1440}},
|
||||||
|
'chrome.users.UpdatesSuppressed':
|
||||||
|
{'updatessuppresseddurationmin':
|
||||||
|
{'casedField': 'updatesSuppressedDurationMin',
|
||||||
|
'type': 'count', 'minVal': 1, 'maxVal': 1440},
|
||||||
|
'updatessuppressedstarttime':
|
||||||
|
{'casedField': 'updatesSuppressedStartTime',
|
||||||
|
'type': 'timeOfDay'}},
|
||||||
'chrome.users.Wallpaper':
|
'chrome.users.Wallpaper':
|
||||||
{'wallpaperimage':
|
{'wallpaperimage':
|
||||||
{'casedField': 'wallpaperImage',
|
{'casedField': 'wallpaperImage',
|
||||||
'type': 'downloadUri'}},
|
'type': 'downloadUri'}},
|
||||||
|
'chrome.devices.EnableReportUploadFrequencyV2':
|
||||||
|
{'reportdeviceuploadfrequency':
|
||||||
|
{'casedField': 'reportDeviceUploadFrequency',
|
||||||
|
'type': 'duration', 'minVal': 60, 'maxVal': 25379}},
|
||||||
|
'chrome.devices.ScheduledRebootDurationV2':
|
||||||
|
{'uptimelimitduration':
|
||||||
|
{'casedField': 'uptimeLimitDuration',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': 365}},
|
||||||
|
'chrome.devices.SignInWallpaperImage':
|
||||||
|
{'devicewallpaperimage':
|
||||||
|
{'casedField': 'deviceWallpaperImage',
|
||||||
|
'type': 'downloadUri'}},
|
||||||
|
'chrome.devices.kiosk.AcPowerSettingsV2':
|
||||||
|
{'acidletimeout':
|
||||||
|
{'casedField': 'acIdleTimeout',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': 35000},
|
||||||
|
'acwarningtimeout':
|
||||||
|
{'casedField': 'acWarningTimeout',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 35000},
|
||||||
|
'acdimtimeout':
|
||||||
|
{'casedField': 'acDimTimeout',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 35000},
|
||||||
|
'acscreenofftimeout':
|
||||||
|
{'casedField': 'acScreenOffTimeout',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 35000}},
|
||||||
|
'chrome.devices.kiosk.BatteryPowerSettingsV2':
|
||||||
|
{'batteryidletimeout':
|
||||||
|
{'casedField': 'batteryIdleTimeout',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': 35000},
|
||||||
|
'batterywarningtimeout':
|
||||||
|
{'casedField': 'batteryWarningTimeout',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 35000},
|
||||||
|
'batterydimtimeout':
|
||||||
|
{'casedField': 'batteryDimTimeout',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 35000},
|
||||||
|
'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',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'downloadhistoryttl':
|
||||||
|
{'casedField': 'downloadHistoryTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'cookiesandothersitedatattl':
|
||||||
|
{'casedField': 'cookiesAndOtherSiteDataTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'cachedimagesandfilesttl':
|
||||||
|
{'casedField': 'cachedImagesAndFilesTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'passwordsigninttl':
|
||||||
|
{'casedField': 'passwordSigninTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'autofillttl':
|
||||||
|
{'casedField': 'autofillTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'sitesettingsttl':
|
||||||
|
{'casedField': 'siteSettingsTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None},
|
||||||
|
'hostedappdatattl':
|
||||||
|
{'casedField': 'hostedAppDataTtl',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': None}},
|
||||||
|
'chrome.devices.managedguest.MaxInvalidationFetchDelayV2':
|
||||||
|
{'maxinvalidationfetchdelay':
|
||||||
|
{'casedField': 'maxInvalidationFetchDelay',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': 30, 'default': 10}},
|
||||||
|
'chrome.devices.managedguest.PrintJobHistoryExpirationPeriodNewV2':
|
||||||
|
{'printjobhistoryexpirationperioddaysnew':
|
||||||
|
{'casedField': 'printJobHistoryExpirationPeriodDaysNew',
|
||||||
|
'type': 'duration', 'minVal': -1, 'maxVal': None}},
|
||||||
|
'chrome.devices.managedguest.SecurityTokenSessionSettingsV2':
|
||||||
|
{'securitytokensessionnotificationseconds':
|
||||||
|
{'casedField': 'securityTokenSessionNotificationSeconds',
|
||||||
|
'type': 'duration', 'minVal': 0, 'maxVal': 9999}},
|
||||||
|
'chrome.devices.managedguest.SessionLengthV2':
|
||||||
|
{'sessiondurationlimit':
|
||||||
|
{'casedField': 'sessionDurationLimit',
|
||||||
|
'type': 'duration', 'minVal': 1, 'maxVal': 1440}},
|
||||||
|
'chrome.devices.managedguest.Wallpaper':
|
||||||
|
{'wallpaperimage':
|
||||||
|
{'casedField': 'wallpaperImage',
|
||||||
|
'type': 'downloadUri'}},
|
||||||
}
|
}
|
||||||
|
|
||||||
CHROME_TARGET_VERSION_CHANNEL_MINUS_PATTERN = re.compile(r'^([a-z]+)-(\d+)$')
|
CHROME_TARGET_VERSION_CHANNEL_MINUS_PATTERN = re.compile(r'^([a-z]+)-(\d+)$')
|
||||||
@ -28266,9 +28362,7 @@ CHROME_TARGET_VERSION_PATTERN = re.compile(r'^(\d{1,4}\.){1,4}$')
|
|||||||
# [(printerid <PrinterID>)|(appid <AppID>)]
|
# [(printerid <PrinterID>)|(appid <AppID>)]
|
||||||
def doUpdateChromePolicy():
|
def doUpdateChromePolicy():
|
||||||
def getSpecialVtypeValue(vtype, value):
|
def getSpecialVtypeValue(vtype, value):
|
||||||
if vtype == 'duration':
|
if vtype in {'duration', 'value', 'downloadUri'}:
|
||||||
return {vtype: f'{value}s'}
|
|
||||||
if vtype in {'value', 'downloadUri'}:
|
|
||||||
return {vtype: value}
|
return {vtype: value}
|
||||||
if vtype == 'count':
|
if vtype == 'count':
|
||||||
return value
|
return value
|
||||||
@ -28326,8 +28420,8 @@ def doUpdateChromePolicy():
|
|||||||
for field in jsonData.get('fields', []):
|
for field in jsonData.get('fields', []):
|
||||||
casedField = field['name']
|
casedField = field['name']
|
||||||
lowerField = casedField.lower()
|
lowerField = casedField.lower()
|
||||||
# Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
|
# Handle fields with durations, values, counts and timeOfDay as special cases
|
||||||
tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(lowerField)
|
tmschema = CHROME_SCHEMA_SPECIAL_CASES.get(schemaName, {}).get(lowerField)
|
||||||
if tmschema:
|
if tmschema:
|
||||||
body['requests'][-1]['policyValue']['value'][casedField] = getSpecialVtypeValue(tmschema['type'], field['value'])
|
body['requests'][-1]['policyValue']['value'][casedField] = getSpecialVtypeValue(tmschema['type'], field['value'])
|
||||||
body['requests'][-1]['updateMask'] += f'{casedField},'
|
body['requests'][-1]['updateMask'] += f'{casedField},'
|
||||||
@ -28363,8 +28457,8 @@ def doUpdateChromePolicy():
|
|||||||
body['requests'][-1]['policyValue']['value'][casedField] = value
|
body['requests'][-1]['policyValue']['value'][casedField] = value
|
||||||
body['requests'][-1]['updateMask'] += f'{casedField},'
|
body['requests'][-1]['updateMask'] += f'{casedField},'
|
||||||
break
|
break
|
||||||
# Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
|
# Handle fields with durations, values, counts and timeOfDay as special cases
|
||||||
tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(field)
|
tmschema = CHROME_SCHEMA_SPECIAL_CASES.get(schemaName, {}).get(field)
|
||||||
if tmschema:
|
if tmschema:
|
||||||
casedField = tmschema['casedField']
|
casedField = tmschema['casedField']
|
||||||
vtype = tmschema['type']
|
vtype = tmschema['type']
|
||||||
@ -28372,9 +28466,9 @@ def doUpdateChromePolicy():
|
|||||||
value = getString(Cmd.OB_STRING)
|
value = getString(Cmd.OB_STRING)
|
||||||
elif vtype != 'timeOfDay':
|
elif vtype != 'timeOfDay':
|
||||||
if 'default' not in tmschema:
|
if 'default' not in tmschema:
|
||||||
value = getInteger(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'])*tmschema['scale']
|
value = getInteger(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'])
|
||||||
else:
|
else:
|
||||||
value = getIntegerEmptyAllowed(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'], default=tmschema['default'])*tmschema['scale']
|
value = getIntegerEmptyAllowed(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'], default=tmschema['default'])
|
||||||
else:
|
else:
|
||||||
value = getHHMM()
|
value = getHHMM()
|
||||||
body['requests'][-1]['policyValue']['value'][casedField] = getSpecialVtypeValue(vtype, value)
|
body['requests'][-1]['policyValue']['value'][casedField] = getSpecialVtypeValue(vtype, value)
|
||||||
@ -28507,20 +28601,14 @@ def doPrintShowChromePolicies():
|
|||||||
'chrome.users.apps.ManagedConfiguration'} and 'managedConfiguration' in values:
|
'chrome.users.apps.ManagedConfiguration'} and 'managedConfiguration' in values:
|
||||||
values['managedConfiguration'] = json.dumps(values['managedConfiguration'], ensure_ascii=False).replace('\\n', '').replace('\\"', '"')[1:-1]
|
values['managedConfiguration'] = json.dumps(values['managedConfiguration'], ensure_ascii=False).replace('\\n', '').replace('\\"', '"')[1:-1]
|
||||||
for setting, value in values.items():
|
for setting, value in values.items():
|
||||||
# Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
|
# Handle fields with durations, values, counts and timeOfDay as special cases
|
||||||
schema = CHROME_SCHEMA_TYPE_MESSAGE.get(name, {}).get(setting.lower())
|
schema = CHROME_SCHEMA_SPECIAL_CASES.get(name, {}).get(setting.lower())
|
||||||
if schema and setting == schema['casedField']:
|
if schema and setting == schema['casedField']:
|
||||||
vtype = schema['type']
|
vtype = schema['type']
|
||||||
if vtype in {'duration', 'value'}:
|
if vtype in {'duration', 'value', 'downloadUri'}:
|
||||||
value = value.get(vtype, '')
|
value = value.get(vtype, '')
|
||||||
if value:
|
|
||||||
if value.endswith('s'):
|
|
||||||
value = value[:-1]
|
|
||||||
value = int(value) // schema['scale']
|
|
||||||
elif vtype == 'count':
|
elif vtype == 'count':
|
||||||
pass
|
pass
|
||||||
elif vtype == 'downloadUri':
|
|
||||||
value = value.get(vtype, '')
|
|
||||||
else: #timeOfDay
|
else: #timeOfDay
|
||||||
hours = value.get(vtype, {}).get('hours', 0)
|
hours = value.get(vtype, {}).get('hours', 0)
|
||||||
minutes = value.get(vtype, {}).get('minutes', 0)
|
minutes = value.get(vtype, {}).get('minutes', 0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Domain Shared Contacts - Global Address List
|
# Domain Shared Contacts
|
||||||
- [API documentation](#api-documentation)
|
- [API documentation](#api-documentation)
|
||||||
- [Python Regular Expressions](Python-Regular-Expressions) Match function
|
- [Python Regular Expressions](Python-Regular-Expressions) Match function
|
||||||
- [Definitions](#definitions)
|
- [Definitions](#definitions)
|
@ -10,6 +10,28 @@ 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
|
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||||
|
|
||||||
|
### 7.07.01
|
||||||
|
|
||||||
|
Fixed bug in `gam print|show chromepolicies` that caused a trap. Made additional
|
||||||
|
updates to handle changes in the Chrome Policy API.
|
||||||
|
|
||||||
|
### 7.07.00
|
||||||
|
|
||||||
|
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
||||||
|
|
||||||
|
The following commands have been eliminated.
|
||||||
|
```
|
||||||
|
gam info gal
|
||||||
|
gam print gal
|
||||||
|
gam show gal
|
||||||
|
```
|
||||||
|
|
||||||
|
These commands are a work-around for `gam print gal`.
|
||||||
|
```
|
||||||
|
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" redirect csv ./UserGAL.csv print users fields name,gal
|
||||||
|
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" batch_size 25 redirect csv ./GroupGAL.csv print groups fields name,gal
|
||||||
|
```
|
||||||
|
|
||||||
### 7.06.14
|
### 7.06.14
|
||||||
|
|
||||||
Updated `create|update adminrole` to allow specifying a collection of privileges
|
Updated `create|update adminrole` to allow specifying a collection of privileges
|
||||||
|
@ -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$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||||
admin@server:/Users/admin$ gam version
|
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
|
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||||
GAM 7.06.14 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.07.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.3 64-bit final
|
Python 3.13.3 64-bit final
|
||||||
MacOS Sequoia 15.4.1 x86_64
|
MacOS Sequoia 15.4.1 x86_64
|
||||||
@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
C:\>del C:\GAMConfig\oauth2.txt
|
C:\>del C:\GAMConfig\oauth2.txt
|
||||||
C:\>gam version
|
C:\>gam version
|
||||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||||
GAM 7.06.14 - https://github.com/GAM-team/GAM - pythonsource
|
GAM 7.07.01 - https://github.com/GAM-team/GAM - pythonsource
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.3 64-bit final
|
Python 3.13.3 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
k
|
k
|
||||||
# Version and Help
|
# Version and Help
|
||||||
|
|
||||||
Print the current version of Gam with details
|
Print the current version of Gam with details
|
||||||
```
|
```
|
||||||
gam version
|
gam version
|
||||||
GAM 7.06.14 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.07.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.3 64-bit final
|
Python 3.13.3 64-bit final
|
||||||
MacOS Sequoia 15.4.1 x86_64
|
MacOS Sequoia 15.4.1 x86_64
|
||||||
@ -16,7 +17,7 @@ Time: 2023-06-02T21:10:00-07:00
|
|||||||
Print the current version of Gam with details and time offset information
|
Print the current version of Gam with details and time offset information
|
||||||
```
|
```
|
||||||
gam version timeoffset
|
gam version timeoffset
|
||||||
GAM 7.06.14 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.07.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.3 64-bit final
|
Python 3.13.3 64-bit final
|
||||||
MacOS Sequoia 15.4.1 x86_64
|
MacOS Sequoia 15.4.1 x86_64
|
||||||
@ -28,7 +29,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
|
Print the current version of Gam with extended details and SSL information
|
||||||
```
|
```
|
||||||
gam version extended
|
gam version extended
|
||||||
GAM 7.06.14 - https://github.com/GAM-team/GAM - pyinstaller
|
GAM 7.07.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.3 64-bit final
|
Python 3.13.3 64-bit final
|
||||||
MacOS Sequoia 15.4.1 x86_64
|
MacOS Sequoia 15.4.1 x86_64
|
||||||
@ -65,7 +66,7 @@ MacOS High Sierra 10.13.6 x86_64
|
|||||||
Path: /Users/Admin/bin/gam7
|
Path: /Users/Admin/bin/gam7
|
||||||
Version Check:
|
Version Check:
|
||||||
Current: 5.35.08
|
Current: 5.35.08
|
||||||
Latest: 7.06.14
|
Latest: 7.07.01
|
||||||
echo $?
|
echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
@ -73,7 +74,7 @@ echo $?
|
|||||||
Print the current version number without details
|
Print the current version number without details
|
||||||
```
|
```
|
||||||
gam version simple
|
gam version simple
|
||||||
7.06.14
|
7.07.01
|
||||||
```
|
```
|
||||||
In Linux/MacOS you can do:
|
In Linux/MacOS you can do:
|
||||||
```
|
```
|
||||||
@ -83,7 +84,7 @@ echo $VER
|
|||||||
Print the current version of Gam and address of this Wiki
|
Print the current version of Gam and address of this Wiki
|
||||||
```
|
```
|
||||||
gam help
|
gam help
|
||||||
GAM 7.06.14 - https://github.com/GAM-team/GAM
|
GAM 7.07.01 - https://github.com/GAM-team/GAM
|
||||||
GAM Team <google-apps-manager@googlegroups.com>
|
GAM Team <google-apps-manager@googlegroups.com>
|
||||||
Python 3.13.3 64-bit final
|
Python 3.13.3 64-bit final
|
||||||
MacOS Sequoia 15.4.1 x86_64
|
MacOS Sequoia 15.4.1 x86_64
|
||||||
|
@ -94,7 +94,7 @@ Client Access
|
|||||||
* [Domains](Domains)
|
* [Domains](Domains)
|
||||||
* [Domains - Verification](Domains-Verification)
|
* [Domains - Verification](Domains-Verification)
|
||||||
* [Domain People - Contacts & Profiles](Domain-People-Contacts-Profiles)
|
* [Domain People - Contacts & Profiles](Domain-People-Contacts-Profiles)
|
||||||
* [Domain Shared Contacts - Global Address List](Domain-SharedContacts-GAL)
|
* [Domain Shared Contacts](Domain-SharedContacts)
|
||||||
* [Email Audit Monitor](Email-Audit-Monitor)
|
* [Email Audit Monitor](Email-Audit-Monitor)
|
||||||
* [Find File Owner](Find-File-Owner)
|
* [Find File Owner](Find-File-Owner)
|
||||||
* [Google Data Transfers](Google-Data-Transfers)
|
* [Google Data Transfers](Google-Data-Transfers)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user