Skip to content

Commit acac409

Browse files
committed
Frontend: PodDetails: Fix wrong verbs
1 parent d84f76a commit acac409

File tree

1 file changed

+34
-30
lines changed

1 file changed

+34
-30
lines changed

frontend/src/components/pod/Details.tsx

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -520,43 +520,47 @@ export default function PodDetails(props: PodDetailsProps) {
520520
id: DefaultHeaderAction.POD_TERMINAL,
521521
action: (
522522
<AuthVisible item={item} authVerb="get" subresource="exec">
523-
<ActionButton
524-
description={t('Terminal / Exec')}
525-
aria-label={t('terminal')}
526-
icon="mdi:console"
527-
onClick={() => {
528-
setShowTerminal(true);
529-
dispatchHeadlampEvent({
530-
type: HeadlampEventType.TERMINAL,
531-
data: {
532-
resource: item,
533-
status: EventStatus.CLOSED,
534-
},
535-
});
536-
}}
537-
/>
523+
<AuthVisible item={item} authVerb="create" subresource="exec">
524+
<ActionButton
525+
description={t('Terminal / Exec')}
526+
aria-label={t('terminal')}
527+
icon="mdi:console"
528+
onClick={() => {
529+
setShowTerminal(true);
530+
dispatchHeadlampEvent({
531+
type: HeadlampEventType.TERMINAL,
532+
data: {
533+
resource: item,
534+
status: EventStatus.CLOSED,
535+
},
536+
});
537+
}}
538+
/>
539+
</AuthVisible>
538540
</AuthVisible>
539541
),
540542
},
541543
{
542544
id: DefaultHeaderAction.POD_ATTACH,
543545
action: (
544546
<AuthVisible item={item} authVerb="get" subresource="attach">
545-
<ActionButton
546-
description={t('Attach')}
547-
aria-label={t('attach')}
548-
icon="mdi:connection"
549-
onClick={() => {
550-
setIsAttached(true);
551-
dispatchHeadlampEvent({
552-
type: HeadlampEventType.POD_ATTACH,
553-
data: {
554-
resource: item,
555-
status: EventStatus.OPENED,
556-
},
557-
});
558-
}}
559-
/>
547+
<AuthVisible item={item} authVerb="create" subresource="attach">
548+
<ActionButton
549+
description={t('Attach')}
550+
aria-label={t('attach')}
551+
icon="mdi:connection"
552+
onClick={() => {
553+
setIsAttached(true);
554+
dispatchHeadlampEvent({
555+
type: HeadlampEventType.POD_ATTACH,
556+
data: {
557+
resource: item,
558+
status: EventStatus.OPENED,
559+
},
560+
});
561+
}}
562+
/>
563+
</AuthVisible>
560564
</AuthVisible>
561565
),
562566
},

0 commit comments

Comments
 (0)