#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:
@@ -57,7 +57,7 @@ class APIV1DeleteTestCase(BaseAPIV1TestCase):
|
||||
|
||||
"""
|
||||
test_intervention = self.create_dummy_intervention()
|
||||
test_intervention.share_with(self.superuser)
|
||||
test_intervention.share_with_user(self.superuser)
|
||||
url = reverse("api:v1:intervention", args=(str(test_intervention.id),))
|
||||
self._test_delete_object(test_intervention, url)
|
||||
|
||||
@@ -68,7 +68,7 @@ class APIV1DeleteTestCase(BaseAPIV1TestCase):
|
||||
|
||||
"""
|
||||
test_comp = self.create_dummy_compensation()
|
||||
test_comp.share_with(self.superuser)
|
||||
test_comp.share_with_user(self.superuser)
|
||||
url = reverse("api:v1:compensation", args=(str(test_comp.id),))
|
||||
self._test_delete_object(test_comp, url)
|
||||
|
||||
@@ -79,7 +79,7 @@ class APIV1DeleteTestCase(BaseAPIV1TestCase):
|
||||
|
||||
"""
|
||||
test_acc = self.create_dummy_eco_account()
|
||||
test_acc.share_with(self.superuser)
|
||||
test_acc.share_with_user(self.superuser)
|
||||
url = reverse("api:v1:ecoaccount", args=(str(test_acc.id),))
|
||||
self._test_delete_object(test_acc, url)
|
||||
|
||||
@@ -90,7 +90,7 @@ class APIV1DeleteTestCase(BaseAPIV1TestCase):
|
||||
|
||||
"""
|
||||
test_ema = self.create_dummy_ema()
|
||||
test_ema.share_with(self.superuser)
|
||||
test_ema.share_with_user(self.superuser)
|
||||
url = reverse("api:v1:ema", args=(str(test_ema.id),))
|
||||
self._test_delete_object(test_ema, url)
|
||||
|
||||
@@ -101,7 +101,7 @@ class APIV1DeleteTestCase(BaseAPIV1TestCase):
|
||||
|
||||
"""
|
||||
test_deduction = self.create_dummy_deduction()
|
||||
test_deduction.intervention.share_with(self.superuser)
|
||||
test_deduction.intervention.share_with_user(self.superuser)
|
||||
url = reverse("api:v1:deduction", args=(str(test_deduction.id),))
|
||||
|
||||
response = self._run_delete_request(url)
|
||||
|
||||
Reference in New Issue
Block a user