mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-10 11:33:01 +00:00
Changed error code of UserTokenListAPIHandler back to 403
This commit is contained in:
@@ -336,7 +336,7 @@ class UserTokenListAPIHandler(APIHandler):
|
||||
scope_filter = self.get_scope_filter('users:tokens')
|
||||
if user is None or not scope_filter(user, kind):
|
||||
raise web.HTTPError(
|
||||
404,
|
||||
403,
|
||||
f"{kind.title()} {user_name} not found or no permissions to generate tokens",
|
||||
)
|
||||
|
||||
|
@@ -1310,8 +1310,8 @@ async def test_get_new_token(app, headers, status, note, expires_in):
|
||||
"as_user, for_user, status",
|
||||
[
|
||||
('admin', 'other', 200),
|
||||
('admin', 'missing', 404),
|
||||
('user', 'other', 404),
|
||||
('admin', 'missing', 403),
|
||||
('user', 'other', 403),
|
||||
('user', 'user', 200),
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user