diff --git a/cli/__init__.py b/cli/__init__.py index 7be218e..ce9ce52 100644 --- a/cli/__init__.py +++ b/cli/__init__.py @@ -1,7 +1,7 @@ import click + import cli.ldap_cmds.rbac import cli.ldap_cmds.user - from cli import ( logger, ) @@ -118,7 +118,6 @@ def update_user_home_areas( help="Remove role from users", is_flag=True, ) - @click.option( "-uf", "--user-filter", @@ -126,7 +125,9 @@ def update_user_home_areas( required=False, default="(objectclass=*)", ) -@click.option("--roles-to-filter", help="Roles to filter", required=False, default="*") +@click.option( + "--roles-to-filter", help="Roles to filter", required=False, default="*" +) def update_user_roles( roles, user_ou, @@ -138,6 +139,17 @@ def update_user_roles( user_filter, roles_to_filter, ): + cli.ldap_cmds.user.update_roles( + roles, + user_ou, + root_dn, + add, + remove, + update_notes, + user_note=user_note, + user_filter=user_filter, + roles_to_filter=roles_to_filter, + ) @click.command() @@ -207,7 +219,9 @@ def user_expiry(user_ou, root_dn): default="dc=moj,dc=com", ) def remove_all_user_passwords(user_ou, root_dn): - cli.ldap_cmds.user.remove_all_user_passwords(user_ou=user_ou, root_dn=root_dn) + cli.ldap_cmds.user.remove_all_user_passwords( + user_ou=user_ou, root_dn=root_dn + ) # from cli.ldap import test