2👍
✅
Found the answer right after posting this. Apparently there’s also a has_permission()
function separate from the has_object_permission()
that I used. So permissions.py
becomes:
# permissions.py
class RejectAll(permissions.BasePermission):
def has_permission(self, request, view):
return False
This works as expected now.
Source:stackexchange.com