Skip to content

Commit

Permalink
feat: added admin user management (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile authored Jan 8, 2024
1 parent 5f3c24b commit 7fad0a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ images=()

repobase="${REPOBASE:-ghcr.io/nethserver}"
reponame="ubuntu-samba"
user_manager_version=v0.5.0
user_manager_version=v0.6.0

container="ubuntu-working-container"
# Prepare a local Ubuntu-based samba image
Expand Down
3 changes: 3 additions & 0 deletions imageroot/api-moduled/handlers/login/post
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ if proc_kinit.returncode != 0:
else:
sys.exit(3) # Login failed

if "Domain Admins" not in oclaims["groups"]:
oclaims["scope"] = ["change-password"]

# Clean up the cache file after a successful login:
subprocess.run(["podman", "exec", "samba-dc", "rm", "-f", cache_file], text=True, capture_output=True)

Expand Down

0 comments on commit 7fad0a2

Please sign in to comment.