Compare commits

..

10 Commits

Author SHA1 Message Date
Ross Scroggs
f12b367019 Updated license product names to match Google.
Some checks are pending
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
2025-03-22 09:32:08 -07:00
Ross Scroggs
9b130ac8bf Merge pull request #1764 from jrdnbradford/patch-1
Some checks are pending
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
Fix `mock_http.py` typo
2025-03-21 14:17:21 -07:00
Jordan Bradford
f35bde4f8b Fix mock_http.py typo 2025-03-21 17:03:18 -04:00
Jay Lee
9ffabc15ff Fix two URLs to point to GAM7 repo wiki
Some checks failed
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
2025-03-20 07:46:06 -04:00
Ross Scroggs
212460b636 Fixed bug in gam update chromepolicy where appid was misinterpreted
Some checks failed
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
2025-03-18 23:20:51 -07:00
Ross Scroggs
be0dcbc8d4 Added new GWSE licenses
Some checks are pending
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
2025-03-18 12:24:31 -07:00
Ross Scroggs
b9ca2ba9a1 Increment version
Some checks are pending
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
2025-03-18 10:21:08 -07:00
Ross Scroggs
c4dea95f08 Updated various chat space commands to handle service not available 2025-03-18 09:26:35 -07:00
Ross Scroggs
7b59b648c7 Fixed bug in `gam calendars <CalendarEntity> print events matchfield
Some checks are pending
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
2025-03-17 13:12:13 -07:00
Ross Scroggs
d791a864fa Added error message to gam report commands to indicate forbidden access
Some checks failed
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
2025-03-05 10:49:23 -08:00
8 changed files with 97 additions and 56 deletions

View File

@@ -281,11 +281,15 @@ If an item contains spaces, it should be surrounded by ".
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business | gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited | gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User | gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User |
gsuiteedu | gafe | gsuiteeducation | Google-Apps-For-Education |
gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 | Google Workspace Enterprise Plus - Archived User | gsuiteenterprisearchived | gseau | enterprisearchived | 1010340001 | Google Workspace Enterprise Plus - Archived User |
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy | gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy |
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) | gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) |
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government | gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
gsuitelite | gal | gsl | lite | Google-Apps-Lite | gsuitelite | gal | gsl | lite | Google-Apps-Lite |
gwef | workspaceeducationfundamentals | 1010070001 | Google Workspace for Education Fundamentals |
gwefau | gwefarchived | workspaceeducationfundamentalsarchived | 1010340007 | Google Workspace for Education Fundamentals - Archived User |
gwegmo | workspaceeducationgmailonly | 1010070004 | Google Workspace for Education Gmail Only |
gwep | workspaceeducationplus | 1010310008 | Google Workspace for Education Plus | gwep | workspaceeducationplus | 1010310008 | Google Workspace for Education Plus |
gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) | gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) |
gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)| gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)|

View File

@@ -1,3 +1,45 @@
7.05.13
Updated license product names to match Google.
7.05.12
Fixed bug in `gam update chromepolicy` where `appid` was misinterpreted for `chrome.devices.kiosk` policies
and an error was generated.
```
ERROR: Chrome Policy Schema: customers/C123abc456/policySchemas/<Field>, Does not exist
```
7.05.11
Added the following License SKUs:
```
ProductId SKUId Display Name
Google-Apps 1010070001 Google Workspace for Education Fundamentals
Google-Apps 1010070004 Google Workspace for Education Gmail Only
101034 1010340007 Google Workspace for Education Fundamentals - Archived User
```
7.05.10
Updated various chat space commands to handle the following error:
```
ERROR: 503: serviceNotAvailable - The service is currently unavailable
```
7.05.09
Fixed bug in `gam calendars <CalendarEntity> print events matchfield attendeesstatus required accepted resource_calendar@resource.calendar.google.com`
that caused a trap.
7.05.08
Added error message to `gam report` commands to indicate forbidden access;
previously, no error message was displayed.
```
ERROR: Customer ID: C012abc34, Caller does not have access to the customers reporting data.
```
7.05.07 7.05.07
Fixed bug in `gam calendars <CalendarEntity> info events` and `gam <UserTypeEntity> info events` Fixed bug in `gam calendars <CalendarEntity> info events` and `gam <UserTypeEntity> info events`

View File

@@ -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.05.07' __version__ = '7.05.13'
__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
@@ -909,6 +909,8 @@ def getBoolean(defaultValue=True):
Cmd.Advance() Cmd.Advance()
return False return False
if defaultValue is not None: if defaultValue is not None:
if not Cmd.Current().strip(): # If current argument is empty, skip over it
Cmd.Advance()
return defaultValue return defaultValue
invalidChoiceExit(boolean, TRUE_FALSE, False) invalidChoiceExit(boolean, TRUE_FALSE, False)
if defaultValue is not None: if defaultValue is not None:
@@ -1482,6 +1484,8 @@ def getInteger(minVal=None, maxVal=None, default=None):
return number return number
except ValueError: except ValueError:
if default is not None: if default is not None:
if not Cmd.Current().strip(): # If current argument is empty, skip over it
Cmd.Advance()
return default return default
invalidArgumentExit(integerLimits(minVal, maxVal)) invalidArgumentExit(integerLimits(minVal, maxVal))
elif default is not None: elif default is not None:
@@ -11842,7 +11846,7 @@ def doCreateProject():
# Try to set policy on project to allow Service Account Key Upload # Try to set policy on project to allow Service Account Key Upload
# orgp = getAPIService(API.ORGPOLICY, httpObj) # orgp = getAPIService(API.ORGPOLICY, httpObj)
# projectParent = f"projects/{projectInfo['projectId']}" # projectParent = f"projects/{projectInfo['projectId']}"
# policyName = f'{projectParent}/policies/iam.disableServiceAccountKeyUpload' # policyName = f'{projectParent}/policies/iam.managed.disableServiceAccountKeyUpload'
# try: # try:
# result = callGAPI(orgp.projects().policies(), 'get', # result = callGAPI(orgp.projects().policies(), 'get',
# throwReasons=[GAPI.NOT_FOUND, GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED], # throwReasons=[GAPI.NOT_FOUND, GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED],
@@ -12646,7 +12650,7 @@ def doProcessSvcAcctKeys(mode=None, iam=None, projectId=None, clientEmail=None,
return False return False
except GAPI.failedPrecondition as e: except GAPI.failedPrecondition as e:
entityActionFailedWarning([Ent.PROJECT, projectId, Ent.SVCACCT, clientEmail], str(e)) entityActionFailedWarning([Ent.PROJECT, projectId, Ent.SVCACCT, clientEmail], str(e))
if 'iam.disableServiceAccountKeyUpload' not in str(e): if 'iam.disableServiceAccountKeyUpload' not in str(e) and 'iam.managed.disableServiceAccountKeyUpload' not in str(e):
return False return False
if retry == maxRetries or mode != 'upload': if retry == maxRetries or mode != 'upload':
sys.stdout.write(Msg.ENABLE_SERVICE_ACCOUNT_PRIVATE_KEY_UPLOAD.format(projectId)) sys.stdout.write(Msg.ENABLE_SERVICE_ACCOUNT_PRIVATE_KEY_UPLOAD.format(projectId))
@@ -13429,8 +13433,8 @@ def doReportUsage():
break break
except GAPI.invalidInput as e: except GAPI.invalidInput as e:
systemErrorExit(GOOGLE_API_ERROR_RC, str(e)) systemErrorExit(GOOGLE_API_ERROR_RC, str(e))
except GAPI.forbidden: except GAPI.forbidden as e:
accessErrorExit(None) accessErrorExit(None, str(e))
if startUseDate: if startUseDate:
reportName = f'{report.capitalize()} Usage Report - {startUseDate}:{endUseDate}' reportName = f'{report.capitalize()} Usage Report - {startUseDate}:{endUseDate}'
else: else:
@@ -14027,8 +14031,8 @@ def doReport():
printErrorMessage(BAD_REQUEST_RC, Msg.BAD_REQUEST) printErrorMessage(BAD_REQUEST_RC, Msg.BAD_REQUEST)
exitUserLoop = True exitUserLoop = True
break break
except GAPI.forbidden: except GAPI.forbidden as e:
accessErrorExit(None) accessErrorExit(None, str(e))
startDateTime += oneDay startDateTime += oneDay
if exitUserLoop: if exitUserLoop:
break break
@@ -14108,8 +14112,8 @@ def doReport():
continue continue
except GAPI.invalidInput as e: except GAPI.invalidInput as e:
systemErrorExit(GOOGLE_API_ERROR_RC, str(e)) systemErrorExit(GOOGLE_API_ERROR_RC, str(e))
except GAPI.forbidden: except GAPI.forbidden as e:
accessErrorExit(None) accessErrorExit(None, str(e))
startDateTime += oneDay startDateTime += oneDay
csvPF.writeCSVfile(f'Customer Report - {tryDate}') csvPF.writeCSVfile(f'Customer Report - {tryDate}')
else: # activityReports else: # activityReports
@@ -26380,6 +26384,7 @@ def printShowChatSpaces(users):
bailOnInternalError=True, bailOnInternalError=True,
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR, throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION], GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsCS) fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsCS)
except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError, GAPI.permissionDenied) as e: except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError, GAPI.permissionDenied) as e:
exitIfChatNotConfigured(chat, kvList, str(e), i, count) exitIfChatNotConfigured(chat, kvList, str(e), i, count)
@@ -26798,6 +26803,7 @@ def syncChatMembers(users):
members = callGAPIpages(chat.spaces().members(), 'list', 'memberships', members = callGAPIpages(chat.spaces().members(), 'list', 'memberships',
pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, i, count, qfilter), pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, i, count, qfilter),
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION], throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
parent=parent, showGroups=groupsSpecified, pageSize=CHAT_PAGE_SIZE, **kwargs, **kwargsUAA) parent=parent, showGroups=groupsSpecified, pageSize=CHAT_PAGE_SIZE, **kwargs, **kwargsUAA)
for member in members: for member in members:
if 'member' in member: if 'member' in member:
@@ -26995,6 +27001,7 @@ def printShowChatMembers(users):
bailOnInternalError=True, bailOnInternalError=True,
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR, throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION], GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE, fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
**kwargsCS) **kwargsCS)
for space in spaces: for space in spaces:
@@ -27011,6 +27018,7 @@ def printShowChatMembers(users):
bailOnInternalError=True, bailOnInternalError=True,
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR, throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION], GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE, fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
**kwargsCS) **kwargsCS)
for space in spaces: for space in spaces:
@@ -27355,6 +27363,7 @@ def printShowChatMessages(users):
messages = callGAPIpages(chat.spaces().messages(), 'list', 'messages', messages = callGAPIpages(chat.spaces().messages(), 'list', 'messages',
pageMessage=_getChatPageMessage(Ent.CHAT_MESSAGE, user, i, count, qfilter), pageMessage=_getChatPageMessage(Ent.CHAT_MESSAGE, user, i, count, qfilter),
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED], throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter, showDeleted=showDeleted, pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter, showDeleted=showDeleted,
fields=fields) fields=fields)
for message in messages: for message in messages:
@@ -27472,6 +27481,7 @@ def printShowChatEvents(users):
events = callGAPIpages(chat.spaces().spaceEvents(), 'list', 'spaceEvents', events = callGAPIpages(chat.spaces().spaceEvents(), 'list', 'spaceEvents',
pageMessage=_getChatPageMessage(Ent.CHAT_EVENT, user, i, count, qfilter), pageMessage=_getChatPageMessage(Ent.CHAT_EVENT, user, i, count, qfilter),
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED], throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter) pageSize=CHAT_PAGE_SIZE, parent=parentName, filter=pfilter)
except (GAPI.notFound, GAPI.invalidArgument, GAPI.permissionDenied) as e: except (GAPI.notFound, GAPI.invalidArgument, GAPI.permissionDenied) as e:
exitIfChatNotConfigured(chat, kvList, str(e), i, count) exitIfChatNotConfigured(chat, kvList, str(e), i, count)
@@ -28192,6 +28202,7 @@ def doUpdateChromePolicy():
schemaName, schema = simplifyChromeSchema(_getChromePolicySchema(cp, Cmd.Previous(), '*')) schemaName, schema = simplifyChromeSchema(_getChromePolicySchema(cp, Cmd.Previous(), '*'))
body['requests'].append({'policyValue': {'policySchema': schemaName, 'value': {}}, body['requests'].append({'policyValue': {'policySchema': schemaName, 'value': {}},
'updateMask': ''}) 'updateMask': ''})
schemaNameList.append(schemaName)
while Cmd.ArgumentsRemaining(): while Cmd.ArgumentsRemaining():
field = getArgumentEmptyAllowed() field = getArgumentEmptyAllowed()
# Allow an empty field/value pair which makes processing an input CSV file with schemas with different numbers of fields easy # Allow an empty field/value pair which makes processing an input CSV file with schemas with different numbers of fields easy
@@ -28200,6 +28211,7 @@ def doUpdateChromePolicy():
Cmd.Advance() Cmd.Advance()
continue continue
if field in {'ou', 'org', 'orgunit', 'group', 'printerid', 'appid'} or '.' in field: if field in {'ou', 'org', 'orgunit', 'group', 'printerid', 'appid'} or '.' in field:
if field != 'appid' or not schemaName.startswith('chrome.devices.kiosk'):
Cmd.Backup() Cmd.Backup()
break # field is actually a new policy name or orgunit break # field is actually a new policy name or orgunit
# JSON # JSON
@@ -28212,7 +28224,7 @@ def doUpdateChromePolicy():
body['requests'][-1]['policyTargetKey']['additionalTargetKeys'] = {atk['name']: atk['value']} body['requests'][-1]['policyTargetKey']['additionalTargetKeys'] = {atk['name']: atk['value']}
if atk['name'] == 'app_id': if atk['name'] == 'app_id':
schemaNameAppId += f"({atk['value']})" schemaNameAppId += f"({atk['value']})"
schemaNameList.append(schemaNameAppId) schemaNameList[-1] = schemaNameAppId
for field in jsonData.get('fields', []): for field in jsonData.get('fields', []):
casedField = field['name'] casedField = field['name']
lowerField = casedField.lower() lowerField = casedField.lower()
@@ -28253,7 +28265,6 @@ 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
schemaNameList.append(schemaName)
# Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases # Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(field) tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(field)
if tmschema: if tmschema:
@@ -38688,7 +38699,7 @@ def _getEventMatchFields(calendarEventEntity, fieldsList):
else: else:
fieldsList.append('attendees/email') fieldsList.append('attendees/email')
if match[0][1] == 'status': if match[0][1] == 'status':
fieldsList.extend('attendees/optional', 'attendees/responseStatus') fieldsList.extend(['attendees/optional', 'attendees/responseStatus'])
def _eventMatches(event, match): def _eventMatches(event, match):
if match[0][0] != 'attendees': if match[0][0] != 'attendees':
@@ -42466,15 +42477,15 @@ class PasswordOptions():
up = 'password' up = 'password'
password = self.GetPassword() password = self.GetPassword()
if password: if password:
notFoundBody[up] = password if password.lower() == 'blocklogin':
if notFoundBody[up].lower() in {'blocklogin'}:
self.makeCleanPassword = False self.makeCleanPassword = False
notFoundBody[up] = self.CreateRandomPassword() notFoundBody[up] = self.CreateRandomPassword()
self.notFoundPassword = notFoundBody[up] elif password.lower() in {'random', 'uniquerandom'}:
elif notFoundBody[up].lower() in {'random', 'uniquerandom'}:
self.SetCleanPasswordLen() self.SetCleanPasswordLen()
self.makeCleanPassword = True self.makeCleanPassword = True
notFoundBody[up] = self.CreateRandomPassword() notFoundBody[up] = self.CreateRandomPassword()
else:
notFoundBody[up] = password
self.notFoundPassword = notFoundBody[up] self.notFoundPassword = notFoundBody[up]
elif myarg in {'lograndompassword', 'logpassword'}: elif myarg in {'lograndompassword', 'logpassword'}:
self.filename = getString(Cmd.OB_FILE_NAME) self.filename = getString(Cmd.OB_FILE_NAME)
@@ -42518,6 +42529,8 @@ class PasswordOptions():
self.promptForUniquePassword = True self.promptForUniquePassword = True
else: else:
self.promptForPassword = True self.promptForPassword = True
else:
self.password = password
elif up == 'hashFunction': elif up == 'hashFunction':
body[up] = self.HASH_FUNCTION_MAP[myarg] body[up] = self.HASH_FUNCTION_MAP[myarg]
self.clearPassword = self.hashPassword = False self.clearPassword = self.hashPassword = False
@@ -43027,7 +43040,7 @@ def getUserAttributes(cd, updateCmd, noUid=False):
if value: if value:
entry[argument] = value entry[argument] = value
else: else:
entry[argument] = getInteger(minVal=0, maxVal=100000) entry[argument] = getInteger(minVal=0, maxVal=100000, default=0)
elif primaryNotPrimary(argument, entry): elif primaryNotPrimary(argument, entry):
break break
else: else:
@@ -43230,9 +43243,7 @@ def doCreateUser():
cd = buildGAPIObject(API.DIRECTORY) cd = buildGAPIObject(API.DIRECTORY)
body, notify, tagReplacements, addGroups, addAliases, PwdOpts, \ body, notify, tagReplacements, addGroups, addAliases, PwdOpts, \
_, _, _, \ _, _, _, \
parameters, resolveConflictAccount = getUserAttributes(cd, parameters, resolveConflictAccount = getUserAttributes(cd, False, noUid=True)
False,
noUid=True)
suffix = 0 suffix = 0
originalEmail = body['primaryEmail'] originalEmail = body['primaryEmail']
atLoc = originalEmail.find('@') atLoc = originalEmail.find('@')
@@ -43340,8 +43351,7 @@ def updateUsers(entityList):
updateRetryDelay = 5 updateRetryDelay = 5
body, notify, tagReplacements, addGroups, addAliases, PwdOpts, \ body, notify, tagReplacements, addGroups, addAliases, PwdOpts, \
updatePrimaryEmail, notFoundBody, groupOrgUnitMap, \ updatePrimaryEmail, notFoundBody, groupOrgUnitMap, \
parameters, resolveConflictAccount = getUserAttributes(cd, parameters, resolveConflictAccount = getUserAttributes(cd, True)
True)
vfe = 'primaryEmail' in body and body['primaryEmail'][:4].lower() == 'vfe@' vfe = 'primaryEmail' in body and body['primaryEmail'][:4].lower() == 'vfe@'
if body.get('orgUnitPath', '') and parameters['immutableOUs']: if body.get('orgUnitPath', '') and parameters['immutableOUs']:
ubody = body.copy() ubody = body.copy()

View File

@@ -108,7 +108,7 @@ class MockHttpClient(atom.http_interface.GenericHttpClient):
for recording in self.recordings: for recording in self.recordings:
if recording[0].operation == operation and recording[0].url == url: if recording[0].operation == operation and recording[0].url == url:
return recording[1] return recording[1]
raise NoRecordingFound('No recodings found for %s %s' % ( raise NoRecordingFound('No recordings found for %s %s' % (
operation, url)) operation, url))
else: else:
# There is a real HTTP client, so make the request, and record the # There is a real HTTP client, so make the request, and record the

View File

@@ -118,7 +118,7 @@ Your workspace is configured to disable service account private key uploads.
Please go to: Please go to:
https://github.com/taers232c/GAMADV-XTD3/wiki/Authorization#authorize-service-account-key-uploads https://github.com/GAM-team/GAM/wiki/Authorization#authorize-service-account-key-uploads
Follow the steps to allow a service account private key upload for the project ({0}) just created. Follow the steps to allow a service account private key upload for the project ({0}) just created.
Once those steps are completed, you can continue with your project authentication. Once those steps are completed, you can continue with your project authentication.
@@ -322,7 +322,7 @@ INVALID_NUMBER_OF_CHAT_SPACE_MEMBERS = '{0} type {1} number of members, {2}, mus
INVALID_ORGUNIT = 'Invalid Organizational Unit' INVALID_ORGUNIT = 'Invalid Organizational Unit'
INVALID_PATH = 'Invalid Path' INVALID_PATH = 'Invalid Path'
INVALID_PERMISSION_ATTRIBUTE_TYPE = 'permission attribute {0} not allowed with type {1}' INVALID_PERMISSION_ATTRIBUTE_TYPE = 'permission attribute {0} not allowed with type {1}'
INVALID_REGION = 'See: https://github.com/taers232c/GAMADV-XTD3/wiki/Context-Aware-Access-Levels#caa-region-codes' INVALID_REGION = 'See: https://github.com/GAM-team/GAM/wiki/Context-Aware-Access-Levels#caa-region-codes'
INVALID_QUERY = 'Invalid Query' INVALID_QUERY = 'Invalid Query'
INVALID_RE = 'Invalid RE' INVALID_RE = 'Invalid RE'
INVALID_REQUEST = 'Invalid Request' INVALID_REQUEST = 'Invalid Request'

View File

@@ -22,7 +22,7 @@
# Products/SKUs # Products/SKUs
_PRODUCTS = { _PRODUCTS = {
'101001': 'Cloud Identity Free', '101001': 'Cloud Identity',
'101005': 'Cloud Identity Premium', '101005': 'Cloud Identity Premium',
'101031': 'Google Workspace for Education', '101031': 'Google Workspace for Education',
'101033': 'Google Voice', '101033': 'Google Voice',
@@ -47,6 +47,10 @@ _SKUS = {
'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'}, 'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'},
'1010050001': { '1010050001': {
'product': '101005', 'aliases': ['identitypremium', 'cloudidentitypremium'], 'displayName': 'Cloud Identity Premium'}, 'product': '101005', 'aliases': ['identitypremium', 'cloudidentitypremium'], 'displayName': 'Cloud Identity Premium'},
'1010070001': {
'product': 'Google-Apps', 'aliases': ['gwef', 'workspaceeducationfundamentals'], 'displayName': 'Google Workspace for Education Fundamentals'},
'1010070004': {
'product': 'Google-Apps', 'aliases': ['gwegmo', 'workspaceeducationgmailonly'], 'displayName': 'Google Workspace for Education Gmail Only'},
'1010310002': { '1010310002': {
'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'}, 'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'},
'1010310003': { '1010310003': {
@@ -111,6 +115,8 @@ _SKUS = {
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'}, 'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
'Google-Apps-For-Business': { 'Google-Apps-For-Business': {
'product': 'Google-Apps', 'aliases': ['gafb', 'gafw', 'basic', 'gsuitebasic'], 'displayName': 'G Suite Basic'}, 'product': 'Google-Apps', 'aliases': ['gafb', 'gafw', 'basic', 'gsuitebasic'], 'displayName': 'G Suite Basic'},
'Google-Apps-For-Education': {
'product': 'Google-Apps', 'aliases': ['gafe', 'gsuiteeducation', 'gsuiteedu'], 'displayName': 'Google Workspace for Education - Fundamentals'},
'Google-Apps-For-Government': { 'Google-Apps-For-Government': {
'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'}, 'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'},
'Google-Apps-For-Postini': { 'Google-Apps-For-Postini': {
@@ -121,7 +127,7 @@ _SKUS = {
'product': 'Google-Apps', 'aliases': ['gau', 'gsb', 'unlimited', 'gsuitebusiness'], 'displayName': 'G Suite Business'}, 'product': 'Google-Apps', 'aliases': ['gau', 'gsb', 'unlimited', 'gsuitebusiness'], 'displayName': 'G Suite Business'},
'1010020020': { '1010020020': {
'product': 'Google-Apps', 'aliases': ['gae', 'gse', 'enterprise', 'gsuiteenterprise', 'product': 'Google-Apps', 'aliases': ['gae', 'gse', 'enterprise', 'gsuiteenterprise',
'wsentplus', 'workspaceenterpriseplus'], 'displayName': 'Google Workspace Enterprise Plus'}, 'wsentplus', 'workspaceenterpriseplus'], 'displayName': 'Google Workspace Enterprise Plus (formerly G Suite Enterprise)'},
'1010020025': { '1010020025': {
'product': 'Google-Apps', 'aliases': ['wsbizplus', 'workspacebusinessplus'], 'displayName': 'Google Workspace Business Plus'}, 'product': 'Google-Apps', 'aliases': ['wsbizplus', 'workspacebusinessplus'], 'displayName': 'Google Workspace Business Plus'},
'1010020026': { '1010020026': {
@@ -148,14 +154,16 @@ _SKUS = {
'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'}, 'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'},
'1010340006': { '1010340006': {
'product': '101034', 'aliases': ['wsbizstanarchived', 'workspacebusinessstanarchived'], 'displayName': 'Google Workspace Business Standard - Archived User'}, 'product': '101034', 'aliases': ['wsbizstanarchived', 'workspacebusinessstanarchived'], 'displayName': 'Google Workspace Business Standard - Archived User'},
'1010340007': {
'product': '101034', 'aliases': ['gwefau', 'gwefarchived', 'workspaceeducationfundamentalsarchived'], 'displayName': 'Google Workspace for Education Fundamentals - Archived User'},
'1010060001': { '1010060001': {
'product': '101006', 'aliases': ['gsuiteessentials', 'essentials', 'product': '101006', 'aliases': ['gsuiteessentials', 'essentials',
'd4e', 'driveenterprise', 'drive4enterprise', 'd4e', 'driveenterprise', 'drive4enterprise',
'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials'}, 'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials (formerly G Suite Essentials)'},
'1010060003': { '1010060003': {
'product': 'Google-Apps', 'aliases': ['wsentess', 'workspaceenterpriseessentials'], 'displayName': 'Google Workspace Enterprise Essentials'}, 'product': 'Google-Apps', 'aliases': ['wsentess', 'workspaceenterpriseessentials'], 'displayName': 'Google Workspace Enterprise Essentials'},
'1010060005': { '1010060005': {
'product': 'Google-Apps', 'aliases': ['wsessplus', 'workspaceessentialsplus'], 'displayName': 'Google Workspace Essentials Plus'}, 'product': 'Google-Apps', 'aliases': ['wsessplus', 'workspaceessentialsplus'], 'displayName': 'Google Workspace Enterprise Essentials Plus'},
'Google-Drive-storage-20GB': { 'Google-Drive-storage-20GB': {
'product': 'Google-Drive-storage', 'aliases': ['drive20gb', '20gb', 'googledrivestorage20gb'], 'displayName': 'Google Drive Storage 20GB'}, 'product': 'Google-Drive-storage', 'aliases': ['drive20gb', '20gb', 'googledrivestorage20gb'], 'displayName': 'Google Drive Storage 20GB'},
'Google-Drive-storage-50GB': { 'Google-Drive-storage-50GB': {

View File

@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
__version__ = "2.156.0" __version__ = "2.164.0"

View File

@@ -1,23 +0,0 @@
accesscontextmanager.googleapis.com
admin.googleapis.com
alertcenter.googleapis.com
calendar-json.googleapis.com
chat.googleapis.com
chromemanagement.googleapis.com
chromepolicy.googleapis.com
classroom.googleapis.com
cloudidentity.googleapis.com
cloudresourcemanager.googleapis.com
contacts.googleapis.com
drive.googleapis.com
driveactivity.googleapis.com
iap.googleapis.com
gmail.googleapis.com
groupssettings.googleapis.com
iam.googleapis.com
licensing.googleapis.com
reseller.googleapis.com
sheets.googleapis.com
siteverification.googleapis.com
storage-api.googleapis.com
vault.googleapis.com