gam.cfg enforce_expansive_access new defaults to true

This commit is contained in:
Ross Scroggs
2025-06-10 09:02:03 -07:00
parent 2f40a164c5
commit f58a69e374
3 changed files with 26 additions and 4 deletions

View File

@ -1,3 +1,12 @@
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.

View File

@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.09.02'
__version__ = '7.09.03'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@ -28313,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',
@ -28475,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)
@ -28931,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, dictObjectsKey={'messageType': 'name', 'field': 'name'})
showJSON(None, schema, dictObjectsKey={'messageType': 'name', 'field': 'name', 'fieldDescriptions': 'field'})
Ind.Decrement()
CHROME_POLICY_SCHEMA_FIELDS_CHOICE_MAP = {
@ -51586,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))

View File

@ -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}'