mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Allow logins in /admin/ as well
Required for our custom admin pages.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user