Skip to content

Commit

Permalink
disbale statistics tab unless ANALYSIS_VIEW action is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
bachmanity1 committed Aug 5, 2024
1 parent 6574115 commit dfa585a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/components/Topics/Topic/Topic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,17 @@ const Topic: React.FC = () => {
>
Settings
</NavLink>
<NavLink
<ActionNavLink
to={clusterTopicStatisticsRelativePath}
className={({ isActive }) => (isActive ? 'is-active' : '')}
permission={{
resource: ResourceType.TOPIC,
action: Action.ANALYSIS_VIEW,
value: topicName,
}}
>
Statistics
</NavLink>
</ActionNavLink>
</Navbar>
<Suspense fallback={<PageLoader />}>
<Routes>
Expand Down

0 comments on commit dfa585a

Please sign in to comment.