Plz mention in docs that in order to achieve correct combining has_permission with has_object_permission
We need to both override both has_object_permission and has_permission
For example
class OperatorPermission(permissions.BasePermission):
"""
Allowing access to Operator only
"""
def has_permission(self, request, view):
return request.user.is_operator
def has_object_permission(self, request, view, obj):
return request.user.is_operator
Plz mention in docs that in order to achieve correct combining
has_permission
withhas_object_permission
We need to both override bothhas_object_permission
andhas_permission
For example