Hi everyone,
I've added two new endpoints in the 0.5 API user resource, and before I create the PR I would like to understand how object-level permissions are implemented in the API. My question might stem from my limited knowledge of TastyPie, so I apologize if I'm overlooking something obvious.
I noticed that there is a can_edit_commcare_users
permission and decorator, but I don't see it being used in the API. I'm unsure about how to connect the domain/object and verify if an API user can modify a CommCareUser
entity.
Any guidance would be greatly appreciated.
Edit, just to clarify, I saw RequirePermissionAuthentication(HqPermissions.edit_commcare_users)
, my question is specifically how do I determine that a user can modify a specific entity - or if this is automagically determined by TastyPie?