diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 0b4a641e..1eb07de0 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -632,6 +632,7 @@ Items, separated by spaces, with spaces, commas or single quotes in the items th ::= "(,)*" ::= "(,)*" ::= "(,)*" + ::= "(,)*" ::= "(,)*" ::= "(,)*" ::= "(,)*" @@ -1210,6 +1211,62 @@ gam print browsertokens [todrive] [fields ] [sortheaders] + ::= + encryption_unsupported | + encrypted | + unencrypted + ::= "(,)" + + ::= + basic | + advanced|complete | + none + ::= "(,)" + + ::= + and | + or + + ::= + DESKTOP_MAC | + DESKTOP_WINDOWS | + DESKTOP_LINUX | + DESKTOP_CHROMEOS | + VERIFIED_DESKTOP_CHROMEOS | + ANDROID | + IOS + + ::= + | + :.. + ::= "(,)" + + ::= + (requirescreenlock ) | + (allowedencryptionstatuses ) | + (osconstraints ) | + (alloweddevicemanagementlevels ) | + (requireadminapproval ) | + (requirecorpowned ) + + ::= + (ipsubnetworks ) | + (devicepolicy enddevicepolicy) | + (requiredaccesslevels ) | + (negate ) | + (members ) | + (regions ) + + ::+ + (combiningfunction ) | + (condition + endcondition)+ + +gam create caalevel (basic +)|(custom ) +gam update caalevel (basic +)|(custom ) +gam delete caalevel +gam show caalevels +gam print caalevels [todrive] + gam print chatspaces [todrive] gam print chatmembers space [todrive] gam create chatmessage space [thread ] @@ -1350,11 +1407,11 @@ gam print chromehistory channels [todrive] gam print chromehistory versions [todrive] [platform ] [channel ] [filter ] - (orderby [ascending|descending])* + (orderby [ascending|descending])* gam print chromehistory releases [todrive] [platform ] [channel ] [version ] [filter ] - (orderby [ascending|descending])* + (orderby [ascending|descending])* gam delete chromepolicy + ou|org|orgunit [(printerid )|(appid )] gam update chromepolicy ( ( )+)+ ou|org|orgunit [(printerid )|(appid )] diff --git a/src/gam/gapi/caa.py b/src/gam/gapi/caa.py index 2797ea27..b52351a1 100644 --- a/src/gam/gapi/caa.py +++ b/src/gam/gapi/caa.py @@ -92,15 +92,19 @@ def printshow_access_levels(csvFormat): def build_os_constraints(constraints): consts_obj = [] constraints = constraints.upper().split(',') - valid_os_types = ['DESKTOP_MAC', 'DESKTOP_WINDOWS', 'DESKTOP_LINUX', 'DESKTOP_CHROMEOS', 'ANDROID', 'IOS'] + valid_os_types = ['DESKTOP_MAC', 'DESKTOP_WINDOWS', 'DESKTOP_LINUX', + 'DESKTOP_CHROMEOS', 'VERIFIED_DESKTOP_CHROMEOS', 'ANDROID', 'IOS'] for constraint in constraints: new_const = {} - new_const['osType'], new_const['minimumVersion'] = constraint.split(':') + if ':' in constraint: + new_const['osType'], new_const['minimumVersion'] = constraint.split(':') + else: + new_const['osType'] = constraint + if new_const['osType'] not in valid_os_types: + controlflow.system_error_exit(2, f'expected os type of {", ".join(valid_os_types)} got {new_const["osType"]}') if new_const['osType'] == 'VERIFIED_DESKTOP_CHROME_OS': new_const['osType'] = 'DESKTOP_CHROME_OS' new_const['requireVerifiedChromeOs'] = True - if new_const['osType'] not in valid_os_types: - controlflow.system_error_exit(2, f'expected os type of {", ".join(valid_os_types)} got {new_const["osType"]}') consts_obj.append(new_const) return consts_obj