Closed
Description
Currently, all the users can update actualStartDate
and completionDate
of milestones. We should limit users who can update them, so only user with admin roles can update them.
For checking permissions we can reuse method hasPermission without providing the third argument, like this:
hasPermission({topcoderRoles: ADMIN_ROLES}, req.authUser)
We also have to write at least 4 unit tests which wold validate that:
- non-admin users cannot update
actualStartDate
- non-admin users cannot update
completionDate
- admin users can update
actualStartDate
- admin users can update
completionDate