[Hold Auth#21556] Show configured domain group preferred workspace to domain admins without policy access#90255
Draft
rayane-d wants to merge 6 commits into
Draft
[Hold Auth#21556] Show configured domain group preferred workspace to domain admins without policy access#90255rayane-d wants to merge 6 commits into
rayane-d wants to merge 6 commits into
Conversation
…Name field for fallback policy name.
…t policy access PreferredWorkspaceToggle resolved the workspace name from the local Onyx policy collection and fell back to the viewer's first admin policy when the configured policy wasn't there. Domain admins without access to the configured workspace saw their own first workspace as the title. Prefer the local policy name as before, but fall back to the server-supplied restrictedPrimaryPolicyName form the group onyx data instead of the viewer's first admin policy. The title now reflects the actual configured workspace regardless of whether the viewer has access to its policy data
…s no policies The preferred workspace selector was hidden when the viewing admin had no admin policies, even if a workspace was already configured for the group. Keep the selector visible whenever a server-supplied preferred policy name is available, even with an empty admin policy list.
Admins without any admin policies of their own and without a local Onyx copy of the configured policy could still tap the menu row and navigate to a picker that had nothing to offer them. Disable the row when the viewer has neither admin policies nor a local copy of the configured policy. The title still displays the configured workspace, only the navigation is gated
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
The bug:
PreferredWorkspaceToggleresolved the workspace name from the local Onyx policy collection and fell back to the viewer's first admin policy. Domain admins without access to the configured workspace saw their own first workspace as the title - an unrelated workspace presented as if it were the configured one.The solution: Prefer the local policy name as before, but fall back to the server-supplied
restrictedPrimaryPolicyName(from the Auth PR) on the security group instead of the viewer's first admin policy. Render the menu item whenever there's an effective name to show (so domain admins without admin policies of their own can still see what's configured), and disable navigation when the viewer has neither admin policies nor a local copy of the configured policy - since the picker would have nothing to offer in that case.Fixed Issues
Part of https://github.com/Expensify/Expensify/issues/634391
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos