Skip to content

fix(PM-971): allow PM to edit project members #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/permissions/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
group: 'Project Member',
description: 'Who can add themselves as project members.',
},
topcoderRoles: TOPCODER_ROLES_MANAGERS_AND_ADMINS,
topcoderRoles: [...TOPCODER_ROLES_MANAGERS_AND_ADMINS, USER_ROLE.PROJECT_MANAGER],
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
},

Expand All @@ -374,7 +374,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
group: 'Project Member',
description: 'Who can add other users as project members.',
},
topcoderRoles: TOPCODER_ROLES_ADMINS,
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
},

Expand All @@ -384,7 +384,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
group: 'Project Member',
description: 'Who can update project members with "customer" role.',
},
topcoderRoles: TOPCODER_ROLES_ADMINS,
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
projectRoles: [
...PROJECT_ROLES_MANAGEMENT,
PROJECT_MEMBER_ROLE.COPILOT,
Expand All @@ -398,7 +398,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
group: 'Project Member',
description: 'Who can update project members with non "customer" role.',
},
topcoderRoles: TOPCODER_ROLES_ADMINS,
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
projectRoles: PROJECT_ROLES_MANAGEMENT,
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
},
Expand All @@ -409,7 +409,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
group: 'Project Member',
description: 'Who can delete project members with "customer" role.',
},
topcoderRoles: TOPCODER_ROLES_ADMINS,
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
projectRoles: [
...PROJECT_ROLES_MANAGEMENT,
PROJECT_MEMBER_ROLE.COPILOT,
Expand All @@ -423,7 +423,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
group: 'Project Member',
description: 'Who can delete project members with some topcoder role like "manager" etc.',
},
topcoderRoles: TOPCODER_ROLES_ADMINS,
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
projectRoles: PROJECT_ROLES_MANAGEMENT,
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
},
Expand All @@ -437,6 +437,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
topcoderRoles: [
...TOPCODER_ROLES_ADMINS,
USER_ROLE.COPILOT_MANAGER,
USER_ROLE.PROJECT_MANAGER,
],
projectRoles: [
...PROJECT_ROLES_MANAGEMENT,
Expand Down