Skip to content

fix(PM-855): allow pm to access all applications #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hentrymartin
Copy link
Collaborator

What' in this PR?

  • Allow pm to access all applications

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

@@ -21,23 +21,17 @@ module.exports = freq => new Promise((resolve, reject) => {
const req = freq;
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.

1 participant