Skip to content

fix(PM-1067): allow project managers to view applications of opportunity not b… #807

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

Merged
merged 4 commits into from
May 14, 2025

Conversation

hentrymartin
Copy link
Collaborator

What's in this PR?

  • allow project managers to view applications of opportunity not belonging to their projects

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

@@ -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);

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 not used in the updated 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;
return Promise.resolve(hasAccess);
})
})

Choose a reason for hiding this comment

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

The hasAccess logic has changed. Ensure that the removal of isPartOfProject does not affect the intended access control logic. Verify that project managers should have access regardless of project membership.

@hentrymartin hentrymartin requested a review from kkartunov May 14, 2025 15:16
Copy link
Contributor

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

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

Looks good.

@hentrymartin hentrymartin merged commit c36ca64 into develop May 14, 2025
1 check passed
@hentrymartin hentrymartin deleted the pm-1067_1 branch May 14, 2025 17:32
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