@@ -216,7 +216,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
216216 description : 'There are additional limitations on editing some parts of the project.' ,
217217 } ,
218218 topcoderRoles : TOPCODER_ROLES_MANAGERS_AND_ADMINS ,
219- projectRoles : ALL ,
219+ projectRoles : [
220+ ...PROJECT_ROLES_MANAGEMENT ,
221+ PROJECT_MEMBER_ROLE . COPILOT ,
222+ ] ,
220223 scopes : SCOPES_PROJECTS_WRITE ,
221224 } ,
222225
@@ -365,7 +368,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
365368 description : 'Who can update project members with "customer" role.' ,
366369 } ,
367370 topcoderRoles : TOPCODER_ROLES_ADMINS ,
368- projectRoles : ALL ,
371+ projectRoles : [
372+ ...PROJECT_ROLES_MANAGEMENT ,
373+ PROJECT_MEMBER_ROLE . COPILOT ,
374+ ] ,
369375 scopes : SCOPES_PROJECT_MEMBERS_WRITE ,
370376 } ,
371377
@@ -387,7 +393,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
387393 description : 'Who can delete project members with "customer" role.' ,
388394 } ,
389395 topcoderRoles : TOPCODER_ROLES_ADMINS ,
390- projectRoles : ALL ,
396+ projectRoles : [
397+ ...PROJECT_ROLES_MANAGEMENT ,
398+ PROJECT_MEMBER_ROLE . COPILOT ,
399+ ] ,
391400 scopes : SCOPES_PROJECT_MEMBERS_WRITE ,
392401 } ,
393402
@@ -412,7 +421,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
412421 ...TOPCODER_ROLES_ADMINS ,
413422 USER_ROLE . COPILOT_MANAGER ,
414423 ] ,
415- projectRoles : ALL ,
424+ projectRoles : [
425+ ...PROJECT_ROLES_MANAGEMENT ,
426+ PROJECT_MEMBER_ROLE . COPILOT ,
427+ ] ,
416428 scopes : SCOPES_PROJECT_MEMBERS_WRITE ,
417429 } ,
418430
@@ -436,7 +448,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
436448 description : 'Who can view invites of other users.' ,
437449 } ,
438450 topcoderRoles : TOPCODER_ROLES_MANAGERS_AND_ADMINS ,
439- projectRoles : ALL ,
451+ projectRoles : [
452+ ...PROJECT_ROLES_MANAGEMENT ,
453+ PROJECT_MEMBER_ROLE . COPILOT ,
454+ ] ,
440455 scopes : SCOPES_PROJECT_INVITES_READ ,
441456 } ,
442457
@@ -447,7 +462,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
447462 description : 'Who can invite project members with "customer" role.' ,
448463 } ,
449464 topcoderRoles : TOPCODER_ROLES_ADMINS ,
450- projectRoles : ALL ,
465+ projectRoles : [
466+ ...PROJECT_ROLES_MANAGEMENT ,
467+ PROJECT_MEMBER_ROLE . COPILOT ,
468+ ] ,
451469 scopes : SCOPES_PROJECT_INVITES_WRITE ,
452470 } ,
453471
@@ -576,7 +594,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
576594 group : 'Project Attachment' ,
577595 } ,
578596 topcoderRoles : TOPCODER_ROLES_MANAGERS_AND_ADMINS ,
579- projectRoles : ALL ,
597+ projectRoles : [
598+ ...PROJECT_ROLES_MANAGEMENT ,
599+ PROJECT_MEMBER_ROLE . COPILOT ,
600+ ] ,
580601 scopes : SCOPES_PROJECTS_WRITE ,
581602 } ,
582603
@@ -608,7 +629,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
608629 description : 'Who can edit attachment they created.' ,
609630 } ,
610631 topcoderRoles : TOPCODER_ROLES_MANAGERS_AND_ADMINS ,
611- projectRoles : ALL ,
632+ projectRoles : [
633+ ...PROJECT_ROLES_MANAGEMENT ,
634+ PROJECT_MEMBER_ROLE . COPILOT ,
635+ ] ,
612636 scopes : SCOPES_PROJECTS_WRITE ,
613637 } ,
614638
@@ -629,7 +653,10 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
629653 description : 'Who can delete attachment they created.' ,
630654 } ,
631655 topcoderRoles : TOPCODER_ROLES_MANAGERS_AND_ADMINS ,
632- projectRoles : ALL ,
656+ projectRoles : [
657+ ...PROJECT_ROLES_MANAGEMENT ,
658+ PROJECT_MEMBER_ROLE . COPILOT ,
659+ ] ,
633660 scopes : SCOPES_PROJECTS_WRITE ,
634661 } ,
635662
@@ -708,6 +735,7 @@ export const PERMISSION = { // eslint-disable-line import/prefer-default-export
708735 */
709736export const PROJECT_TO_TOPCODER_ROLES_MATRIX = {
710737 [ PROJECT_MEMBER_ROLE . CUSTOMER ] : _ . values ( USER_ROLE ) ,
738+ [ PROJECT_MEMBER_ROLE . OBSERVER ] : _ . values ( USER_ROLE ) ,
711739 [ PROJECT_MEMBER_ROLE . MANAGER ] : [
712740 USER_ROLE . TOPCODER_ADMIN ,
713741 USER_ROLE . CONNECT_ADMIN ,
0 commit comments