8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-24 20:33:11 +00:00
re2o/useradmin/admin.py

11 lines
263 B
Python
Raw Normal View History

2019-02-16 08:53:42 +00:00
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')