aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/apis/directory/freeipa.py
diff options
context:
space:
mode:
Diffstat (limited to 'arthur/apis/directory/freeipa.py')
-rw-r--r--arthur/apis/directory/freeipa.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/arthur/apis/directory/freeipa.py b/arthur/apis/directory/freeipa.py
index cf4ba23..ef0f1b3 100644
--- a/arthur/apis/directory/freeipa.py
+++ b/arthur/apis/directory/freeipa.py
@@ -68,6 +68,13 @@ def deactivate_user(username: str) -> None:
client.user_mod(username, o_nsaccountlock=True)
+def activate_user(username: str) -> None:
+ """Activate a user in FreeIPA."""
+ client = create_client()
+
+ client.user_mod(username, o_nsaccountlock=False)
+
+
def create_user(username: str, display_name: str, groups: list[str], discord_id: int) -> str:
"""
Create a new user in FreeIPA. If the user exists, the password is reset and returned.