diff --git a/pgweb/util/decorators.py b/pgweb/util/decorators.py index d3062577..16d968b5 100644 --- a/pgweb/util/decorators.py +++ b/pgweb/util/decorators.py @@ -28,7 +28,7 @@ def login_required(f): @wraps(f) def wrapper(*args, **kwargs): request = args[0] - if not request.path.startswith('/account/'): + if not (request.path.startswith('/account/') or reqeust.path.startswith('/admin/')): raise Exception("Login required in bad path, aborting with exception.") return django_login_required(f)(*args, **kwargs) return wrapper