Skip to content

[Hot Fix]Pm 1836 prod - #856

Merged
jmgasper merged 3 commits into
masterfrom
pm-1836_prod
Sep 2, 2025
Merged

[Hot Fix]Pm 1836 prod#856
jmgasper merged 3 commits into
masterfrom
pm-1836_prod

Conversation

@hentrymartin

@hentrymartin hentrymartin commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread src/routes/copilotOpportunity/get.js
Comment thread src/routes/copilotOpportunity/get.js
Comment thread src/routes/copilotOpportunity/get.js
Comment thread src/routes/copilotOpportunity/get.js
Comment thread src/routes/copilotOpportunity/get.js
Comment thread src/routes/copilotOpportunity/list.js
Comment thread src/routes/copilotOpportunity/list.js
] : [
{
model: models.CopilotRequest,
as: 'copilotRequest',

Copy link
Copy Markdown

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.

Comment thread src/routes/copilotOpportunity/list.js Outdated
Comment thread src/routes/copilotRequest/list.js
const relationBasedSortParams = ['projectName'];
const jsonBasedSortParams = ['opportunityTitle', 'projectType'];
if (relationBasedSortParams.includes(sortParams[0])) {
if (relationBasedSortParams.includes(sortParams[0]) && isAdminOrManager) {

Copy link
Copy Markdown

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.

Comment thread src/routes/copilotRequest/list.js
Comment thread src/routes/copilotOpportunity/list.js
@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.

2 participants