#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:
@@ -64,7 +64,7 @@ class APIV1GetTestCase(BaseAPIV1TestCase):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
self.intervention.share_with(self.superuser)
|
||||
self.intervention.share_with_user(self.superuser)
|
||||
url = reverse("api:v1:intervention", args=(str(self.intervention.id),))
|
||||
geojson = self._test_get_object(self.intervention, url)
|
||||
self._assert_geojson_format(geojson)
|
||||
@@ -91,7 +91,7 @@ class APIV1GetTestCase(BaseAPIV1TestCase):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
self.intervention.share_with(self.superuser)
|
||||
self.intervention.share_with_user(self.superuser)
|
||||
self.compensation.intervention = self.intervention
|
||||
self.compensation.save()
|
||||
|
||||
@@ -119,7 +119,7 @@ class APIV1GetTestCase(BaseAPIV1TestCase):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
self.eco_account.share_with(self.superuser)
|
||||
self.eco_account.share_with_user(self.superuser)
|
||||
|
||||
url = reverse("api:v1:ecoaccount", args=(str(self.eco_account.id),))
|
||||
geojson = self._test_get_object(self.eco_account, url)
|
||||
@@ -148,7 +148,7 @@ class APIV1GetTestCase(BaseAPIV1TestCase):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
self.ema.share_with(self.superuser)
|
||||
self.ema.share_with_user(self.superuser)
|
||||
|
||||
url = reverse("api:v1:ema", args=(str(self.ema.id),))
|
||||
geojson = self._test_get_object(self.ema, url)
|
||||
@@ -172,7 +172,7 @@ class APIV1GetTestCase(BaseAPIV1TestCase):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
self.deduction.intervention.share_with(self.superuser)
|
||||
self.deduction.intervention.share_with_user(self.superuser)
|
||||
|
||||
url = reverse("api:v1:deduction", args=(str(self.deduction.id),))
|
||||
_json = self._test_get_object(self.deduction, url)
|
||||
|
||||
Reference in New Issue
Block a user