Skip to content

Commit

Permalink
add policy admin check for not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
lakchote committed Feb 23, 2024
1 parent fc0aa46 commit 6b58105
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,16 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
);

const isPaidGroupPolicy = PolicyUtils.isPaidGroupPolicy(policy);

const isPolicyAdmin = PolicyUtils.isPolicyAdmin(policy);

return (
<WorkspacePageWithSections
headerText={translate('workspace.common.workflows')}
icon={Illustrations.Workflows}
route={route}
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_WORKFLOWS}
shouldShowOfflineIndicatorInWideScreen
shouldShowNotFoundPage={!isPaidGroupPolicy}
shouldShowNotFoundPage={!isPaidGroupPolicy || !isPolicyAdmin}
>
<View style={[styles.mt3, styles.textStrong, isSmallScreenWidth ? styles.workspaceSectionMobile : styles.workspaceSection]}>
<Section
Expand Down

0 comments on commit 6b58105

Please sign in to comment.