1

Basically I would like to have a permission system like Linux file system. I want to classify the permissions whether the user is in the same group as the owner (creator) of the object.

Example scenario:

User can change objects created by someone in the same group as them.

Group Admins can change and delete any object created by users in their group.

Is it possible to do this with default django permission system? If not, is there a package you could recommend?

I hope I am not missing anything basic in django docs but I couldn't find a way to accomplish this.

ekad
  • 14,436
  • 26
  • 44
  • 46
yam
  • 1,383
  • 3
  • 15
  • 34
  • You can add users to groups and write custom methods to check for each action if the user is allowed to do it. You could also add `Boolean` fields to the User model and check for that in the view or another function. example: `if user.userprofile.is_admin: ... ` – hansTheFranz Nov 28 '17 at 23:16
  • That's what I thought to do but I wasn't sure if circumventing django permission system would be secure. – yam Nov 29 '17 at 06:13

0 Answers0