Default group required

* adds access checks depending on the current group confgiguration of a user
* removes buttons for adding/editing or removing data if default group is not set for a user
* removes buttons for adding/removing related data in unshared interventions
* removes shared-user setting from share menu of an intervention if user is not zb or ets
* renames has_access() from intervention Model into is_shared_with() for more clarity
* fixes bug in group check in_group() from utils.py
This commit is contained in:
mipel
2021-08-02 16:23:29 +02:00
parent 63b2d3ef66
commit f58650effa
10 changed files with 62 additions and 19 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class Intervention(BaseObject):
self.identifier = new_id
super().save(*args, **kwargs)
def has_access(self, user: User):
def is_shared_with(self, user: User):
""" Access check
Checks whether a given user has access to this intervention