Skip to content

[$70] Only admins should be able to update actualStartDate and completionDate of milestones #381

Closed
@maxceem

Description

@maxceem

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:

  1. non-admin users cannot update actualStartDate
  2. non-admin users cannot update completionDate
  3. admin users can update actualStartDate
  4. admin users can update completionDate

Ref: appirio-tech/connect-app#3210

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions