summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--users/decorators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/decorators.py b/users/decorators.py
index 5226460..26778ec 100644
--- a/users/decorators.py
+++ b/users/decorators.py
@@ -30,4 +30,4 @@ def identity_required(function):
def admin_required(function):
- return user_passes_test(lambda user: user.admin)(function)
+ return user_passes_test(lambda user: user.is_authenticated and user.admin)(function)