mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-01 09:02:26 +00:00
10 lines
263 B
Python
10 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')
|