Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

@hentrymartin hentrymartin commented Sep 2, 2025

What's in this PR?

  • Avoid exposing project related details to anonymous and users who are not admins and PMs.

@hentrymartin hentrymartin changed the title ]Pm 1836 prod [Hot Fix]Pm 1836 prod Sep 2, 2025
] : [
{
model: models.CopilotRequest,
as: 'copilotRequest',
Copy link

Choose a reason for hiding this comment

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

Consider specifying the attributes you need from the CopilotRequest model to avoid fetching unnecessary data and improve performance.

const relationBasedSortParams = ['projectName'];
const jsonBasedSortParams = ['opportunityTitle', 'projectType'];
if (relationBasedSortParams.includes(sortParams[0])) {
if (relationBasedSortParams.includes(sortParams[0]) && isAdminOrManager) {
Copy link

Choose a reason for hiding this comment

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

The condition now includes isAdminOrManager. Ensure that isAdminOrManager is defined and correctly scoped within this function to avoid potential reference errors.

@jmgasper jmgasper merged commit 0b058d1 into master Sep 2, 2025
2 checks passed
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