File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -271,15 +271,17 @@ def memberships(self):
271
271
"""
272
272
Retrieves full details of all group memberships, with users and nested groups.
273
273
See: https://docs.atlassian.com/atlassian-crowd/5.3.1/REST/#usermanagement/1/group-getAllMemberships
274
+ Retrieves full details of all group memberships, with users and nested groups.
275
+ This resource is optimised for streaming XML responses, and does not support JSON responses.
274
276
:return: All membership mapping dict
275
277
"""
276
278
path = self ._crowd_api_url ("usermanagement" , "group/membership" )
277
- headers = {' Accept' : ' application/xml' }
279
+ headers = {" Accept" : " application/xml" }
278
280
response = self .get (path , headers = headers , advanced_mode = True )
279
281
root = etree .fromstring (response .content )
280
282
memberships = {}
281
- for member in root .xpath (' //membership' ):
282
- group = member .get (' group' )
283
- users = [user .get (' name' ) for user in member .xpath (' ./users/user' )]
283
+ for member in root .xpath (" //membership" ):
284
+ group = member .get (" group" )
285
+ users = [user .get (" name" ) for user in member .xpath (" ./users/user" )]
284
286
memberships [group ] = users
285
287
return memberships
Original file line number Diff line number Diff line change @@ -14,5 +14,4 @@ python-magic
14
14
# On October 4, 2022 importlib-metadata released importlib-metadata 5.0.0 and in version 5.0.0
15
15
# They have Deprecated EntryPoints and that's why you are facing this error.
16
16
importlib-metadata <= 4.13.0
17
- # Add this package to search string in json
18
- jmespath
17
+
Original file line number Diff line number Diff line change 4
4
oauthlib
5
5
requests_oauthlib
6
6
requests-kerberos == 0.14.0
7
+ # Add this package to search string in json
7
8
jmespath
8
9
beautifulsoup4
9
10
lxml
You can’t perform that action at this time.
0 commit comments