gam7 7.6.11__py3-none-any.whl → 7.6.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gam7 might be problematic. Click here for more details.
- gam/__init__.py +107 -83
- gam/gamlib/glapi.py +0 -7
- gam/gamlib/glclargs.py +0 -2
- gam/gamlib/glentity.py +0 -2
- {gam7-7.6.11.dist-info → gam7-7.6.13.dist-info}/METADATA +1 -1
- {gam7-7.6.11.dist-info → gam7-7.6.13.dist-info}/RECORD +9 -9
- {gam7-7.6.11.dist-info → gam7-7.6.13.dist-info}/WHEEL +0 -0
- {gam7-7.6.11.dist-info → gam7-7.6.13.dist-info}/entry_points.txt +0 -0
- {gam7-7.6.11.dist-info → gam7-7.6.13.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
|
28
|
-
__version__ = '7.06.
|
|
28
|
+
__version__ = '7.06.13'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -5981,7 +5981,7 @@ def getCIGroupMemberRoleFixType(member):
|
|
|
5981
5981
|
else:
|
|
5982
5982
|
member['type'] = Ent.TYPE_OTHER
|
|
5983
5983
|
roles = {}
|
|
5984
|
-
memberRoles = member.get('roles', [{'name': Ent.
|
|
5984
|
+
memberRoles = member.get('roles', [{'name': Ent.ROLE_MEMBER}])
|
|
5985
5985
|
for role in memberRoles:
|
|
5986
5986
|
roles[role['name']] = role
|
|
5987
5987
|
for a_role in [Ent.ROLE_OWNER, Ent.ROLE_MANAGER, Ent.ROLE_MEMBER]:
|
|
@@ -6019,7 +6019,7 @@ def getCIGroupTransitiveMemberRoleFixType(groupName, tmember):
|
|
|
6019
6019
|
trole['name'] = Ent.ROLE_MANAGER
|
|
6020
6020
|
memberRoles.append(trole)
|
|
6021
6021
|
else:
|
|
6022
|
-
memberRoles = [{'name': Ent.
|
|
6022
|
+
memberRoles = [{'name': Ent.ROLE_MEMBER}]
|
|
6023
6023
|
roles = {}
|
|
6024
6024
|
for role in memberRoles:
|
|
6025
6025
|
roles[role['name']] = role
|
|
@@ -9377,7 +9377,7 @@ def doCheckConnection():
|
|
|
9377
9377
|
flushStdout()
|
|
9378
9378
|
if dns_err:
|
|
9379
9379
|
writeStdout(dns_err)
|
|
9380
|
-
return
|
|
9380
|
+
return
|
|
9381
9381
|
gen_firewall = 'You probably have security software or a firewall on your machine or network that is preventing GAM from making Internet connections. Check your network configuration or try running GAM on a hotspot or home network to see if the problem exists only on your organization\'s network.'
|
|
9382
9382
|
try:
|
|
9383
9383
|
if host.startswith('http'):
|
|
@@ -9430,11 +9430,11 @@ def doCheckConnection():
|
|
|
9430
9430
|
disc_hosts = []
|
|
9431
9431
|
for api, config in API._INFO.items():
|
|
9432
9432
|
if config.get('v2discovery') and not config.get('localdiscovery'):
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9433
|
+
if mapped_api := config.get('mappedAPI'):
|
|
9434
|
+
api = mapped_api
|
|
9435
|
+
host = f'{api}.googleapis.com'
|
|
9436
|
+
if host not in disc_hosts:
|
|
9437
|
+
disc_hosts.append(host)
|
|
9438
9438
|
for host in disc_hosts:
|
|
9439
9439
|
check_host(host)
|
|
9440
9440
|
checked_hosts = initial_hosts + api_hosts + disc_hosts
|
|
@@ -9450,7 +9450,7 @@ def doCheckConnection():
|
|
|
9450
9450
|
parsed_base_url = urlparse(base_url)
|
|
9451
9451
|
base_host = parsed_base_url.netloc
|
|
9452
9452
|
if base_host not in checked_hosts:
|
|
9453
|
-
|
|
9453
|
+
writeStdout(f'Checking {base_host} for {api}\n')
|
|
9454
9454
|
check_host(base_host)
|
|
9455
9455
|
checked_hosts.append(base_host)
|
|
9456
9456
|
if success_count == try_count:
|
|
@@ -15804,27 +15804,13 @@ ANALYTIC_ENTITY_MAP = {
|
|
|
15804
15804
|
'pageSize': 50,
|
|
15805
15805
|
'maxPageSize': 200,
|
|
15806
15806
|
},
|
|
15807
|
-
Ent.ANALYTIC_UA_PROPERTY:
|
|
15808
|
-
{'titles': ['User', 'accountId', 'name', 'id', 'created', 'updated'],
|
|
15809
|
-
'JSONtitles': ['User', 'accountId', 'name', 'id', 'JSON'],
|
|
15810
|
-
'timeObjects': ['created', 'updated'],
|
|
15811
|
-
'items': 'items',
|
|
15812
|
-
'pageSize': 50,
|
|
15813
|
-
'maxPageSize': 200,
|
|
15814
|
-
},
|
|
15815
15807
|
}
|
|
15816
15808
|
|
|
15817
15809
|
def printShowAnalyticItems(users, entityType):
|
|
15818
15810
|
analyticEntityMap = ANALYTIC_ENTITY_MAP[entityType]
|
|
15819
15811
|
csvPF = CSVPrintFile(analyticEntityMap['titles'], 'sortall') if Act.csvFormat() else None
|
|
15820
15812
|
FJQC = FormatJSONQuoteChar(csvPF)
|
|
15821
|
-
|
|
15822
|
-
kwargs = {'pageSize': analyticEntityMap['pageSize']}
|
|
15823
|
-
api = API.ANALYTICS_ADMIN
|
|
15824
|
-
else:
|
|
15825
|
-
# kwargs = {'webPropertyId': '~all'}
|
|
15826
|
-
kwargs = {}
|
|
15827
|
-
api = API.ANALYTICS
|
|
15813
|
+
kwargs = {'pageSize': analyticEntityMap['pageSize']}
|
|
15828
15814
|
if entityType in {Ent.ANALYTIC_ACCOUNT, Ent.ANALYTIC_PROPERTY}:
|
|
15829
15815
|
kwargs['showDeleted'] = False
|
|
15830
15816
|
while Cmd.ArgumentsRemaining():
|
|
@@ -15837,16 +15823,12 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15837
15823
|
kwargs['showDeleted'] = getBoolean()
|
|
15838
15824
|
elif entityType == Ent.ANALYTIC_PROPERTY and myarg == 'filter':
|
|
15839
15825
|
kwargs['filter'] = getString(Cmd.OB_STRING)
|
|
15840
|
-
elif entityType == Ent.ANALYTIC_UA_PROPERTY and myarg == 'accountid':
|
|
15841
|
-
kwargs['accountId'] = getString(Cmd.OB_STRING).replace('accounts/', '')
|
|
15842
15826
|
elif entityType == Ent.ANALYTIC_DATASTREAM and myarg == 'parent':
|
|
15843
15827
|
kwargs['parent'] = getString(Cmd.OB_STRING)
|
|
15844
15828
|
else:
|
|
15845
15829
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
15846
15830
|
if entityType == Ent.ANALYTIC_PROPERTY and 'filter' not in kwargs:
|
|
15847
15831
|
missingArgumentExit('filter')
|
|
15848
|
-
if entityType == Ent.ANALYTIC_UA_PROPERTY and 'accountId' not in kwargs:
|
|
15849
|
-
missingArgumentExit('accountid')
|
|
15850
15832
|
if entityType == Ent.ANALYTIC_DATASTREAM and 'parent' not in kwargs:
|
|
15851
15833
|
missingArgumentExit('parent')
|
|
15852
15834
|
if csvPF and FJQC.formatJSON:
|
|
@@ -15854,7 +15836,7 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15854
15836
|
i, count, users = getEntityArgument(users)
|
|
15855
15837
|
for user in users:
|
|
15856
15838
|
i += 1
|
|
15857
|
-
user, analytics = buildGAPIServiceObject(
|
|
15839
|
+
user, analytics = buildGAPIServiceObject(API.ANALYTICS_ADMIN, user, i, count)
|
|
15858
15840
|
if not analytics:
|
|
15859
15841
|
continue
|
|
15860
15842
|
if entityType == Ent.ANALYTIC_ACCOUNT:
|
|
@@ -15863,11 +15845,8 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15863
15845
|
service = analytics.accountSummaries()
|
|
15864
15846
|
elif entityType == Ent.ANALYTIC_DATASTREAM:
|
|
15865
15847
|
service = analytics.properties().dataStreams()
|
|
15866
|
-
|
|
15848
|
+
else: # entityType == Ent.ANALYTIC_PROPERTY:
|
|
15867
15849
|
service = analytics.properties()
|
|
15868
|
-
else: #Ent.ANALYTIC_UA_PROPERTY:
|
|
15869
|
-
service = analytics.management().webproperties()
|
|
15870
|
-
# service = analytics.management().profiles()
|
|
15871
15850
|
if csvPF:
|
|
15872
15851
|
printGettingAllEntityItemsForWhom(entityType, user, i, count)
|
|
15873
15852
|
pageMessage = getPageMessageForWhom()
|
|
@@ -15908,10 +15887,7 @@ def printShowAnalyticItems(users, entityType):
|
|
|
15908
15887
|
if not FJQC.formatJSON:
|
|
15909
15888
|
csvPF.WriteRowTitles(row)
|
|
15910
15889
|
elif csvPF.CheckRowTitles(row):
|
|
15911
|
-
|
|
15912
|
-
row = {'User': user, 'name': item['name'], 'displayName': item['displayName']}
|
|
15913
|
-
else:
|
|
15914
|
-
row = {'User': user, 'accountId': item['accountId'], 'id': item['id'], 'name': item['name']}
|
|
15890
|
+
row = {'User': user, 'name': item['name'], 'displayName': item['displayName']}
|
|
15915
15891
|
for field in analyticEntityMap['JSONtitles'][2:-1]:
|
|
15916
15892
|
row[field] = item[field]
|
|
15917
15893
|
row['JSON'] = json.dumps(cleanJSON(item, timeObjects=analyticEntityMap['timeObjects']),
|
|
@@ -15949,17 +15925,6 @@ def printShowAnalyticAccountSummaries(users):
|
|
|
15949
15925
|
def printShowAnalyticProperties(users):
|
|
15950
15926
|
printShowAnalyticItems(users, Ent.ANALYTIC_PROPERTY)
|
|
15951
15927
|
|
|
15952
|
-
# gam <UserTypeEntity> print analyticuaproperties [todrive <ToDriveAttribute>*]
|
|
15953
|
-
# accountid [accounts/]<String>
|
|
15954
|
-
# [maxresults <Integer>]
|
|
15955
|
-
# [formatjson [quotechar <Character>]]
|
|
15956
|
-
# gam <UserTypeEntity> show analyticuaproperties
|
|
15957
|
-
# accountid [accounts/]<String>
|
|
15958
|
-
# [maxresults <Integer>]
|
|
15959
|
-
# [formatjson]
|
|
15960
|
-
def printShowAnalyticUAProperties(users):
|
|
15961
|
-
printShowAnalyticItems(users, Ent.ANALYTIC_UA_PROPERTY)
|
|
15962
|
-
|
|
15963
15928
|
# gam <UserTypeEntity> print analyticdatastreams [todrive <ToDriveAttribute>*]
|
|
15964
15929
|
# parent <String>
|
|
15965
15930
|
# [maxresults <Integer>]
|
|
@@ -26513,6 +26478,64 @@ def _getChatMemberEmail(cd, member):
|
|
|
26513
26478
|
_, memberUid = member['groupMember']['name'].split('/')
|
|
26514
26479
|
member['groupMember']['email'], _ = convertUIDtoEmailAddressWithType(f'uid:{memberUid}', cd, None, emailTypes=['group'])
|
|
26515
26480
|
|
|
26481
|
+
def _getChatSpaceMembers(cd, chatSpace, ciGroupName):
|
|
26482
|
+
if chatSpace.startswith('space/'):
|
|
26483
|
+
_, chatSpace = chatSpace.split('/', 1)
|
|
26484
|
+
chatSpace = 'spaces/'+chatSpace
|
|
26485
|
+
kwargsUAA = {'useAdminAccess': True, 'filter': 'member.type != "BOT"'}
|
|
26486
|
+
user, chat, kvList = buildChatServiceObject(API.CHAT_MEMBERSHIPS_ADMIN, _getAdminEmail(), 0, 0, [Ent.CHAT_SPACE, chatSpace], True)
|
|
26487
|
+
memberList = []
|
|
26488
|
+
if not chat:
|
|
26489
|
+
return memberList
|
|
26490
|
+
fields = getItemFieldsFromFieldsList('memberships', [])
|
|
26491
|
+
qfilter = f'{Ent.Singular(Ent.CHAT_SPACE)}: {chatSpace}, {kwargsUAA["filter"]}'
|
|
26492
|
+
try:
|
|
26493
|
+
members = callGAPIpages(chat.spaces().members(), 'list', 'memberships',
|
|
26494
|
+
pageMessage=_getChatPageMessage(Ent.CHAT_MEMBER, user, 0, 0, qfilter),
|
|
26495
|
+
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
|
|
26496
|
+
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
|
26497
|
+
parent=chatSpace, fields=fields, pageSize=CHAT_PAGE_SIZE, **kwargsUAA)
|
|
26498
|
+
for member in members:
|
|
26499
|
+
_getChatMemberEmail(cd, member)
|
|
26500
|
+
gmember = {}
|
|
26501
|
+
if 'member' in member:
|
|
26502
|
+
if member['member']['type'] == 'HUMAN':
|
|
26503
|
+
_, memberUid = member['member']['name'].split('/')
|
|
26504
|
+
gmember['type'] = Ent.TYPE_USER
|
|
26505
|
+
email, _ = convertUIDtoEmailAddressWithType(f'uid:{memberUid}', cd, None, emailTypes=['user'])
|
|
26506
|
+
role = Ent.ROLE_MANAGER if member['role'] == 'ROLE_MANAGER' else Ent.ROLE_MEMBER
|
|
26507
|
+
if not ciGroupName:
|
|
26508
|
+
gmember['id'] = memberUid
|
|
26509
|
+
gmember['email'] = email
|
|
26510
|
+
gmember['role'] = role
|
|
26511
|
+
gmember['status'] = member['state']
|
|
26512
|
+
else:
|
|
26513
|
+
gmember['name'] = f'{ciGroupName}/memberships/{memberUid}'
|
|
26514
|
+
gmember['preferredMemberKey'] = {'id': email}
|
|
26515
|
+
gmember['roles'] = [{'name': role}]
|
|
26516
|
+
gmember['createTime'] = member['createTime']
|
|
26517
|
+
memberList.append(gmember)
|
|
26518
|
+
elif 'groupMember' in member:
|
|
26519
|
+
_, memberUid = member['groupMember']['name'].split('/')
|
|
26520
|
+
gmember['type'] = Ent.TYPE_GROUP
|
|
26521
|
+
role = Ent.ROLE_MANAGER if member['role'] == 'ROLE_MANAGER' else Ent.ROLE_MEMBER
|
|
26522
|
+
email, _ = convertUIDtoEmailAddressWithType(f'uid:{memberUid}', cd, None, emailTypes=['group'])
|
|
26523
|
+
if not ciGroupName:
|
|
26524
|
+
gmember['id'] = memberUid
|
|
26525
|
+
gmember['email'] = email
|
|
26526
|
+
gmember['role'] = role
|
|
26527
|
+
gmember['status'] = member['state']
|
|
26528
|
+
else:
|
|
26529
|
+
gmember['name'] = f'{ciGroupName}/memberships/{memberUid}'
|
|
26530
|
+
gmember['preferredMemberKey'] = {'id': email}
|
|
26531
|
+
gmember['roles'] = [{'name': role}]
|
|
26532
|
+
gmember['createTime'] = member['createTime']
|
|
26533
|
+
memberList.append(gmember)
|
|
26534
|
+
return memberList
|
|
26535
|
+
except (GAPI.notFound, GAPI.invalidArgument, GAPI.permissionDenied) as e:
|
|
26536
|
+
exitIfChatNotConfigured(chat, kvList, str(e), 0, 0)
|
|
26537
|
+
return memberList
|
|
26538
|
+
|
|
26516
26539
|
def normalizeUserMember(user, userList):
|
|
26517
26540
|
userList.append(normalizeEmailAddressOrUID(user))
|
|
26518
26541
|
|
|
@@ -34173,15 +34196,18 @@ def getGroupMembers(cd, groupEmail, memberRoles, membersList, membersSet, i, cou
|
|
|
34173
34196
|
|
|
34174
34197
|
printGettingAllEntityItemsForWhom(memberRoles if memberRoles else Ent.ROLE_MANAGER_MEMBER_OWNER, groupEmail, i, count)
|
|
34175
34198
|
validRoles, listRoles, listFields = _getRoleVerification(memberRoles, 'nextPageToken,members(email,id,role,status,type,delivery_settings)')
|
|
34176
|
-
|
|
34177
|
-
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34182
|
-
|
|
34183
|
-
|
|
34184
|
-
|
|
34199
|
+
if not groupEmail.startswith('space/'):
|
|
34200
|
+
try:
|
|
34201
|
+
groupMembers = callGAPIpages(cd.members(), 'list', 'members',
|
|
34202
|
+
pageMessage=getPageMessageForWhom(),
|
|
34203
|
+
throwReasons=GAPI.MEMBERS_THROW_REASONS, retryReasons=GAPI.MEMBERS_RETRY_REASONS,
|
|
34204
|
+
includeDerivedMembership=memberOptions[MEMBEROPTION_INCLUDEDERIVEDMEMBERSHIP],
|
|
34205
|
+
groupKey=groupEmail, roles=listRoles, fields=listFields, maxResults=GC.Values[GC.MEMBER_MAX_RESULTS])
|
|
34206
|
+
except (GAPI.groupNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.invalid, GAPI.forbidden, GAPI.serviceNotAvailable):
|
|
34207
|
+
entityUnknownWarning(Ent.GROUP, groupEmail, i, count)
|
|
34208
|
+
return
|
|
34209
|
+
else:
|
|
34210
|
+
groupMembers = _getChatSpaceMembers(cd, groupEmail, '')
|
|
34185
34211
|
checkCategory = memberDisplayOptions['showCategory']
|
|
34186
34212
|
if not memberOptions[MEMBEROPTION_RECURSIVE]:
|
|
34187
34213
|
if memberOptions[MEMBEROPTION_NODUPLICATES]:
|
|
@@ -34205,8 +34231,7 @@ def getGroupMembers(cd, groupEmail, memberRoles, membersList, membersSet, i, cou
|
|
|
34205
34231
|
elif memberOptions[MEMBEROPTION_NODUPLICATES]:
|
|
34206
34232
|
groupMemberList = []
|
|
34207
34233
|
for member in groupMembers:
|
|
34208
|
-
|
|
34209
|
-
if member['type'] != Ent.TYPE_GROUP or namespace:
|
|
34234
|
+
if member['type'] != Ent.TYPE_GROUP:
|
|
34210
34235
|
if ((member['type'] in typesSet and
|
|
34211
34236
|
checkMemberMatch(member, memberOptions) and
|
|
34212
34237
|
_checkMemberRoleIsSuspendedIsArchived(member, validRoles, memberOptions[MEMBEROPTION_ISSUSPENDED], memberOptions[MEMBEROPTION_ISARCHIVED]) and
|
|
@@ -34235,8 +34260,7 @@ def getGroupMembers(cd, groupEmail, memberRoles, membersList, membersSet, i, cou
|
|
|
34235
34260
|
memberOptions, memberDisplayOptions, level+1, typesSet)
|
|
34236
34261
|
else:
|
|
34237
34262
|
for member in groupMembers:
|
|
34238
|
-
|
|
34239
|
-
if member['type'] != Ent.TYPE_GROUP or namespace:
|
|
34263
|
+
if member['type'] != Ent.TYPE_GROUP:
|
|
34240
34264
|
if ((member['type'] in typesSet) and
|
|
34241
34265
|
checkMemberMatch(member, memberOptions) and
|
|
34242
34266
|
_checkMemberRoleIsSuspendedIsArchived(member, validRoles,
|
|
@@ -36288,7 +36312,7 @@ def getCIGroupTransitiveMembers(ci, groupName, membersList, i, count):
|
|
|
36288
36312
|
return True
|
|
36289
36313
|
|
|
36290
36314
|
def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, count,
|
|
36291
|
-
memberOptions, memberDisplayOptions, level, typesSet, groupEmail, kwargs):
|
|
36315
|
+
memberOptions, memberDisplayOptions, level, typesSet, groupEmail, kwargs, cd):
|
|
36292
36316
|
nameToPrint = groupEmail if groupEmail else groupName
|
|
36293
36317
|
printGettingAllEntityItemsForWhom(memberRoles if memberRoles else Ent.ROLE_MANAGER_MEMBER_OWNER, nameToPrint, i, count)
|
|
36294
36318
|
validRoles = _getCIRoleVerification(memberRoles)
|
|
@@ -36301,16 +36325,21 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
|
|
|
36301
36325
|
if member['type'] in typesSet and checkCIMemberMatch(member, memberOptions):
|
|
36302
36326
|
membersList.append(member)
|
|
36303
36327
|
return
|
|
36304
|
-
|
|
36305
|
-
|
|
36306
|
-
|
|
36307
|
-
|
|
36308
|
-
|
|
36309
|
-
|
|
36310
|
-
|
|
36311
|
-
|
|
36312
|
-
|
|
36313
|
-
|
|
36328
|
+
if not groupEmail.startswith('space/'):
|
|
36329
|
+
try:
|
|
36330
|
+
groupMembers = callGAPIpages(ci.groups().memberships(), 'list', 'memberships',
|
|
36331
|
+
pageMessage=getPageMessageForWhom(),
|
|
36332
|
+
throwReasons=GAPI.CIGROUP_LIST_THROW_REASONS, retryReasons=GAPI.CIGROUP_RETRY_REASONS,
|
|
36333
|
+
parent=groupName, **kwargs)
|
|
36334
|
+
except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
|
|
36335
|
+
GAPI.forbidden, GAPI.badRequest, GAPI.invalid, GAPI.invalidArgument, GAPI.systemError,
|
|
36336
|
+
GAPI.permissionDenied, GAPI.serviceNotAvailable):
|
|
36337
|
+
entityUnknownWarning(Ent.CLOUD_IDENTITY_GROUP, nameToPrint, i, count)
|
|
36338
|
+
return
|
|
36339
|
+
else:
|
|
36340
|
+
if cd is None:
|
|
36341
|
+
cd = buildGAPIObject(API.DIRECTORY)
|
|
36342
|
+
groupMembers = _getChatSpaceMembers(cd, groupEmail, groupName)
|
|
36314
36343
|
checkCategory = memberDisplayOptions['showCategory']
|
|
36315
36344
|
if not memberOptions[MEMBEROPTION_RECURSIVE]:
|
|
36316
36345
|
if memberOptions[MEMBEROPTION_NODUPLICATES]:
|
|
@@ -36335,8 +36364,7 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
|
|
|
36335
36364
|
for member in groupMembers:
|
|
36336
36365
|
getCIGroupMemberRoleFixType(member)
|
|
36337
36366
|
memberName = member.get('preferredMemberKey', {}).get('id', '')
|
|
36338
|
-
|
|
36339
|
-
if member['type'] != Ent.TYPE_GROUP or namespace:
|
|
36367
|
+
if member['type'] != Ent.TYPE_GROUP:
|
|
36340
36368
|
if (member['type'] in typesSet and
|
|
36341
36369
|
checkCIMemberMatch(member, memberOptions) and
|
|
36342
36370
|
_checkMemberRole(member, validRoles) and
|
|
@@ -36359,13 +36387,12 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
|
|
|
36359
36387
|
groupMemberList.append((f'groups/{gname}', memberName))
|
|
36360
36388
|
for member in groupMemberList:
|
|
36361
36389
|
getCIGroupMembers(ci, member[0], memberRoles, membersList, membersSet, i, count,
|
|
36362
|
-
memberOptions, memberDisplayOptions, level+1, typesSet, member[1], kwargs)
|
|
36390
|
+
memberOptions, memberDisplayOptions, level+1, typesSet, member[1], kwargs, cd)
|
|
36363
36391
|
else:
|
|
36364
36392
|
for member in groupMembers:
|
|
36365
36393
|
getCIGroupMemberRoleFixType(member)
|
|
36366
36394
|
memberName = member.get('preferredMemberKey', {}).get('id', '')
|
|
36367
|
-
|
|
36368
|
-
if member['type'] != Ent.TYPE_GROUP or namespace:
|
|
36395
|
+
if member['type'] != Ent.TYPE_GROUP:
|
|
36369
36396
|
if (member['type'] in typesSet and
|
|
36370
36397
|
checkCIMemberMatch(member, memberOptions) and
|
|
36371
36398
|
_checkMemberRole(member, validRoles) and
|
|
@@ -36382,7 +36409,7 @@ def getCIGroupMembers(ci, groupName, memberRoles, membersList, membersSet, i, co
|
|
|
36382
36409
|
membersList.append(member)
|
|
36383
36410
|
_, gname = member['name'].rsplit('/', 1)
|
|
36384
36411
|
getCIGroupMembers(ci, f'groups/{gname}', memberRoles, membersList, membersSet, i, count,
|
|
36385
|
-
memberOptions, memberDisplayOptions, level+1, typesSet, memberName, kwargs)
|
|
36412
|
+
memberOptions, memberDisplayOptions, level+1, typesSet, memberName, kwargs, cd)
|
|
36386
36413
|
|
|
36387
36414
|
CIGROUPMEMBERS_FIELDS_CHOICE_MAP = {
|
|
36388
36415
|
'createtime': 'createTime',
|
|
@@ -36546,7 +36573,7 @@ def doPrintCIGroupMembers():
|
|
|
36546
36573
|
membersList = []
|
|
36547
36574
|
membersSet = set()
|
|
36548
36575
|
getCIGroupMembers(ci, groupEntity['name'], getRoles, membersList, membersSet, i, count,
|
|
36549
|
-
memberOptions, memberDisplayOptions, level, typesSet, groupEmail, kwargs)
|
|
36576
|
+
memberOptions, memberDisplayOptions, level, typesSet, groupEmail, kwargs, None)
|
|
36550
36577
|
if showOwnedBy and not checkCIGroupShowOwnedBy(showOwnedBy, membersList):
|
|
36551
36578
|
continue
|
|
36552
36579
|
for member in membersList:
|
|
@@ -76716,7 +76743,6 @@ USER_COMMANDS_WITH_OBJECTS = {
|
|
|
76716
76743
|
Cmd.ARG_ANALYTICACCOUNTSUMMARY: printShowAnalyticAccountSummaries,
|
|
76717
76744
|
Cmd.ARG_ANALYTICDATASTREAM: printShowAnalyticDatastreams,
|
|
76718
76745
|
Cmd.ARG_ANALYTICPROPERTY: printShowAnalyticProperties,
|
|
76719
|
-
Cmd.ARG_ANALYTICUAPROPERTY: printShowAnalyticUAProperties,
|
|
76720
76746
|
Cmd.ARG_ASP: printShowASPs,
|
|
76721
76747
|
Cmd.ARG_BACKUPCODE: printShowBackupCodes,
|
|
76722
76748
|
Cmd.ARG_CALENDAR: printShowCalendars,
|
|
@@ -76823,7 +76849,6 @@ USER_COMMANDS_WITH_OBJECTS = {
|
|
|
76823
76849
|
Cmd.ARG_ANALYTICACCOUNTSUMMARY: printShowAnalyticAccountSummaries,
|
|
76824
76850
|
Cmd.ARG_ANALYTICDATASTREAM: printShowAnalyticDatastreams,
|
|
76825
76851
|
Cmd.ARG_ANALYTICPROPERTY: printShowAnalyticProperties,
|
|
76826
|
-
Cmd.ARG_ANALYTICUAPROPERTY: printShowAnalyticUAProperties,
|
|
76827
76852
|
Cmd.ARG_ASP: printShowASPs,
|
|
76828
76853
|
Cmd.ARG_BACKUPCODE: printShowBackupCodes,
|
|
76829
76854
|
Cmd.ARG_CALENDAR: printShowCalendars,
|
|
@@ -77036,7 +77061,6 @@ USER_COMMANDS_OBJ_ALIASES = {
|
|
|
77036
77061
|
Cmd.ARG_ANALYTICACCOUNTSUMMARIES: Cmd.ARG_ANALYTICACCOUNTSUMMARY,
|
|
77037
77062
|
Cmd.ARG_ANALYTICDATASTREAMS: Cmd.ARG_ANALYTICDATASTREAM,
|
|
77038
77063
|
Cmd.ARG_ANALYTICPROPERTIES: Cmd.ARG_ANALYTICPROPERTY,
|
|
77039
|
-
Cmd.ARG_ANALYTICUAPROPERTIES: Cmd.ARG_ANALYTICUAPROPERTY,
|
|
77040
77064
|
Cmd.ARG_ASPS: Cmd.ARG_ASP,
|
|
77041
77065
|
Cmd.ARG_BACKUPCODES: Cmd.ARG_BACKUPCODE,
|
|
77042
77066
|
Cmd.ARG_CALENDARS: Cmd.ARG_CALENDAR,
|
gam/gamlib/glapi.py
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
# APIs
|
|
23
23
|
ACCESSCONTEXTMANAGER = 'accesscontextmanager'
|
|
24
24
|
ALERTCENTER = 'alertcenter'
|
|
25
|
-
ANALYTICS = 'analytics'
|
|
26
25
|
ANALYTICS_ADMIN = 'analyticsadmin'
|
|
27
26
|
CALENDAR = 'calendar'
|
|
28
27
|
CBCM = 'cbcm'
|
|
@@ -162,7 +161,6 @@ PROJECT_APIS = [
|
|
|
162
161
|
'accesscontextmanager.googleapis.com',
|
|
163
162
|
'admin.googleapis.com',
|
|
164
163
|
'alertcenter.googleapis.com',
|
|
165
|
-
'analytics.googleapis.com',
|
|
166
164
|
'analyticsadmin.googleapis.com',
|
|
167
165
|
# 'audit.googleapis.com',
|
|
168
166
|
'calendar-json.googleapis.com',
|
|
@@ -201,7 +199,6 @@ PROJECT_APIS = [
|
|
|
201
199
|
_INFO = {
|
|
202
200
|
ACCESSCONTEXTMANAGER: {'name': 'Access Context Manager API', 'version': 'v1', 'v2discovery': True},
|
|
203
201
|
ALERTCENTER: {'name': 'AlertCenter API', 'version': 'v1beta1', 'v2discovery': True},
|
|
204
|
-
ANALYTICS: {'name': 'Analytics API', 'version': 'v3', 'v2discovery': False},
|
|
205
202
|
ANALYTICS_ADMIN: {'name': 'Analytics Admin API', 'version': 'v1beta', 'v2discovery': True},
|
|
206
203
|
CALENDAR: {'name': 'Calendar API', 'version': 'v3', 'v2discovery': True, 'mappedAPI': 'calendar-json'},
|
|
207
204
|
CBCM: {'name': 'Chrome Browser Cloud Management API', 'version': 'v1.1beta1', 'v2discovery': True, 'localjson': True},
|
|
@@ -532,10 +529,6 @@ _SVCACCT_SCOPES = [
|
|
|
532
529
|
'api': ALERTCENTER,
|
|
533
530
|
'subscopes': [],
|
|
534
531
|
'scope': 'https://www.googleapis.com/auth/apps.alerts'},
|
|
535
|
-
{'name': 'Analytics API - read only',
|
|
536
|
-
'api': ANALYTICS,
|
|
537
|
-
'subscopes': [],
|
|
538
|
-
'scope': 'https://www.googleapis.com/auth/analytics.readonly'},
|
|
539
532
|
{'name': 'Analytics Admin API - read only',
|
|
540
533
|
'api': ANALYTICS_ADMIN,
|
|
541
534
|
'subscopes': [],
|
gam/gamlib/glclargs.py
CHANGED
|
@@ -423,8 +423,6 @@ class GamCLArgs():
|
|
|
423
423
|
ARG_ANALYTICDATASTREAMS = 'analyticdatastreams'
|
|
424
424
|
ARG_ANALYTICPROPERTY = 'analyticproperty'
|
|
425
425
|
ARG_ANALYTICPROPERTIES = 'analyticproperties'
|
|
426
|
-
ARG_ANALYTICUAPROPERTY = 'analyticuaproperty'
|
|
427
|
-
ARG_ANALYTICUAPROPERTIES = 'analyticuaproperties'
|
|
428
426
|
ARG_API = 'api'
|
|
429
427
|
ARG_APIS = 'apis'
|
|
430
428
|
ARG_APIPROJECT = 'apiproject'
|
gam/gamlib/glentity.py
CHANGED
|
@@ -61,7 +61,6 @@ class GamEntity():
|
|
|
61
61
|
ANALYTIC_ACCOUNT_SUMMARY = 'anas'
|
|
62
62
|
ANALYTIC_DATASTREAM = 'anad'
|
|
63
63
|
ANALYTIC_PROPERTY = 'anap'
|
|
64
|
-
ANALYTIC_UA_PROPERTY = 'anau'
|
|
65
64
|
API = 'api '
|
|
66
65
|
APP_ACCESS_SETTINGS = 'apps'
|
|
67
66
|
APP_ID = 'appi'
|
|
@@ -412,7 +411,6 @@ class GamEntity():
|
|
|
412
411
|
ANALYTIC_ACCOUNT_SUMMARY: ['Analytic Account Summaries', 'Analytic Account Summary'],
|
|
413
412
|
ANALYTIC_DATASTREAM: ['Analytic Datastreams', 'Analytic Datastream'],
|
|
414
413
|
ANALYTIC_PROPERTY: ['Analytic GA4 Properties', 'Analytic GA4 Property'],
|
|
415
|
-
ANALYTIC_UA_PROPERTY: ['Analytic UA Properties', 'Analytic UA Property'],
|
|
416
414
|
API: ['APIs', 'API'],
|
|
417
415
|
APP_ACCESS_SETTINGS: ['Application Access Settings', 'Application Access Settings'],
|
|
418
416
|
APP_ID: ['Application IDs', 'Application ID'],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=9BYxt6VD3fM_xeLSK35L8qC6rnWqzXnm0usjkcM2k9k,3495630
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=nJuWha0xm5dHw_5ptGphwRoO-r36Ccpqiww9pCEDbSc,67484
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -23,10 +23,10 @@ gam/atom/token_store.py,sha256=7E6Ecvxa86WCvl1pJAhv78jg9OxQv8pMtIUcPhZCq04,3803
|
|
|
23
23
|
gam/atom/url.py,sha256=pxO1TlORxyKQTQ1bkBE1unFzjnv9c8LjJkm-UEORShY,4276
|
|
24
24
|
gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
|
|
25
25
|
gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
|
|
26
|
-
gam/gamlib/glapi.py,sha256=
|
|
26
|
+
gam/gamlib/glapi.py,sha256=85YwZ5LhBoVd9kU3m-gwLRq8FwTWCaRIwARuQvH8Mjc,34022
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=cV011FpIWge4oi5_dJrdof66vUqX6UCvTGWWTNVmYEg,28055
|
|
28
|
-
gam/gamlib/glclargs.py,sha256=
|
|
29
|
-
gam/gamlib/glentity.py,sha256=
|
|
28
|
+
gam/gamlib/glclargs.py,sha256=6irl5ZEu-pd4cGimc0PHZtJS8Ui6QHHgNzFO93beEcc,42206
|
|
29
|
+
gam/gamlib/glentity.py,sha256=fqWUlxQqPKlfFrkuPjCK2lZhhFBIZboCuO0qCxuEwqA,33691
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=xk3pEaIE-zHrTNCn5rJYERqqpbN55E1wXlKoqvWP44E,39232
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=Y73xM1RNhIbtcqnMv1gcZF3wDWOeLWW-7SvoQyWw6tA,9659
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.6.
|
|
69
|
-
gam7-7.6.
|
|
70
|
-
gam7-7.6.
|
|
71
|
-
gam7-7.6.
|
|
72
|
-
gam7-7.6.
|
|
68
|
+
gam7-7.6.13.dist-info/METADATA,sha256=WAAMsjZ6LoZr8nK8dI97DicsY9ETVdK1y1eAMow1YHg,2970
|
|
69
|
+
gam7-7.6.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.6.13.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.6.13.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.6.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|