[x] Create a class to handle logic of determining who can edit/see assignments.
All admins of a form can admin assignments for the form. Managers of a deployment can admin assignments for their particular deployment. assignedTo people can view assignments. No one else.
[x] Create a fixRoles function similar to the one in ResponseModel that computes all this.
[ ] Enforce that assignments can't be created on server for a deployment that I'm not manager of if I am not an admin of the form
[x] Ensure that server updates roles before saving to database
[x] Add logic in FormCollectionModel to update roles of all assignments if roles of form are updated. There is already similar logic for responses there.
All admins of a form can admin assignments for the form. Managers of a deployment can admin assignments for their particular deployment.
assignedTo
people can view assignments. No one else.fixRoles
function similar to the one inResponseModel
that computes all this.roles
of form are updated. There is already similar logic for responses there.