Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Nov 11, 2024
1 parent edd569b commit f61f204
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import click

import cli.ldap_cmds.rbac
import cli.ldap_cmds.user

from cli import (
logger,
)
Expand Down Expand Up @@ -118,15 +118,16 @@ def update_user_home_areas(
help="Remove role from users",
is_flag=True,
)

@click.option(
"-uf",
"--user-filter",
help="Filter to find users",
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,
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f61f204

Please sign in to comment.