mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Merge branch 'main' of https://github.com/jay0lee/GAM into main
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -14,7 +14,7 @@ defaults:
|
|||||||
env:
|
env:
|
||||||
BUILD_PYTHON_VERSION: "3.9.2"
|
BUILD_PYTHON_VERSION: "3.9.2"
|
||||||
MIN_PYTHON_VERSION: "3.9.2"
|
MIN_PYTHON_VERSION: "3.9.2"
|
||||||
BUILD_OPENSSL_VERSION: "1.1.1j"
|
BUILD_OPENSSL_VERSION: "1.1.1k"
|
||||||
MIN_OPENSSL_VERSION: "1.1.1i"
|
MIN_OPENSSL_VERSION: "1.1.1i"
|
||||||
PATCHELF_VERSION: "0.12"
|
PATCHELF_VERSION: "0.12"
|
||||||
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/python
|
~/python
|
||||||
~/ssl
|
~/ssl
|
||||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20210219
|
key: ${{ matrix.os }}-${{ matrix.jid }}-20210325
|
||||||
|
|
||||||
- name: Set env variables
|
- name: Set env variables
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -76,6 +76,13 @@ def printshow_policies():
|
|||||||
# 'chrome.devices.kiosk',
|
# 'chrome.devices.kiosk',
|
||||||
]
|
]
|
||||||
throw_reasons = [gapi_errors.ErrorReason.FOUR_O_O,]
|
throw_reasons = [gapi_errors.ErrorReason.FOUR_O_O,]
|
||||||
|
orgunitPath = gapi_directory_orgunits.orgunit_from_orgunitid(orgunit[9:], None)
|
||||||
|
header = f'Organizational Unit: {orgunitPath}'
|
||||||
|
if printer_id:
|
||||||
|
header += f', printerid: {printer_id}'
|
||||||
|
elif app_id:
|
||||||
|
header += f', appid: {app_id}'
|
||||||
|
print(header)
|
||||||
for namespace in namespaces:
|
for namespace in namespaces:
|
||||||
body['policySchemaFilter'] = f'{namespace}.*'
|
body['policySchemaFilter'] = f'{namespace}.*'
|
||||||
try:
|
try:
|
||||||
@@ -87,6 +94,7 @@ def printshow_policies():
|
|||||||
except googleapiclient.errors.HttpError:
|
except googleapiclient.errors.HttpError:
|
||||||
policies = []
|
policies = []
|
||||||
for policy in sorted(policies, key=lambda k: k.get('value', {}).get('policySchema', '')):
|
for policy in sorted(policies, key=lambda k: k.get('value', {}).get('policySchema', '')):
|
||||||
|
print()
|
||||||
name = policy.get('value', {}).get('policySchema', '')
|
name = policy.get('value', {}).get('policySchema', '')
|
||||||
print(name)
|
print(name)
|
||||||
values = policy.get('value', {}).get('value', {})
|
values = policy.get('value', {}).get('value', {})
|
||||||
@@ -94,7 +102,6 @@ def printshow_policies():
|
|||||||
if isinstance(value, str) and value.find('_ENUM_') != -1:
|
if isinstance(value, str) and value.find('_ENUM_') != -1:
|
||||||
value = value.split('_ENUM_')[-1]
|
value = value.split('_ENUM_')[-1]
|
||||||
print(f' {setting}: {value}')
|
print(f' {setting}: {value}')
|
||||||
print()
|
|
||||||
|
|
||||||
|
|
||||||
def build_schemas(svc=None, sfilter=None):
|
def build_schemas(svc=None, sfilter=None):
|
||||||
|
|||||||
@@ -402,7 +402,9 @@ def getOrgUnitId(orgUnit, cd=None):
|
|||||||
return (orgUnit, result['orgUnitId'])
|
return (orgUnit, result['orgUnitId'])
|
||||||
|
|
||||||
|
|
||||||
def orgunit_from_orgunitid(orgunitid, cd):
|
def orgunit_from_orgunitid(orgunitid, cd=None):
|
||||||
|
if cd is None:
|
||||||
|
cd = gapi_directory.build()
|
||||||
orgunitpath = GM_Globals[GM_MAP_ORGUNIT_ID_TO_NAME].get(orgunitid)
|
orgunitpath = GM_Globals[GM_MAP_ORGUNIT_ID_TO_NAME].get(orgunitid)
|
||||||
if not orgunitpath:
|
if not orgunitpath:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
cryptography
|
cryptography
|
||||||
distro; sys_platform == 'linux'
|
distro; sys_platform == 'linux'
|
||||||
filelock
|
filelock
|
||||||
google-api-python-client>=1.7.10
|
google-api-python-client>=2.0.0
|
||||||
google-auth-httplib2
|
google-auth-httplib2
|
||||||
google-auth-oauthlib>=0.4.1
|
google-auth-oauthlib>=0.4.1
|
||||||
google-auth>=1.11.2
|
google-auth>=1.11.2
|
||||||
|
|||||||
Reference in New Issue
Block a user