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
Users with access to the administration site have access rights to data based on the data kind (i.e. project, report). It is not possible to give them access rights based on the region where an object is situatied (e.g. Friedrichshain-Kreuzberg).
Is there a solution you'd like to recommend?
Add custom permissions for each borough in Berlin and use them to manage access to data in the Django admin.
Tasks
Make either the Bezirk or Verantworlich property a field with fixed values in order to be able to use this for assigning permissions
Add a custom permission for each Bezirk / Verantworlicher to the Project model. See 1
Overwrite the methodsProject.has_view_permission, Project.has_change_permission, Project.has_add_permission and Project.has_delete_permission classes to check whether the current user has the relevant permission for the Project class as a whole and for the specific borough of this project. See 2
Add a user group for each permission class
Add tests for each combination of permissions
The text was updated successfully, but these errors were encountered:
What's the problem you want solved?
Users with access to the administration site have access rights to data based on the data kind (i.e. project, report). It is not possible to give them access rights based on the region where an object is situatied (e.g. Friedrichshain-Kreuzberg).
Is there a solution you'd like to recommend?
Add custom permissions for each borough in Berlin and use them to manage access to data in the Django admin.
Tasks
Bezirk
orVerantworlich
property a field with fixed values in order to be able to use this for assigning permissionsProject
model. See 1Project.has_view_permission
,Project.has_change_permission
,Project.has_add_permission
andProject.has_delete_permission
classes to check whether the current user has the relevant permission for the Project class as a whole and for the specific borough of this project. See 2The text was updated successfully, but these errors were encountered: