projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fc34e9
)
Allow logins in /admin/ as well
author
Magnus Hagander
<magnus@hagander.net>
Tue, 24 May 2016 19:39:22 +0000
(21:39 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Tue, 24 May 2016 19:39:22 +0000
(21:39 +0200)
Required for our custom admin pages.
pgweb/util/decorators.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/util/decorators.py
b/pgweb/util/decorators.py
index d30625779b46291fb49a278eb6900de1e796191a..16d968b541b747870daf74d73a4151f7cf0d8133 100644
(file)
--- 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