Skip to content

Commit

Permalink
Fix update user role cmd (#57)
Browse files Browse the repository at this point in the history
* 🚑 correct logic for matched user sets + role filtering

* Formatted code with black --line-length 120

* Update role filter logic in user.py

* Formatted code with black --line-length 120

* aliasing

* Update user.py

* Update user.py

* Formatted code with black --line-length 120

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
georgepstaylor and github-actions[bot] authored Jul 25, 2024
1 parent edc6281 commit 341303b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cli/ldap_cmds/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,8 @@ def update_roles(roles, user_ou, root_dn, add, remove, update_notes, user_note,
raise e

try:
role_filter_results = ldap_connection_role_filter.search_s(
",".join([user_ou, root_dn]),
ldap.SCOPE_SUBTREE,
full_role_filter,
["cn"],
role_filter_results = ldap_connection_role_filter.search_ext_s(
",".join([user_ou, root_dn]), ldap.SCOPE_SUBTREE, full_role_filter, ["cn"], sizelimit=0
)
except Exception as e:
log.exception("Failed to search for roles")
Expand Down

0 comments on commit 341303b

Please sign in to comment.