mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 16:03:00 +00:00
Add tests for metrics API
This commit is contained in:
@@ -250,8 +250,8 @@ def admin_only(self):
|
||||
@auth_decorator
|
||||
def metrics_authentication(self):
|
||||
"""Decorator for restricting access to metrics"""
|
||||
user = self.get_current_user()
|
||||
authenticate_prometheus = self.authenticate_prometheus()
|
||||
user = self.current_user
|
||||
authenticate_prometheus = self.authenticate_prometheus
|
||||
if user is None and not user.authenticate_prometheus:
|
||||
raise web.HTTPError(403)
|
||||
|
||||
|
Reference in New Issue
Block a user