Skip to content

Commit

Permalink
Merge pull request #1118 from OneCommunityGlobal/ambika-fix-some-task…
Browse files Browse the repository at this point in the history
…s-not-appearning-in-tasks-tab

Ambika fix some tasks not appearing in tasks tab or dropdown
  • Loading branch information
one-community authored Sep 26, 2024
2 parents aeeea8d + 5cdb5f8 commit 9298038
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/controllers/projectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,17 @@ const projectController = function (Project) {
res.status(400).send('Invalid request');
return;
}
const getId = await hasPermission(req.body.requestor, 'getProjectMembers');

const getProjMembers = await hasPermission(req.body.requestor, 'getProjectMembers');

// If a user has permission to post, edit, or suggest tasks, they also have the ability to assign resources to those tasks.
// Therefore, the _id field must be included when retrieving the user profile for project members (resources).
const postTask = await hasPermission(req.body.requestor, 'postTask');
const updateTask = await hasPermission(req.body.requestor, 'updateTask');
const suggestTask = await hasPermission(req.body.requestor, 'suggestTask');

const getId = (getProjMembers || postTask || updateTask || suggestTask);

userProfile
.find(
{ projects: projectId },
Expand Down

0 comments on commit 9298038

Please sign in to comment.