Skip to content

Commit

Permalink
Bug 2019647: "Remove favorite" and "Create new Template" should be di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
glekner committed Dec 26, 2021
1 parent c304a7b commit 8fb4a7d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const newTemplateFromCommon: MenuAction = (kind, vmTemplate, { namespace }) => (
mode: VMWizardMode.TEMPLATE,
template: vmTemplate.variants[0],
}),
accessReview: asAccessReview(kind, vmTemplate, 'patch'),
});

const vmTemplateCreateVMAction: MenuAction = (
Expand Down Expand Up @@ -138,6 +139,7 @@ const PinTemplateLabel: React.FC<{ pinned: boolean }> = ({ pinned }) => {
const pinTemplate: MenuAction = (kindObj, vmTemplate, { togglePin, pinned }) => ({
label: <PinTemplateLabel pinned={pinned} />,
callback: () => togglePin(vmTemplate),
accessReview: asAccessReview(kindObj, vmTemplate, 'patch'),
});

const isTemplateItem = (template: TemplateItem | TemplateKind): template is TemplateItem =>
Expand Down

0 comments on commit 8fb4a7d

Please sign in to comment.