mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-18 21:21:37 +00:00
Compare commits
8 Commits
v7.05.09
...
20250322.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f12b367019 | ||
|
|
9b130ac8bf | ||
|
|
f35bde4f8b | ||
|
|
9ffabc15ff | ||
|
|
212460b636 | ||
|
|
be0dcbc8d4 | ||
|
|
b9ca2ba9a1 | ||
|
|
c4dea95f08 |
@@ -281,11 +281,15 @@ If an item contains spaces, it should be surrounded by ".
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
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 |
|
||||
gsuiteenterpriseeducation | gsefe | e4e | 1010310002 | Google Workspace for Education Plus - Legacy |
|
||||
gsuiteenterpriseeducationstudent | gsefes | e4es | 1010310003 | Google Workspace for Education Plus - Legacy (Student) |
|
||||
gsuitegov | gafg | gsuitegovernment | Google-Apps-For-Government |
|
||||
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 |
|
||||
gwepstaff | workspaceeducationplusstaff | 1010310009 | Google Workspace for Education Plus (Staff) |
|
||||
gwepstudent | workspaceeducationplusstudent | 1010310010 | Google Workspace for Education Plus (Extra Student)|
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
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`
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.05.09'
|
||||
__version__ = '7.05.13'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -26384,6 +26384,7 @@ def printShowChatSpaces(users):
|
||||
bailOnInternalError=True,
|
||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
||||
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||
fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsCS)
|
||||
except (GAPI.notFound, GAPI.invalidArgument, GAPI.internalError, GAPI.permissionDenied) as e:
|
||||
exitIfChatNotConfigured(chat, kvList, str(e), i, count)
|
||||
@@ -26802,6 +26803,7 @@ def syncChatMembers(users):
|
||||
members = callGAPIpages(chat.spaces().members(), 'list', 'memberships',
|
||||
pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, i, count, qfilter),
|
||||
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)
|
||||
for member in members:
|
||||
if 'member' in member:
|
||||
@@ -26999,6 +27001,7 @@ def printShowChatMembers(users):
|
||||
bailOnInternalError=True,
|
||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
||||
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
|
||||
**kwargsCS)
|
||||
for space in spaces:
|
||||
@@ -27015,6 +27018,7 @@ def printShowChatMembers(users):
|
||||
bailOnInternalError=True,
|
||||
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
||||
GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||
fields="nextPageToken,spaces(name,displayName,spaceType,membershipCount)", pageSize=CHAT_PAGE_SIZE,
|
||||
**kwargsCS)
|
||||
for space in spaces:
|
||||
@@ -27359,6 +27363,7 @@ def printShowChatMessages(users):
|
||||
messages = callGAPIpages(chat.spaces().messages(), 'list', 'messages',
|
||||
pageMessage=_getChatPageMessage(Ent.CHAT_MESSAGE, user, i, count, qfilter),
|
||||
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,
|
||||
fields=fields)
|
||||
for message in messages:
|
||||
@@ -27476,6 +27481,7 @@ def printShowChatEvents(users):
|
||||
events = callGAPIpages(chat.spaces().spaceEvents(), 'list', 'spaceEvents',
|
||||
pageMessage=_getChatPageMessage(Ent.CHAT_EVENT, user, i, count, qfilter),
|
||||
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)
|
||||
except (GAPI.notFound, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
||||
exitIfChatNotConfigured(chat, kvList, str(e), i, count)
|
||||
@@ -28196,6 +28202,7 @@ def doUpdateChromePolicy():
|
||||
schemaName, schema = simplifyChromeSchema(_getChromePolicySchema(cp, Cmd.Previous(), '*'))
|
||||
body['requests'].append({'policyValue': {'policySchema': schemaName, 'value': {}},
|
||||
'updateMask': ''})
|
||||
schemaNameList.append(schemaName)
|
||||
while Cmd.ArgumentsRemaining():
|
||||
field = getArgumentEmptyAllowed()
|
||||
# Allow an empty field/value pair which makes processing an input CSV file with schemas with different numbers of fields easy
|
||||
@@ -28204,8 +28211,9 @@ def doUpdateChromePolicy():
|
||||
Cmd.Advance()
|
||||
continue
|
||||
if field in {'ou', 'org', 'orgunit', 'group', 'printerid', 'appid'} or '.' in field:
|
||||
Cmd.Backup()
|
||||
break # field is actually a new policy name or orgunit
|
||||
if field != 'appid' or not schemaName.startswith('chrome.devices.kiosk'):
|
||||
Cmd.Backup()
|
||||
break # field is actually a new policy name or orgunit
|
||||
# JSON
|
||||
if field == 'json':
|
||||
jsonData = getJSON(['direct', 'name', 'orgUnitPath', 'parentOrgUnitPath', 'group'])
|
||||
@@ -28216,7 +28224,7 @@ def doUpdateChromePolicy():
|
||||
body['requests'][-1]['policyTargetKey']['additionalTargetKeys'] = {atk['name']: atk['value']}
|
||||
if atk['name'] == 'app_id':
|
||||
schemaNameAppId += f"({atk['value']})"
|
||||
schemaNameList.append(schemaNameAppId)
|
||||
schemaNameList[-1] = schemaNameAppId
|
||||
for field in jsonData.get('fields', []):
|
||||
casedField = field['name']
|
||||
lowerField = casedField.lower()
|
||||
@@ -28257,7 +28265,6 @@ def doUpdateChromePolicy():
|
||||
body['requests'][-1]['policyValue']['value'][casedField] = value
|
||||
body['requests'][-1]['updateMask'] += f'{casedField},'
|
||||
break
|
||||
schemaNameList.append(schemaName)
|
||||
# Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
|
||||
tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(field)
|
||||
if tmschema:
|
||||
@@ -42470,16 +42477,16 @@ class PasswordOptions():
|
||||
up = 'password'
|
||||
password = self.GetPassword()
|
||||
if password:
|
||||
notFoundBody[up] = password
|
||||
if notFoundBody[up].lower() in {'blocklogin'}:
|
||||
if password.lower() == 'blocklogin':
|
||||
self.makeCleanPassword = False
|
||||
notFoundBody[up] = self.CreateRandomPassword()
|
||||
self.notFoundPassword = notFoundBody[up]
|
||||
elif notFoundBody[up].lower() in {'random', 'uniquerandom'}:
|
||||
elif password.lower() in {'random', 'uniquerandom'}:
|
||||
self.SetCleanPasswordLen()
|
||||
self.makeCleanPassword = True
|
||||
notFoundBody[up] = self.CreateRandomPassword()
|
||||
self.notFoundPassword = notFoundBody[up]
|
||||
else:
|
||||
notFoundBody[up] = password
|
||||
self.notFoundPassword = notFoundBody[up]
|
||||
elif myarg in {'lograndompassword', 'logpassword'}:
|
||||
self.filename = getString(Cmd.OB_FILE_NAME)
|
||||
else:
|
||||
@@ -42522,6 +42529,8 @@ class PasswordOptions():
|
||||
self.promptForUniquePassword = True
|
||||
else:
|
||||
self.promptForPassword = True
|
||||
else:
|
||||
self.password = password
|
||||
elif up == 'hashFunction':
|
||||
body[up] = self.HASH_FUNCTION_MAP[myarg]
|
||||
self.clearPassword = self.hashPassword = False
|
||||
@@ -43234,9 +43243,7 @@ def doCreateUser():
|
||||
cd = buildGAPIObject(API.DIRECTORY)
|
||||
body, notify, tagReplacements, addGroups, addAliases, PwdOpts, \
|
||||
_, _, _, \
|
||||
parameters, resolveConflictAccount = getUserAttributes(cd,
|
||||
False,
|
||||
noUid=True)
|
||||
parameters, resolveConflictAccount = getUserAttributes(cd, False, noUid=True)
|
||||
suffix = 0
|
||||
originalEmail = body['primaryEmail']
|
||||
atLoc = originalEmail.find('@')
|
||||
@@ -43344,8 +43351,7 @@ def updateUsers(entityList):
|
||||
updateRetryDelay = 5
|
||||
body, notify, tagReplacements, addGroups, addAliases, PwdOpts, \
|
||||
updatePrimaryEmail, notFoundBody, groupOrgUnitMap, \
|
||||
parameters, resolveConflictAccount = getUserAttributes(cd,
|
||||
True)
|
||||
parameters, resolveConflictAccount = getUserAttributes(cd, True)
|
||||
vfe = 'primaryEmail' in body and body['primaryEmail'][:4].lower() == 'vfe@'
|
||||
if body.get('orgUnitPath', '') and parameters['immutableOUs']:
|
||||
ubody = body.copy()
|
||||
|
||||
@@ -108,7 +108,7 @@ class MockHttpClient(atom.http_interface.GenericHttpClient):
|
||||
for recording in self.recordings:
|
||||
if recording[0].operation == operation and recording[0].url == url:
|
||||
return recording[1]
|
||||
raise NoRecordingFound('No recodings found for %s %s' % (
|
||||
raise NoRecordingFound('No recordings found for %s %s' % (
|
||||
operation, url))
|
||||
else:
|
||||
# There is a real HTTP client, so make the request, and record the
|
||||
|
||||
@@ -118,7 +118,7 @@ Your workspace is configured to disable service account private key uploads.
|
||||
|
||||
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.
|
||||
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_PATH = 'Invalid Path'
|
||||
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_RE = 'Invalid RE'
|
||||
INVALID_REQUEST = 'Invalid Request'
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
# Products/SKUs
|
||||
_PRODUCTS = {
|
||||
'101001': 'Cloud Identity Free',
|
||||
'101001': 'Cloud Identity',
|
||||
'101005': 'Cloud Identity Premium',
|
||||
'101031': 'Google Workspace for Education',
|
||||
'101033': 'Google Voice',
|
||||
@@ -47,6 +47,10 @@ _SKUS = {
|
||||
'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'},
|
||||
'1010050001': {
|
||||
'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': {
|
||||
'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'},
|
||||
'1010310003': {
|
||||
@@ -111,6 +115,8 @@ _SKUS = {
|
||||
'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
|
||||
'Google-Apps-For-Business': {
|
||||
'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': {
|
||||
'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'},
|
||||
'Google-Apps-For-Postini': {
|
||||
@@ -121,7 +127,7 @@ _SKUS = {
|
||||
'product': 'Google-Apps', 'aliases': ['gau', 'gsb', 'unlimited', 'gsuitebusiness'], 'displayName': 'G Suite Business'},
|
||||
'1010020020': {
|
||||
'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': {
|
||||
'product': 'Google-Apps', 'aliases': ['wsbizplus', 'workspacebusinessplus'], 'displayName': 'Google Workspace Business Plus'},
|
||||
'1010020026': {
|
||||
@@ -148,14 +154,16 @@ _SKUS = {
|
||||
'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'},
|
||||
'1010340006': {
|
||||
'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': {
|
||||
'product': '101006', 'aliases': ['gsuiteessentials', 'essentials',
|
||||
'd4e', 'driveenterprise', 'drive4enterprise',
|
||||
'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials'},
|
||||
'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials (formerly G Suite Essentials)'},
|
||||
'1010060003': {
|
||||
'product': 'Google-Apps', 'aliases': ['wsentess', 'workspaceenterpriseessentials'], 'displayName': 'Google Workspace Enterprise Essentials'},
|
||||
'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': {
|
||||
'product': 'Google-Drive-storage', 'aliases': ['drive20gb', '20gb', 'googledrivestorage20gb'], 'displayName': 'Google Drive Storage 20GB'},
|
||||
'Google-Drive-storage-50GB': {
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user