MacOS 10.15.6, fix groups+DASA+user info

This commit is contained in:
Jay Lee
2020-09-18 10:23:55 -04:00
parent 31f83d33f5
commit c88c755785
2 changed files with 8 additions and 2 deletions

View File

@ -29,7 +29,7 @@ gamversion="latest"
adminuser=""
regularuser=""
gam_glibc_vers="2.27 2.23"
gam_macos_vers="10.15.4 10.14.6 10.13.6"
gam_macos_vers="10.15.6 10.14.6 10.13.6"
while getopts "hd:a:o:b:lp:u:r:v:" OPTION
do

View File

@ -8792,6 +8792,12 @@ def doGetUserInfo(user_email=None):
print(f' {alias}')
if getGroups:
throw_reasons = [gapi_errors.ErrorReason.FORBIDDEN]
kwargs = {}
if GC_Values[GC_ENABLE_DASA]:
# Allows groups.list() to function but will limit
# returned groups to those in same domain as user
# so only do this for DASA admins
kwargs['domain'] = GC_Values[GC_DOMAIN]
try:
groups = gapi.get_all_pages(
cd.groups(),
@ -8799,7 +8805,7 @@ def doGetUserInfo(user_email=None):
'groups',
userKey=user_email,
fields='groups(name,email),nextPageToken',
throw_reasons=throw_reasons)
throw_reasons=throw_reasons, **kwargs)
if groups:
print(f'Groups: ({len(groups)})')
for group in groups: