You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I called user.has_obj_perm with each permission. Why? Because I'm lazy. There was no reason, whatsoever, not to do it this better way. Yes, you can check all the object-level permissions in a single query. That would need to be implemented in a public method attached to the user model, or modify existing method.
The text was updated successfully, but these errors were encountered:
The standard call from libraries is this:
https://github.com/encode/django-rest-framework/blob/a677b09729ed71014d65b90a86f75c47bf7ae32f/rest_framework/permissions.py#L299
But I called
user.has_obj_perm
with each permission. Why? Because I'm lazy. There was no reason, whatsoever, not to do it this better way. Yes, you can check all the object-level permissions in a single query. That would need to be implemented in a public method attached to the user model, or modify existing method.The text was updated successfully, but these errors were encountered: