-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: Hide most sections for agents in account page #90371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1815f4f
feat: Update settings pages to conditionally hide Wallet and Preferen…
NicolasBonet 4d29bc2
feat: Add AGENT access restriction to DelegateNoAccessWrapper across …
NicolasBonet 89e6861
feat: Integrate DelegateNoAccessWrapper for AGENT access restriction …
NicolasBonet 834d045
refactor: Clean up JSX structure in MergeResultPage for improved read…
NicolasBonet 492b82b
feat: Integrate DelegateNoAccessWrapper for AGENT access restriction …
NicolasBonet 88d4d32
feat: Implement DelegateNoAccessWrapper for AGENT access restriction …
NicolasBonet 71373f9
refactor: Replace FullScreenLoadingIndicator with ActivityIndicator i…
NicolasBonet 13fae28
feat: Update InitialSettingsPage to conditionally display Security op…
NicolasBonet c2c3e06
feat: Integrate DelegateNoAccessWrapper for AGENT access restriction …
NicolasBonet c53b264
feat: Implement withAgentAccessDenied HOC for AGENT access restrictio…
NicolasBonet 7db229e
refactor: Remove DelegateNoAccessWrapper from multiple settings pages…
NicolasBonet d50ca23
refactor: Replace DelegateNoAccessWrapper with withAgentAccessDenied …
NicolasBonet 935bfe6
refactor: Remove unused imports from LanguagePage, DeviceManagementPa…
NicolasBonet 793d7ea
test: Add unit tests for withAgentAccessDenied HOC to verify access c…
NicolasBonet df78fa4
refactor: Remove duplicate import of withAgentAccessDenied in ModalSt…
NicolasBonet 3b24a4d
refactor: Apply withAgentAccessDenied HOC to additional settings scre…
NicolasBonet 9c45429
refactor: Apply withAgentAccessDenied HOC to additional profile and s…
NicolasBonet 5729d79
refactor: Update import statement for Text component in withAgentAcce…
NicolasBonet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
298 changes: 182 additions & 116 deletions
298
src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
src/libs/Navigation/AppNavigator/withAgentAccessDenied.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import React from 'react'; | ||
| import DelegateNoAccessWrapper from '@components/DelegateNoAccessWrapper'; | ||
| import CONST from '@src/CONST'; | ||
|
|
||
| function withAgentAccessDenied(getComponent: () => React.ComponentType): () => React.ComponentType { | ||
| let ProtectedComponent: React.ComponentType | undefined; | ||
| return () => { | ||
| if (!ProtectedComponent) { | ||
| const Component = getComponent(); | ||
| ProtectedComponent = (props) => ( | ||
| <DelegateNoAccessWrapper accessDeniedVariants={[CONST.DELEGATE.DENIED_ACCESS_VARIANTS.AGENT]}> | ||
| <Component {...props} /> | ||
| </DelegateNoAccessWrapper> | ||
| ); | ||
| } | ||
| return ProtectedComponent; | ||
| }; | ||
| } | ||
|
|
||
| export default withAgentAccessDenied; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.