Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin_users hash #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# @param enable_otp_auth Enable one-time password field on the login page
# @param idle_timeout Time in seconds after which an inactive notebook is culled
# @param admin_groups List of user groups that can act as JupyterHub admin
# @param admin_users List of users that are JupyterHub admin
# @param blocked_users List of users that cannot login
# @param jupyterhub_config_hash Custom hash merged to JupyterHub JSON main hash
# @param prometheus_token Token that Prometheus can use to scrape JupyterHub's metrics
Expand All @@ -21,6 +22,7 @@
Boolean $enable_otp_auth = true,
Integer $idle_timeout = 0,
Array[String] $admin_groups = [],
Array[String] $admin_users = [],
Array[String] $blocked_users = ['root', 'toor', 'admin', 'centos', 'slurm'],
Hash $jupyterhub_config_hash = {},
Optional[String] $prometheus_token = undef,
Expand Down Expand Up @@ -205,12 +207,13 @@
'allow_named_servers' => $allow_named_servers,
'named_server_limit_per_user' => $named_server_limit_per_user,
'authenticator_class' => $authenticator_class,
'admin_access' => Boolean(size($admin_groups) > 0),
'admin_access' => Boolean(size($admin_groups) > 0 or size($admin_users) > 0),
'services' => $services,
'load_roles' => $roles,
},
'Authenticator' => {
'admin_groups' => $admin_groups,
'admin_users' => $admin_users,
'blocked_users' => $blocked_users,
'auto_login' => $authenticator ? {
'OIDC' => true,
Expand Down