-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Milestone
Description
Problem
This issue should serve as a checklist and sub-issue aggregate for the feature of being able to assign users to individual tasks. This feature would initially mostly mimic github's user assignment feature, but will likely get refined as we go along.
What we need
Models
-
UserTaskmodel`user_id,task_id, potentiallydue_datecreate_changeset- accepts
[:user_id, :task_id, :due_date] - requires
[:user_id, :task_id]
-constrain uniqueness to user and task, so only one user can be assigned to a task. however, multiple tasks can be assigned to the same user.
- accepts
update_changeset- accepts
[:due_date] - requires nothing, so
:due_datecan be unset
- accepts
Endpoints
-
GET /user-tasks- index, should support coalescing forhasMany -
GET /user-tasks/:id- show -
POST /user-tasks- create endpoint -
PATCH /user-tasks/:id- change due date -
DELETE /user-tasks/:id- removes assignment
Authentication
- GET endpoints should be public
- POST, PATCH and DELETE should be authenticated only
Authorization (policies)
-
[:show, :index]should have none, everyone is able to do it -
[:create, :patch, :delete]- All contributors can do this. We do not want to constrain the system too much. GitHub behaves similarly and it seems to work fine.
All of this is up for discussion, so feel free to add any suggestions
Metadata
Metadata
Assignees
Labels
No labels