Fix allow_all check

This commit is contained in:
Martynov Maxim
2021-06-23 14:39:10 +03:00
parent e38509ca42
commit c7c9990c3d
2 changed files with 3 additions and 1 deletions

View File

@@ -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):

View File

@@ -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.