Skip to content

Commit dfa585a

Browse files
committed
disbale statistics tab unless ANALYSIS_VIEW action is allowed
1 parent 6574115 commit dfa585a

File tree

1 file changed

+7
-2
lines changed
  • frontend/src/components/Topics/Topic

1 file changed

+7
-2
lines changed

frontend/src/components/Topics/Topic/Topic.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,17 @@ const Topic: React.FC = () => {
194194
>
195195
Settings
196196
</NavLink>
197-
<NavLink
197+
<ActionNavLink
198198
to={clusterTopicStatisticsRelativePath}
199199
className={({ isActive }) => (isActive ? 'is-active' : '')}
200+
permission={{
201+
resource: ResourceType.TOPIC,
202+
action: Action.ANALYSIS_VIEW,
203+
value: topicName,
204+
}}
200205
>
201206
Statistics
202-
</NavLink>
207+
</ActionNavLink>
203208
</Navbar>
204209
<Suspense fallback={<PageLoader />}>
205210
<Routes>

0 commit comments

Comments
 (0)