Skip to content

Commit 5b08d74

Browse files
authored
Merge pull request #792 from topcoder-platform/pm-971_1
fix(PM-971): allow PM to edit project members
2 parents e149c9a + 15a8a5a commit 5b08d74

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/permissions/constants.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
364364
group: 'Project Member',
365365
description: 'Who can add themselves as project members.',
366366
},
367-
topcoderRoles: TOPCODER_ROLES_MANAGERS_AND_ADMINS,
367+
topcoderRoles: [...TOPCODER_ROLES_MANAGERS_AND_ADMINS, USER_ROLE.PROJECT_MANAGER],
368368
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
369369
},
370370

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

@@ -384,7 +384,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
384384
group: 'Project Member',
385385
description: 'Who can update project members with "customer" role.',
386386
},
387-
topcoderRoles: TOPCODER_ROLES_ADMINS,
387+
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
388388
projectRoles: [
389389
...PROJECT_ROLES_MANAGEMENT,
390390
PROJECT_MEMBER_ROLE.COPILOT,
@@ -398,7 +398,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
398398
group: 'Project Member',
399399
description: 'Who can update project members with non "customer" role.',
400400
},
401-
topcoderRoles: TOPCODER_ROLES_ADMINS,
401+
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
402402
projectRoles: PROJECT_ROLES_MANAGEMENT,
403403
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
404404
},
@@ -409,7 +409,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
409409
group: 'Project Member',
410410
description: 'Who can delete project members with "customer" role.',
411411
},
412-
topcoderRoles: TOPCODER_ROLES_ADMINS,
412+
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
413413
projectRoles: [
414414
...PROJECT_ROLES_MANAGEMENT,
415415
PROJECT_MEMBER_ROLE.COPILOT,
@@ -423,7 +423,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
423423
group: 'Project Member',
424424
description: 'Who can delete project members with some topcoder role like "manager" etc.',
425425
},
426-
topcoderRoles: TOPCODER_ROLES_ADMINS,
426+
topcoderRoles: [...TOPCODER_ROLES_ADMINS, USER_ROLE.PROJECT_MANAGER],
427427
projectRoles: PROJECT_ROLES_MANAGEMENT,
428428
scopes: SCOPES_PROJECT_MEMBERS_WRITE,
429429
},
@@ -437,6 +437,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
437437
topcoderRoles: [
438438
...TOPCODER_ROLES_ADMINS,
439439
USER_ROLE.COPILOT_MANAGER,
440+
USER_ROLE.PROJECT_MANAGER,
440441
],
441442
projectRoles: [
442443
...PROJECT_ROLES_MANAGEMENT,

0 commit comments

Comments
 (0)