#101 Team sharing form
* adds team sharing field to share form * splits sharing logic into user based and teams based * adds TeamAdmin for admin backend * adds validity check on Team name -> only unused names shall be valid
This commit is contained in:
@@ -103,7 +103,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
||||
client = Client()
|
||||
client.login(username=self.superuser.username, password=self.superuser_pw)
|
||||
self.superuser.groups.set([])
|
||||
self.intervention.share_with_list([self.superuser])
|
||||
self.intervention.share_with_user_list([self.superuser])
|
||||
|
||||
# Since the user has no groups, it does not matter that data has been shared. There SHOULD not be any difference
|
||||
# to a user without access, since the important permissions are missing
|
||||
@@ -143,7 +143,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
||||
client.login(username=self.superuser.username, password=self.superuser_pw)
|
||||
self.superuser.groups.set([])
|
||||
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
||||
self.intervention.share_with_list([])
|
||||
self.intervention.share_with_user_list([])
|
||||
|
||||
# Since the user has no groups, it does not matter that data is unshared. There SHOULD not be any difference
|
||||
# to a user having shared access, since all important permissions are missing
|
||||
@@ -185,7 +185,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
||||
group = self.groups.get(name=DEFAULT_GROUP)
|
||||
self.superuser.groups.set([group])
|
||||
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
||||
self.intervention.share_with_list([self.superuser])
|
||||
self.intervention.share_with_user_list([self.superuser])
|
||||
|
||||
success_urls = [
|
||||
self.index_url,
|
||||
@@ -221,7 +221,7 @@ class CompensationViewTestCase(BaseViewTestCase):
|
||||
group = self.groups.get(name=DEFAULT_GROUP)
|
||||
self.superuser.groups.set([group])
|
||||
# Sharing is inherited by base intervention for compensation. Therefore configure the interventions share state
|
||||
self.intervention.share_with_list([])
|
||||
self.intervention.share_with_user_list([])
|
||||
|
||||
success_urls = [
|
||||
self.index_url,
|
||||
|
||||
@@ -25,7 +25,7 @@ class CompensationWorkflowTestCase(BaseWorkflowTestCase):
|
||||
super().setUp()
|
||||
|
||||
# Give the user shared access to the dummy intervention -> inherits the access to the compensation
|
||||
self.intervention.share_with(self.superuser)
|
||||
self.intervention.share_with_user(self.superuser)
|
||||
|
||||
# Make sure the intervention itself would be fine with valid data
|
||||
self.intervention = self.fill_out_intervention(self.intervention)
|
||||
|
||||
Reference in New Issue
Block a user