Skip to content

Commit d7ec933

Browse files
committed
Fix #44: UsersQuery should only return direct group memberships.
* Add a direct_only parameter to UsersQuery, defaulted to true. * Update tests to check behavior. * Update version number and history to prepare for 2.5 release.
1 parent 3aa81e8 commit d7ec933

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

umapi_client/functional.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class UsersQuery(QueryMultiple):
327327
Query for users meeting (optional) criteria
328328
"""
329329

330-
def __init__(self, connection, in_group="", in_domain="", identity_type=""):
330+
def __init__(self, connection, in_group="", in_domain="", identity_type="", direct_only=True):
331331
"""
332332
Create a query for all users, or for those in a group or domain or both
333333
:param connection: Connection to run the query against
@@ -338,6 +338,7 @@ def __init__(self, connection, in_group="", in_domain="", identity_type=""):
338338
params = {}
339339
if in_domain: params["domain"] = in_domain
340340
if identity_type: params["type"] = identity_type
341+
params["directOnly"] = direct_only
341342
QueryMultiple.__init__(self, connection=connection, object_type="user", url_params=groups, query_params=params)
342343

343344

0 commit comments

Comments
 (0)