Skip to content

Commit

Permalink
fix: permissions to view private posts
Browse files Browse the repository at this point in the history
ref issue #2841
  • Loading branch information
maxceem committed Nov 5, 2020
1 parent c0c313e commit 1695020
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
6 changes: 1 addition & 5 deletions docs/permissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,12 @@ <h2 class="anchor-container">
</div>
<div class="col-9 py-2">
<div>
<span class="badge badge-primary" title="Allowed Project Role">copilot</span>
<span class="badge badge-primary" title="Allowed Project Role">copilot,manager,account_manager,account_executive,project_manager,program_manager,solution_architect</span>
</div>

<div>
<span class="badge badge-success" title="Allowed Topcoder Role">administrator</span>
<span class="badge badge-success" title="Allowed Topcoder Role">Connect Admin</span>
<span class="badge badge-success" title="Allowed Topcoder Role">Connect Manager</span>
<span class="badge badge-success" title="Allowed Topcoder Role">Program Manager</span>
<span class="badge badge-success" title="Allowed Topcoder Role">Solution Architect</span>
<span class="badge badge-success" title="Allowed Topcoder Role">Project Manager</span>
</div>
</div>
</div>
Expand Down
22 changes: 2 additions & 20 deletions src/config/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,6 @@ const TOPCODER_ADMINS = [
ROLE_CONNECT_ADMIN,
]

/**
* Topcoder Manager level roles.
*/
const TOPCODER_MANAGERS = [
ROLE_CONNECT_MANAGER,
ROLE_PROGRAM_MANAGER,
ROLE_SOLUTION_ARCHITECT,
ROLE_PROJECT_MANAGER,
]

/**
* Topcoder Admin & Manager level roles.
*/
const TOPCODER_MANAGERS_AND_ADMINS = [
...TOPCODER_ADMINS,
...TOPCODER_MANAGERS,
]

/**
* All Topcoder Roles
*/
Expand Down Expand Up @@ -340,10 +322,10 @@ export const PERMISSIONS = {
title: 'Access private posts',
},
projectRoles: [
PROJECT_ROLE_COPILOT,
..._.difference(PROJECT_ALL, [PROJECT_ROLE_CUSTOMER])
],
topcoderRoles: [
...TOPCODER_MANAGERS_AND_ADMINS,
...TOPCODER_ADMINS,
]
},

Expand Down

0 comments on commit 1695020

Please sign in to comment.