Should "has_object_permission" call "has_permission" as default instead of returning always "True"? #9612
Unanswered
Cloves23
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, there.
Short description: The method
BasePermission.has_object_permission
is returning a inconsistent value.I was trying to implement a more complex permission check using custom permissions and noticed an inconsistency in the final result. In my case, I have a permission that checks for specific action names and then verifies the user type. The problem occurs when I need to verify object-level permissions. While 'has_permission' returns 'False', 'has_object_permission' returns 'True'. For consistency, wouldn't it be correct to call
has_object_permission
by default?My code:
How I solved it:
How to reproduce
Beta Was this translation helpful? Give feedback.
All reactions