#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:
@@ -253,7 +253,7 @@ class NewInterventionForm(BaseForm):
|
||||
intervention.log.add(action)
|
||||
|
||||
# Add the performing user as the first user having access to the data
|
||||
intervention.share_with(user)
|
||||
intervention.share_with_user(user)
|
||||
return intervention
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ class ShareModalForm(BaseModalForm):
|
||||
|
||||
def _add_teams_to_field(self):
|
||||
form_data = {
|
||||
"teams": []
|
||||
"team_select": self.instance.teams.all()
|
||||
}
|
||||
self.load_initial_data(form_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user