7 lines
170 B
Python
7 lines
170 B
Python
|
# permissions.py
|
||
|
|
||
|
def check_admin(user):
|
||
|
"""check for admin permission for restricted views"""
|
||
|
return user.is_staff or user.groups.filter(name="admin").exists()
|
||
|
|