Skip to content

[$150] Fix copilotAndAbove permission to check that users is a member of the project #332

Closed
@maxceem

Description

@maxceem

From @vikasrohit

API for adding phases to a project endpoint does not validate if the caller is a member of the project or not. So, a copilot of one project can add phases to any other project in Connect. I am not sure if this is the case with other phase or other entities options as well.

I see that permission copilotAndAbove doesn't check if the user is a member of a project or no, only user role of Topcoder, see https://github.com/topcoder-platform/tc-project-service/blob/challenge%2F30095006/src/permissions/copilotAndAbove.js#L11

This rule is used for all the CRUD endpoints for phases and products, see https://github.com/topcoder-platform/tc-project-service/blob/challenge%2F30095006/src/permissions/index.js#L43-L48

@vikasrohit

  1. Should managers only be able to update projects which are they member of or no?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions