#19 Tests
* refactors sharing user setting by introducing share_with(user) and share_with_list(user_list) for BaseObject for a more self-explanatory sharing
This commit is contained in:
@@ -255,7 +255,7 @@ class NewInterventionForm(BaseForm):
|
||||
intervention.log.add(action)
|
||||
|
||||
# Add the performing user as the first user having access to the data
|
||||
intervention.users.add(user)
|
||||
intervention.share_with(user)
|
||||
return intervention
|
||||
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class ShareInterventionModalForm(BaseModalForm):
|
||||
accessing_users = User.objects.filter(
|
||||
id__in=self.cleaned_data["users"]
|
||||
)
|
||||
self.instance.users.set(accessing_users)
|
||||
self.instance.share_with_list(accessing_users)
|
||||
|
||||
|
||||
class NewRevocationModalForm(BaseModalForm):
|
||||
|
||||
Reference in New Issue
Block a user