Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement object based permissions #63

Closed
8 tasks
jokiefer opened this issue Mar 16, 2021 · 0 comments
Closed
8 tasks

Implement object based permissions #63

jokiefer opened this issue Mar 16, 2021 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jokiefer
Copy link
Member

Environment

  • Python version: 3.7
  • MrMap version: v0.0.0

Proposed Functionality

The built in django permission handling should be enhanced by a object level permission handling from django-guardian.

Use Case

security benefit

Since #52, the permission handling is only model based. For example, a user could delete a group if he has the structure.remove_mrmapgroup permission in any case. We need also permission handling on object level. This means a user shall only be able to delete a group, if he has specific permissions for this specific group.

filter querysets benefit

With the PermissionListMixin the user will only see object for that he has permissions.

Database Changes

  • add signals to create permissions on object creation

  • implement dependency workflow on delete group with the following options:

    • If a group has dependencies (objects created_by the group), the group can not be deleted. The user will be forced to decide what to do with his objects. Two options:

      1. move all objects to new group
      2. remove all objects

External Dependencies

django-guardian

@jokiefer jokiefer added type: feature Introduction of new functionality to the application status: accepted This issue has been accepted for implementation labels Mar 16, 2021
@jokiefer jokiefer self-assigned this Mar 16, 2021
@jokiefer jokiefer added this to the v1.0.0 milestone Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant