Disable capability for users to create API tokens that never expire or hide Token tab

In JupyterHub, is it possible to disable the ‘Never’ option for user API token generation? Or hide the Token tab in the menu for non-admin users?

I was also thinking about creating a custom user role with read:tokens, or digging deeper into expiry settings (though at a glance they didn’t seem like they would apply to this).

I primarily don’t want users creating API tokens that never expire.

3 Likes

Looks like this was requested here:

1 Like