Skip to content

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

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.

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.

3 participants