Skip to content

[CP Staging] Revert "Fix: Prevent "From" link display when user lacks access to parent report" - #71775

Merged
arosiclair merged 1 commit into
mainfrom
revert-71443-fix/hide-from-link-inaccessible-parent-reports
Oct 2, 2025
Merged

arosiclair merged 1 commit into
mainfrom
revert-71443-fix/hide-from-link-inaccessible-parent-reports

Conversation

@arosiclair

@arosiclair arosiclair commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Reverts #71443

$ #71727

@arosiclair arosiclair self-assigned this Oct 2, 2025
import type {SearchFullscreenNavigatorParamList} from '@libs/Navigation/types';
import {getReportAction, shouldReportActionBeVisible} from '@libs/ReportActionsUtils';
import {canCurrentUserOpenReport, canUserPerformWriteAction as canUserPerformWriteActionReportUtils} from '@libs/ReportUtils';
import {canUserPerformWriteAction as canUserPerformWriteActionReportUtils} from '@libs/ReportUtils';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential Security/UX Issue

This revert removes the canCurrentUserOpenReport import and its usage, which was previously used to prevent displaying the "From" link when users lack access to the parent report.

Impact: Users might now see "From" links to reports they cannot actually access, leading to:

  • Poor user experience when clicking non-functional links
  • Potential information disclosure by showing report names users shouldn't see

Recommendation: Consider re-implementing the access check with a different approach or ensure this revert addresses a more critical issue that outweighs the security/UX concerns.

// We should not display the parent navigation subtitle if the user does not have access to the parent chat (the reportName is empty or user lacks access)
if (!reportName || !canCurrentUserOpenReport(report, isReportArchived)) {
// We should not display the parent navigation subtitle if the user does not have access to the parent chat (the reportName is empty in this case)
if (!reportName) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Logic Regression

This simplified condition removes the access control check that was previously preventing users from seeing links to reports they cannot access.

Previous logic: !reportName || !canCurrentUserOpenReport(report, isReportArchived)
Current logic: !reportName

Issue: The component will now render the "From" link even when canCurrentUserOpenReport(report, isReportArchived) returns false, potentially exposing report names and creating non-functional navigation links.

Recommendation: If this revert is necessary due to issues with canCurrentUserOpenReport, consider:

  1. Adding proper error handling for the access check
  2. Implementing an alternative access validation method
  3. Adding user feedback when links are non-functional

@arosiclair
arosiclair marked this pull request as ready for review October 2, 2025 14:12
@arosiclair
arosiclair requested a review from a team as a code owner October 2, 2025 14:12
@arosiclair
arosiclair merged commit 7a98595 into main Oct 2, 2025
22 of 24 checks passed
@arosiclair
arosiclair deleted the revert-71443-fix/hide-from-link-inaccessible-parent-reports branch October 2, 2025 14:12
@melvin-bot melvin-bot Bot added the Emergency label Oct 2, 2025
@melvin-bot

melvin-bot Bot commented Oct 2, 2025

Copy link
Copy Markdown

@arosiclair looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@melvin-bot
melvin-bot Bot requested review from carlosmiceli and removed request for a team October 2, 2025 14:12
@melvin-bot

melvin-bot Bot commented Oct 2, 2025

Copy link
Copy Markdown

@carlosmiceli Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@arosiclair

Copy link
Copy Markdown
Contributor Author

Straight revert

@OSBotify

OSBotify commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@mountiny mountiny changed the title Revert "Fix: Prevent "From" link display when user lacks access to parent report" [CP Staging] Revert "Fix: Prevent "From" link display when user lacks access to parent report" Oct 2, 2025
OSBotify pushed a commit that referenced this pull request Oct 2, 2025
…ink-inaccessible-parent-reports

Revert "Fix: Prevent "From" link display when user lacks access to parent report"

(cherry picked from commit 7a98595)

(cherry-picked to staging by mountiny)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Oct 2, 2025
@OSBotify OSBotify mentioned this pull request Oct 2, 2025
52 tasks done
@OSBotify

OSBotify commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.2.22-4 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.2.22-6 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.2.23-0 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.2.23-3 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants