mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 16:51:00 +00:00
Don't error admin decorator on anonymous
This commit is contained in:
parent
95bad674b5
commit
ab7a8cb120
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue