Skip to content

Commit

Permalink
fix: check for enterprise in the create/edit templates UI
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleek committed Dec 16, 2024
1 parent a257ca4 commit 203c4a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const StyledCancelButton = styled(Button)(({ theme }) => ({
}));

export const CreateReleasePlanTemplate = () => {
const { uiConfig } = useUiConfig();
const { uiConfig, isEnterprise } = useUiConfig();
const releasePlansEnabled = useUiFlag('releasePlans');
const { setToastApiError, setToastData } = useToast();
const navigate = useNavigate();
Expand Down Expand Up @@ -75,7 +75,7 @@ export const CreateReleasePlanTemplate = () => {
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(getTemplatePayload(), undefined, 2)}'`;

if (!releasePlansEnabled) {
if (!releasePlansEnabled || !isEnterprise()) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const StyledCancelButton = styled(Button)(({ theme }) => ({
}));

export const EditReleasePlanTemplate = () => {
const { uiConfig } = useUiConfig();
const { uiConfig, isEnterprise } = useUiConfig();
const releasePlansEnabled = useUiFlag('releasePlans');
const templateId = useRequiredPathParam('templateId');
const { template, loading, error, refetch } =
Expand Down Expand Up @@ -82,7 +82,7 @@ export const EditReleasePlanTemplate = () => {
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(getTemplatePayload(), undefined, 2)}'`;

if (!releasePlansEnabled) {
if (!releasePlansEnabled || !isEnterprise()) {
return null;
}

Expand Down

0 comments on commit 203c4a6

Please sign in to comment.