mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +00:00
add JupyterHub.admin_access
optionally allow admin users to login to user servers by visiting a special admin-only URL that sets the relevant cookie - disabled by default - an 'access server' button is added to the admin panel, which sets the necessary cookie to log in to the user server
This commit is contained in:
@@ -100,6 +100,19 @@ define(['jquery', 'utils'], function ($, utils) {
|
||||
);
|
||||
};
|
||||
|
||||
JHAPI.prototype.admin_access = function (user, options) {
|
||||
options = options || {};
|
||||
options = update(options, {
|
||||
type: 'POST',
|
||||
dataType: null,
|
||||
});
|
||||
|
||||
this.api_request(
|
||||
utils.url_path_join('users', user, 'admin-access'),
|
||||
options
|
||||
);
|
||||
};
|
||||
|
||||
JHAPI.prototype.delete_user = function (user, options) {
|
||||
options = options || {};
|
||||
options = update(options, {type: 'DELETE', dataType: null});
|
||||
|
Reference in New Issue
Block a user