mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Compare commits
6 Commits
v7.03.01
...
20250204.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05333d9521 | ||
|
|
b04ba4b618 | ||
|
|
c8108dace0 | ||
|
|
83a70d656e | ||
|
|
3a38609fbb | ||
|
|
e744aa29e3 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -129,7 +129,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
cache.tar.xz
|
cache.tar.xz
|
||||||
key: gam-${{ matrix.jid }}-20250116
|
key: gam-${{ matrix.jid }}-20250204
|
||||||
|
|
||||||
- name: Untar Cache archive
|
- name: Untar Cache archive
|
||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
7.03.03
|
||||||
|
|
||||||
|
Fixed bug in `gam update resoldcustomer` that caused the following error:
|
||||||
|
```
|
||||||
|
ERROR: Got an unexpected keyword argument customerAuthToken
|
||||||
|
```
|
||||||
|
|
||||||
|
7.03.02
|
||||||
|
|
||||||
|
Updated `gam <UserTypeEntity> show labels nested` to properly display label nesting
|
||||||
|
when labels have embedded `/` characters in their names.
|
||||||
|
|
||||||
7.03.01
|
7.03.01
|
||||||
|
|
||||||
Updated `gam create project` to retry the following unexpected error:
|
Updated `gam create project` to retry the following unexpected error:
|
||||||
|
|||||||
@@ -112,6 +112,12 @@ else
|
|||||||
check_type="authenticated"
|
check_type="authenticated"
|
||||||
curl_opts=( "$GHCLIENT" )
|
curl_opts=( "$GHCLIENT" )
|
||||||
fi
|
fi
|
||||||
|
curl_ver=$(curl --version|head -1|cut -d " " -f 2)
|
||||||
|
if [[ "${curl_ver:0:4}" < "7.76" ]]; then
|
||||||
|
curl_fail=( )
|
||||||
|
else
|
||||||
|
curl_fail=( "--fail-with-body" )
|
||||||
|
fi
|
||||||
echo_yellow "Checking GitHub URL $release_url for $gamversion GAM release ($check_type)..."
|
echo_yellow "Checking GitHub URL $release_url for $gamversion GAM release ($check_type)..."
|
||||||
release_json=$(curl \
|
release_json=$(curl \
|
||||||
--silent \
|
--silent \
|
||||||
@@ -119,7 +125,7 @@ release_json=$(curl \
|
|||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
"$release_url" \
|
"$release_url" \
|
||||||
--fail-with-body)
|
"${curl_fail[@]}")
|
||||||
curl_exit_code=$?
|
curl_exit_code=$?
|
||||||
if [ $curl_exit_code -ne 0 ]; then
|
if [ $curl_exit_code -ne 0 ]; then
|
||||||
echo_red "ERROR retrieving URL: ${release_json}"
|
echo_red "ERROR retrieving URL: ${release_json}"
|
||||||
|
|||||||
@@ -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.03.01'
|
__version__ = '7.03.03'
|
||||||
__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
|
||||||
@@ -15110,11 +15110,11 @@ def doCreateResoldCustomer():
|
|||||||
def doUpdateResoldCustomer():
|
def doUpdateResoldCustomer():
|
||||||
res = buildGAPIObject(API.RESELLER)
|
res = buildGAPIObject(API.RESELLER)
|
||||||
customerId = getString(Cmd.OB_CUSTOMER_ID)
|
customerId = getString(Cmd.OB_CUSTOMER_ID)
|
||||||
customerAuthToken, body = _getResoldCustomerAttr()
|
_, body = _getResoldCustomerAttr()
|
||||||
try:
|
try:
|
||||||
callGAPI(res.customers(), 'patch',
|
callGAPI(res.customers(), 'patch',
|
||||||
throwReasons=GAPI.RESELLER_THROW_REASONS,
|
throwReasons=GAPI.RESELLER_THROW_REASONS,
|
||||||
customerId=customerId, body=body, customerAuthToken=customerAuthToken, fields='')
|
customerId=customerId, body=body, fields='')
|
||||||
entityActionPerformed([Ent.CUSTOMER_ID, customerId])
|
entityActionPerformed([Ent.CUSTOMER_ID, customerId])
|
||||||
except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden, GAPI.invalid) as e:
|
except (GAPI.badRequest, GAPI.resourceNotFound, GAPI.forbidden, GAPI.invalid) as e:
|
||||||
entityActionFailedWarning([Ent.CUSTOMER_ID, customerId], str(e))
|
entityActionFailedWarning([Ent.CUSTOMER_ID, customerId], str(e))
|
||||||
@@ -31731,6 +31731,8 @@ def doCreateGroup(ciGroupsAPI=False):
|
|||||||
'query': getString(Cmd.OB_QUERY)})
|
'query': getString(Cmd.OB_QUERY)})
|
||||||
elif ciGroupsAPI and myarg == 'makeowner':
|
elif ciGroupsAPI and myarg == 'makeowner':
|
||||||
initialGroupConfig = 'WITH_INITIAL_OWNER'
|
initialGroupConfig = 'WITH_INITIAL_OWNER'
|
||||||
|
elif ciGroupsAPI and myarg == 'security':
|
||||||
|
body['labels'][CIGROUP_SECURITY_LABEL] = ''
|
||||||
elif myarg == 'verifynotinvitable':
|
elif myarg == 'verifynotinvitable':
|
||||||
verifyNotInvitable = True
|
verifyNotInvitable = True
|
||||||
else:
|
else:
|
||||||
@@ -34609,6 +34611,7 @@ def doPrintShowGroupTree():
|
|||||||
|
|
||||||
# gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>
|
# gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>
|
||||||
# [makeowner] [alias|aliases <CIGroupAliasList>] [dynamic <QueryDynamicGroup>]
|
# [makeowner] [alias|aliases <CIGroupAliasList>] [dynamic <QueryDynamicGroup>]
|
||||||
|
# [security]
|
||||||
def doCreateCIGroup():
|
def doCreateCIGroup():
|
||||||
doCreateGroup(ciGroupsAPI=True)
|
doCreateGroup(ciGroupsAPI=True)
|
||||||
|
|
||||||
@@ -39162,10 +39165,12 @@ def _wipeCalendarEvents(user, origCal, calIds, count):
|
|||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
callGAPI(cal.calendars(), 'clear',
|
callGAPI(cal.calendars(), 'clear',
|
||||||
throwReasons=GAPI.CALENDAR_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.FORBIDDEN, GAPI.INVALID, GAPI.REQUIRED_ACCESS_LEVEL],
|
throwReasons=GAPI.CALENDAR_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.FORBIDDEN, GAPI.INVALID,
|
||||||
|
GAPI.REQUIRED_ACCESS_LEVEL, GAPI.SERVICE_NOT_AVAILABLE],
|
||||||
|
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||||
calendarId=calId)
|
calendarId=calId)
|
||||||
entityActionPerformed([Ent.CALENDAR, calId], i, count)
|
entityActionPerformed([Ent.CALENDAR, calId], i, count)
|
||||||
except (GAPI.notFound, GAPI.forbidden, GAPI.invalid, GAPI.requiredAccessLevel) as e:
|
except (GAPI.notFound, GAPI.forbidden, GAPI.invalid, GAPI.requiredAccessLevel, GAPI.serviceNotAvailable) as e:
|
||||||
entityActionFailedWarning([Ent.CALENDAR, calId], str(e), i, count)
|
entityActionFailedWarning([Ent.CALENDAR, calId], str(e), i, count)
|
||||||
except GAPI.notACalendarUser:
|
except GAPI.notACalendarUser:
|
||||||
userCalServiceNotEnabledWarning(calId, i, count)
|
userCalServiceNotEnabledWarning(calId, i, count)
|
||||||
@@ -69399,13 +69404,18 @@ LABEL_COUNTS_FIELDS = ','.join(LABEL_COUNTS_FIELDS_LIST)
|
|||||||
def printShowLabels(users):
|
def printShowLabels(users):
|
||||||
def _buildLabelTree(labels):
|
def _buildLabelTree(labels):
|
||||||
def _checkChildLabel(label):
|
def _checkChildLabel(label):
|
||||||
if label.find('/') != -1:
|
labelItemList = label.split('/')
|
||||||
(parent, base) = label.rsplit('/', 1)
|
i = len(labelItemList)-1
|
||||||
|
while i > 0:
|
||||||
|
parent = '/'.join(labelItemList[:i])
|
||||||
|
base = '/'.join(labelItemList[i:])
|
||||||
if parent in labelTree:
|
if parent in labelTree:
|
||||||
if label in labelTree:
|
if label in labelTree:
|
||||||
labelTree[label]['info']['base'] = base
|
labelTree[label]['info']['base'] = base
|
||||||
labelTree[parent]['children'].append(labelTree.pop(label))
|
labelTree[parent]['children'].append(labelTree.pop(label))
|
||||||
_checkChildLabel(parent)
|
_checkChildLabel(parent)
|
||||||
|
return
|
||||||
|
i -= 1
|
||||||
|
|
||||||
labelTree = {}
|
labelTree = {}
|
||||||
for label in labels['labels']:
|
for label in labels['labels']:
|
||||||
|
|||||||
Reference in New Issue
Block a user