Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

What' in this PR?

  • Allow pm to access all applications

Ticket link - https://topcoder.atlassian.net/browse/PM-855

req.context = req.context || {};
req.context.currentOpportunity = opportunity;
const projectId = opportunity.projectId;
const isProjectManager = util.hasProjectManagerRole(req);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable projectId is declared but never used in the modified code. Consider removing it to clean up the code.

},
}).then((copilotApplication) => {
// check if auth user has access to this project
const hasAccess = util.hasAdminRole(req) || isProjectManager || !!copilotApplication;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for determining hasAccess has changed. Previously, it checked if the user was part of the project members, but now it only checks if the user is a project manager. Ensure this change aligns with the intended functionality described in the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants