dstack
dstack copied to clipboard
UI can unintentionally add or remove project members
Steps to reproduce
- Open project settings in two tabs (simulate two admins editing the project simultaneously).
- In the first tab, add User A to the project.
- In the seconds tab, add User B to the project.
Actual behaviour
Only User B remains in the project. User A is unintentionally removed by the second tab.
Expected behaviour
Both User A and User B remain in the project.
dstack version
0.19.40
Solution
- In the UI, switch from
/api/projects/{project_name}/set_membersto/api/projects/{project_name}/add_membersand/api/projects/{project_name}/remove_members. - Deprecate
/api/projects/{project_name}/set_members.