From ce358e84637538cf7a69359527675f32391805c6 Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Fri, 26 Jan 2024 13:26:29 -0500 Subject: [PATCH] simplify snapshot disable code (#4399) --- pkg/handlers/app.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/handlers/app.go b/pkg/handlers/app.go index ac75424826..2b3bc05720 100644 --- a/pkg/handlers/app.go +++ b/pkg/handlers/app.go @@ -283,11 +283,7 @@ func responseAppFromApp(a *apptypes.App) (*types.ResponseApp, error) { return nil, errors.Wrap(err, "failed to check if snapshots is allowed") } allowSnapshots := s && license.Spec.IsSnapshotSupported - if allowSnapshots { - if util.IsEmbeddedCluster() { - allowSnapshots = false // snapshots are not allowed in embedded cluster installations today - } - } + allowSnapshots = allowSnapshots && !util.IsEmbeddedCluster() // snapshots are not allowed in embedded cluster installations today isGitopsSupported := license.Spec.IsGitOpsSupported && !util.IsEmbeddedCluster() // gitops is not allowed in embedded cluster installations today