mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 18:14:10 +00:00
Fix allow_all check
This commit is contained in:
@@ -13,7 +13,6 @@ from jupyterhub.services.auth import HubAuthenticated
|
||||
class AnnouncementRequestHandler(HubAuthenticated, web.RequestHandler):
|
||||
"""Dynamically manage page announcements"""
|
||||
|
||||
hub_users = []
|
||||
allow_admin = True
|
||||
|
||||
def initialize(self, storage):
|
||||
|
@@ -782,6 +782,8 @@ class HubAuthenticated(object):
|
||||
If left unspecified or None, username will not be checked.
|
||||
- .hub_groups: A set of group names to allow.
|
||||
If left unspecified or None, groups will not be checked.
|
||||
- .allow_admin: Is admin user access allowed or not
|
||||
If left unspecified or False, admin user won't have an access.
|
||||
|
||||
Examples::
|
||||
|
||||
@@ -811,6 +813,7 @@ class HubAuthenticated(object):
|
||||
self.hub_services is None
|
||||
and self.hub_users is None
|
||||
and self.hub_groups is None
|
||||
and not self.allow_admin
|
||||
)
|
||||
|
||||
# self.hub_auth must be a HubAuth instance.
|
||||
|
Reference in New Issue
Block a user