[CP Staging] Revert "Implement read-only access to workspace pages"#92342
Conversation
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/fr.ts b/src/languages/fr.ts
index efd418be962..0d4e81c5a1d 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2978,7 +2978,7 @@ ${amount} pour ${merchant} - ${date}`,
phoneOrEmail: 'Téléphone ou e-mail',
error: {
agentSignInBlocked:
- 'Les comptes d\u2019agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
+ 'Les comptes d’agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
invalidFormatEmailLogin: 'L’adresse e-mail saisie est invalide. Veuillez corriger le format et réessayer.',
},
cannotGetAccountDetails: 'Impossible de récupérer les détails du compte. Veuillez essayer de vous reconnecter.',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf76dfefea
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| CONST.POLICY.POLICY_FEATURE.PER_DIEM, | ||
| CONST.POLICY.POLICY_FEATURE.MORE_FEATURES, | ||
| ].some(canReadPolicyFeature); | ||
| const shouldShowProtectedItems = canEditWorkspaceSettings(policy); |
There was a problem hiding this comment.
Pass the current login when checking workspace edit access
When the workspace policy is only partially loaded and lacks the top-level policy.role, canEditWorkspaceSettings(policy) falls back to no role because no login is supplied, even though employeeList[currentUserLogin].role may already identify the user as an admin/editor. The previous check passed currentUserLogin, so this can hide all protected workspace menu items for otherwise authorized users until a full policy with role arrives.
Useful? React with 👍 / 👎.
lakchote
left a comment
There was a problem hiding this comment.
Straight revert, approving
|
@lakchote looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Not an emergency, straight revert |
|
🚧 @lakchote has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
[CP Staging] Revert "Implement read-only access to workspace pages" (cherry picked from commit 0863142) (cherry-picked to staging by grgia)
|
🚀 Cherry-picked to staging by https://github.com/grgia in version: 9.3.91-1 🚀
Bundle Size Analysis (Sentry): |
Help site review — no changes requiredI reviewed the changes in this PR against Why:
Since the documented behavior already matches the post-revert state, there is no doc drift to correct and no draft PR is needed. @flodnv, no linked help site PR was created because no doc changes are required (details above). Please confirm this assessment is correct — if you believe the Auditor read-only workspace-page behavior was documented somewhere I should update, let me know and I'll open a draft PR. |
|
🚀 Cherry-picked to staging by https://github.com/grgia in version: 9.3.94-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required — no draft PR created. This PR reverts #91305 ("Implement read-only access to workspace pages"), which was a frontend-only change giving auditors read-only access to workspace settings pages (More Features, Company Cards, Expensify Card, etc.). I reviewed the diff and the help site and found nothing in Why no docs changes are needed
If the intent is to permanently document workspace-scoped roles / auditor read access once that feature re-lands in a stable form, that would be a separate docs effort tied to the re-implementation PR rather than this revert. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.94-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/grgia in version: 9.3.97-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required. This PR reverts Expensify/App#91305 ("Implement read-only access to workspace pages"), a frontend-only feature that let auditors open workspace settings pages (More Features, Expensify Card, Company Cards, Categories, Tags, Taxes, Workflows, Rules, etc.) in read-only mode and showed a "Your workspace role can view these settings, but can't edit them" prompt when they tried to edit. That feature was never documented on the help site, and this revert simply restores the prior behavior — so the existing articles already match the post-revert state. No draft PR was created. Why no docs update is needed
@flodnv, no help site changes are required for this revert — the existing articles already reflect the restored behavior, so I did not open a docs PR. Let me know if you'd like me to add anything to the Auditor role documentation anyway. |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.97-1 🚀
|
Reverts #91305
For:
#92320
#92322
#92324
#92325
#92328
#92336
#92353
cc @ShridharGoel @Pujan92