Skip to content

Commit ecc4847

Browse files
committed
fix permission check for project details for users with role manager and copilot
1 parent d0f3867 commit ecc4847

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/permissions/project.view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = freq => new Promise((resolve, reject) => {
2626

2727
// if user is co-pilot and the project doesn't have any copilots then
2828
// user can access the project
29-
if (util.hasRole(req, USER_ROLE.COPILOT)) {
29+
if (!hasAccess && util.hasRole(req, USER_ROLE.COPILOT)) {
3030
return models.Project.getProjectIdsForCopilot(currentUserId)
3131
.then((ids) => {
3232
req.context.accessibleProjectIds = ids;

0 commit comments

Comments
 (0)