mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
Issue #1722
Some checks failed
Build and test GAM / build (Win64, build, 9, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, [self-hosted linux arm64]) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 5, linux-aarch64, [self-hosted linux arm64], yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 7, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, 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, 4, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 6, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.9) (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
Some checks failed
Build and test GAM / build (Win64, build, 9, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, [self-hosted linux arm64]) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 5, linux-aarch64, [self-hosted linux arm64], yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 7, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, 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, 4, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 6, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.9) (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
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
7.01.03
|
||||||
|
|
||||||
|
Fixed bug in `gam update cigroups <GroupEntity> delete|sync|update` where `cbcm-browser` and `chrome-os_device`
|
||||||
|
addresses were not properly handled.
|
||||||
|
|
||||||
7.01.02
|
7.01.02
|
||||||
|
|
||||||
Added option `positivecountsonly` to `gam <UserTypeEntity> print|show filecomments` that causes
|
Added option `positivecountsonly` to `gam <UserTypeEntity> print|show filecomments` that causes
|
||||||
|
|||||||
@@ -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.01.02'
|
__version__ = '7.01.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
|
||||||
@@ -5729,8 +5729,10 @@ def convertUIDtoEmailAddressWithType(emailAddressOrUID, cd=None, sal=None, email
|
|||||||
# Convert UID to email address
|
# Convert UID to email address
|
||||||
def convertUIDtoEmailAddress(emailAddressOrUID, cd=None, emailTypes=None,
|
def convertUIDtoEmailAddress(emailAddressOrUID, cd=None, emailTypes=None,
|
||||||
checkForCustomerId=False, ciGroupsAPI=False, aliasAllowed=True):
|
checkForCustomerId=False, ciGroupsAPI=False, aliasAllowed=True):
|
||||||
if emailAddressOrUID.startswith('cbcm-browser.'):
|
if ciGroupsAPI:
|
||||||
return emailAddressOrUID
|
normalizedEmailAddressOrUID = normalizeEmailAddressOrUID(emailAddressOrUID, ciGroupsAPI=ciGroupsAPI)
|
||||||
|
if normalizedEmailAddressOrUID.startswith('cbcm-browser.') or normalizedEmailAddressOrUID.startswith('chrome-os-device.'):
|
||||||
|
return normalizedEmailAddressOrUID
|
||||||
email, _ = convertUIDtoEmailAddressWithType(emailAddressOrUID, cd, emailTypes,
|
email, _ = convertUIDtoEmailAddressWithType(emailAddressOrUID, cd, emailTypes,
|
||||||
checkForCustomerId, ciGroupsAPI, aliasAllowed)
|
checkForCustomerId, ciGroupsAPI, aliasAllowed)
|
||||||
return email
|
return email
|
||||||
@@ -34639,7 +34641,7 @@ def doUpdateCIGroups():
|
|||||||
continue
|
continue
|
||||||
_batchAddGroupMembers(parent, i, count,
|
_batchAddGroupMembers(parent, i, count,
|
||||||
[convertUIDtoEmailAddress(member, cd=cd, emailTypes='any',
|
[convertUIDtoEmailAddress(member, cd=cd, emailTypes='any',
|
||||||
checkForCustomerId=True) for member in addMembers],
|
checkForCustomerId=True, ciGroupsAPI=True) for member in addMembers],
|
||||||
role, expireTime)
|
role, expireTime)
|
||||||
elif CL_subCommand in {'delete', 'remove'}:
|
elif CL_subCommand in {'delete', 'remove'}:
|
||||||
baseRole, groupMemberType = _getRoleGroupMemberType()
|
baseRole, groupMemberType = _getRoleGroupMemberType()
|
||||||
@@ -34681,11 +34683,12 @@ def doUpdateCIGroups():
|
|||||||
j = 0
|
j = 0
|
||||||
for member in removeMembers:
|
for member in removeMembers:
|
||||||
j += 1
|
j += 1
|
||||||
memberEmail = convertUIDtoEmailAddress(member, cd=cd, emailTypes='any', checkForCustomerId=True)
|
memberEmail = convertUIDtoEmailAddress(member, cd=cd, emailTypes='any',
|
||||||
|
checkForCustomerId=True, ciGroupsAPI=True)
|
||||||
try:
|
try:
|
||||||
memberName = callGAPI(ci.groups().memberships(), 'lookup',
|
memberName = callGAPI(ci.groups().memberships(), 'lookup',
|
||||||
throwReasons=GAPI.CIGROUP_GET_THROW_REASONS,
|
throwReasons=GAPI.CIGROUP_GET_THROW_REASONS,
|
||||||
parent=parent, memberKey_id=member, fields='name').get('name')
|
parent=parent, memberKey_id=memberEmail, fields='name').get('name')
|
||||||
callGAPI(ci.groups().memberships(), 'delete',
|
callGAPI(ci.groups().memberships(), 'delete',
|
||||||
throwReasons=GAPI.MEMBERS_THROW_REASONS+[GAPI.FAILED_PRECONDITION],
|
throwReasons=GAPI.MEMBERS_THROW_REASONS+[GAPI.FAILED_PRECONDITION],
|
||||||
name=memberName)
|
name=memberName)
|
||||||
@@ -34714,7 +34717,7 @@ def doUpdateCIGroups():
|
|||||||
syncMembersMaps[baseRole] = {}
|
syncMembersMaps[baseRole] = {}
|
||||||
for member in syncMembers:
|
for member in syncMembers:
|
||||||
syncMembersSets[baseRole].add(_cleanConsumerAddress(convertUIDtoEmailAddress(member, cd=cd, emailTypes='any',
|
syncMembersSets[baseRole].add(_cleanConsumerAddress(convertUIDtoEmailAddress(member, cd=cd, emailTypes='any',
|
||||||
checkForCustomerId=True), syncMembersMaps[baseRole]))
|
checkForCustomerId=True, ciGroupsAPI=True), syncMembersMaps[baseRole]))
|
||||||
checkForExtraneousArguments()
|
checkForExtraneousArguments()
|
||||||
i = 0
|
i = 0
|
||||||
count = len(entityList)
|
count = len(entityList)
|
||||||
@@ -34836,7 +34839,8 @@ def doUpdateCIGroups():
|
|||||||
j = 0
|
j = 0
|
||||||
for member in updateMembers:
|
for member in updateMembers:
|
||||||
j += 1
|
j += 1
|
||||||
memberEmail = convertUIDtoEmailAddress(member, cd=cd, emailTypes='any', checkForCustomerId=True)
|
memberEmail = convertUIDtoEmailAddress(member, cd=cd, emailTypes='any',
|
||||||
|
checkForCustomerId=True, ciGroupsAPI=True)
|
||||||
try:
|
try:
|
||||||
memberName = callGAPI(ci.groups().memberships(), 'lookup',
|
memberName = callGAPI(ci.groups().memberships(), 'lookup',
|
||||||
throwReasons=GAPI.CIGROUP_GET_THROW_REASONS,
|
throwReasons=GAPI.CIGROUP_GET_THROW_REASONS,
|
||||||
|
|||||||
Reference in New Issue
Block a user