Skip to content

PM-3532 Return all rows for privilged user#54

Merged
himaniraghav3 merged 2 commits intodevelopfrom
PM-3532
Feb 4, 2026
Merged

PM-3532 Return all rows for privilged user#54
himaniraghav3 merged 2 commits intodevelopfrom
PM-3532

Conversation

@himaniraghav3
Copy link
Copy Markdown
Collaborator

We should return all records for self/autocomplete and public records for others
Missed this earlier


const personalizationFilter = canReadPrivate
? { private: true }
? {}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[❗❗ security]
The change from { private: true } to {} in the personalizationFilter means that all personalization records will be queried without any filter when canReadPrivate is true. Ensure this is the intended behavior, as it could potentially expose more data than necessary.

traits: {
traitId: 'personalization',
data: [collectInfo]
data: _.map(traitData.personalization, t => ({
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[⚠️ design]
The use of _.map here creates an array of objects where each object has a single key-value pair. This structure may not be optimal if the intention is to have a single object with multiple key-value pairs. Consider verifying if this structure is intended and if not, adjust the logic to accumulate key-value pairs into a single object.

@himaniraghav3 himaniraghav3 merged commit 65c6fb7 into develop Feb 4, 2026
7 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