Answers for "staff user is not restricting permission in django"

0

staff user is not restricting permission in django

class UserAdmin(BaseUserAdmin):
    ...
    def has_add_permission(self, request, obj=None):
        return request.user.is_superuser

    def has_delete_permission(self, request, obj=None):
        return request.user.is_superuser
Posted by: Guest on April-27-2020

Code answers related to "staff user is not restricting permission in django"

Python Answers by Framework

Browse Popular Code Answers by Language