mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-24 20:33:11 +00:00
11 lines
263 B
Python
11 lines
263 B
Python
|
from django.contrib.admin.sites import AdminSite
|
||
|
|
||
|
|
||
|
class UserAdmin(AdminSite):
|
||
|
def has_permission(self, request):
|
||
|
"""This admin site doesn't require being staff"""
|
||
|
return request.user.is_active
|
||
|
|
||
|
|
||
|
user_admin_site = UserAdmin(name='user_admin')
|