IFB-ElixirFr / ifbcat

IFB Catalogue REST API.
GNU General Public License v3.0
1 stars 0 forks source link

Permissions in /api compared to /admin #135

Open bryan-brancotte opened 3 years ago

bryan-brancotte commented 3 years ago

Hi !

I need your opinion on this @hmenager @thomasrosnet

When a user wants to edit an object trough /api, we use the permissions specified in the class to test whether the user can or cannot edit the object. When the same user wants to do it through /admin we also check if the user is granted on the model by django permissions.

This means :

We thus have to chose between :

bryan-brancotte commented 3 years ago

...and my opinion on this matter is that we should allows all admins to edit in /admin everything they already can in /api

bryan-brancotte commented 3 years ago

The patch doing the first very strict option git apply /tmp/patch.txt patch.txt