topcoder-platform / work-manager

This is the frontend application for creating and managing challenges.
13 stars 48 forks source link

Allow for adding users to a challenge #1547

Closed jmgasper closed 11 months ago

jmgasper commented 1 year ago

Expected behavior

On the Resources tab, we will replace the Edit and Back buttons in the header with Add.

The Add button will bring up a popup, allowing the user to:

  1. Select a member, with autocompletion, the same way we do on the Assignee field on a task
  2. Select a role from the list below:

There should be Add and Cancel buttons on the popup. Cancel will just close the popup

Add will add the user with the selected role by POST to the resources API, similar to how we add copilots when a challenge is edited to select one:

https://api.topcoder-dev.com/v5/resources

{
  "challengeId":"123efaf7-fd1f-4e5b-8df5-ad6d9eed3479",
  "roleId":"cfe12b3f-2a24-4639-9d8b-ec86726f76bd",
  "memberHandle":"TCConnCopilot"
}
SCR-20230619-mlhk

Security

Only users with copilot or manager on the challenge, or admin privileges globally should be allowed to use the Add button