8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-01 09:02:26 +00:00
re2o/useradmin/admin.py
2019-02-26 09:55:57 +01:00

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')