From 7d2f247721b0ac022f4fa8bc56693be3998c4819 Mon Sep 17 00:00:00 2001 From: Jonathan Hurter Date: Tue, 4 Apr 2023 19:41:44 +0200 Subject: [PATCH] fix(consent) Add consent for more commands Fix #931 --- cmd/addons.go | 5 +++++ cmd/alerts.go | 16 ++++++++++++++++ cmd/autoscalers.go | 19 +++++++++++++++++++ cmd/backups.go | 2 ++ cmd/collaborators.go | 3 +++ cmd/databases.go | 4 ++++ cmd/deployments.go | 7 +++++-- cmd/destroy.go | 2 ++ cmd/domains.go | 7 +++++++ cmd/integration_link.go | 9 +++++++++ cmd/log_drains.go | 7 +++++++ cmd/notifiers.go | 5 +++++ cmd/one_off_stop.go | 3 +++ cmd/region_migrations.go | 7 +++++++ cmd/rename.go | 3 +++ cmd/restart.go | 3 +++ cmd/routing_settings.go | 7 +++++++ cmd/scale.go | 2 ++ cmd/sendsignal.go | 2 ++ cmd/stacks.go | 2 ++ 20 files changed, 113 insertions(+), 2 deletions(-) diff --git a/cmd/addons.go b/cmd/addons.go index 24abb2167..61b829e3d 100644 --- a/cmd/addons.go +++ b/cmd/addons.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/addons" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -54,6 +55,8 @@ var ( return cli.ShowCommandHelp(c, "addons-add") } + utils.CheckForConsent(c.Context, currentApp) + err := addons.Provision(c.Context, currentApp, c.Args().First(), c.Args().Slice()[1]) if err != nil { errorQuit(err) @@ -84,6 +87,8 @@ var ( return cli.ShowCommandHelp(c, "addons-remove") } + utils.CheckForConsent(c.Context, currentApp) + err := addons.Destroy(c.Context, currentApp, c.Args().First()) if err != nil { errorQuit(err) diff --git a/cmd/alerts.go b/cmd/alerts.go index 36732530d..41e8930a0 100644 --- a/cmd/alerts.go +++ b/cmd/alerts.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/alerts" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" scalingo "github.com/Scalingo/go-scalingo/v6" ) @@ -71,6 +72,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + remindEvery := c.Duration("r") durationBeforeTrigger := c.Duration("duration-before-trigger") err := alerts.Add(c.Context, currentApp, scalingo.AlertAddParams{ @@ -128,6 +132,9 @@ var ( alertID := c.Args().First() currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + params := scalingo.AlertUpdateParams{} if c.IsSet("c") { ct := c.String("c") @@ -195,6 +202,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + disabled := false err := alerts.Update(c.Context, currentApp, c.Args().First(), scalingo.AlertUpdateParams{ Disabled: &disabled, @@ -231,6 +241,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + disabled := true err := alerts.Update(c.Context, currentApp, c.Args().First(), scalingo.AlertUpdateParams{ Disabled: &disabled, @@ -263,6 +276,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err := alerts.Remove(c.Context, currentApp, c.Args().First()) if err != nil { errorQuit(err) diff --git a/cmd/autoscalers.go b/cmd/autoscalers.go index 60f92a33d..6fe9f4c12 100644 --- a/cmd/autoscalers.go +++ b/cmd/autoscalers.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/autoscalers" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" "github.com/Scalingo/go-scalingo/v6" ) @@ -21,6 +22,9 @@ var ( cli.ShowCommandHelp(c, "autoscalers") return nil } + currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := autoscalers.List(c.Context, detect.CurrentApp(c)) if err != nil { @@ -59,6 +63,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err := autoscalers.Add(c.Context, currentApp, scalingo.AutoscalerAddParams{ ContainerType: c.String("c"), Metric: c.String("m"), @@ -106,6 +113,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + params := scalingo.AutoscalerUpdateParams{} if c.IsSet("m") { m := c.String("m") @@ -158,6 +168,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + disabled := false err := autoscalers.Update(c.Context, currentApp, c.Args().First(), scalingo.AutoscalerUpdateParams{ Disabled: &disabled, @@ -193,6 +206,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + disabled := true err := autoscalers.Update(c.Context, currentApp, c.Args().First(), scalingo.AutoscalerUpdateParams{ Disabled: &disabled, @@ -225,6 +241,9 @@ var ( } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err := autoscalers.Remove(c.Context, currentApp, c.Args().First()) if err != nil { errorQuit(err) diff --git a/cmd/backups.go b/cmd/backups.go index 7d85e1963..e8fafd62b 100644 --- a/cmd/backups.go +++ b/cmd/backups.go @@ -47,6 +47,8 @@ var ( currentApp := detect.CurrentApp(c) addonName := addonNameFromFlags(c, true) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeDBs) + err := db.CreateBackup(c.Context, currentApp, addonName) if err != nil { errorQuit(err) diff --git a/cmd/collaborators.go b/cmd/collaborators.go index 6a44bb16c..aece66a57 100644 --- a/cmd/collaborators.go +++ b/cmd/collaborators.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/collaborators" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -47,6 +48,7 @@ var ( if c.Args().Len() != 1 { cli.ShowCommandHelp(c, "collaborators-add") } else { + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := collaborators.Add(c.Context, currentApp, c.Args().First()) if err != nil { errorQuit(err) @@ -75,6 +77,7 @@ var ( if c.Args().Len() != 1 { cli.ShowCommandHelp(c, "collaborators-remove") } else { + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := collaborators.Remove(c.Context, currentApp, c.Args().First()) if err != nil { errorQuit(err) diff --git a/cmd/databases.go b/cmd/databases.go index afaa708af..41198fd9f 100644 --- a/cmd/databases.go +++ b/cmd/databases.go @@ -11,6 +11,7 @@ import ( "github.com/Scalingo/cli/db" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" "github.com/Scalingo/go-scalingo/v6" ) @@ -35,6 +36,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeDBs) addonName := addonNameFromFlags(c, true) if c.NArg() != 1 { errorQuit(errors.New("feature argument should be specified")) @@ -64,6 +66,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeDBs) addonName := addonNameFromFlags(c, true) if c.NArg() != 1 { errorQuit(errors.New("feature argument should be specified")) @@ -100,6 +103,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeDBs) addonName := addonNameFromFlags(c, true) params := scalingo.DatabaseUpdatePeriodicBackupsConfigParams{} diff --git a/cmd/deployments.go b/cmd/deployments.go index c309d9129..14acf2a52 100644 --- a/cmd/deployments.go +++ b/cmd/deployments.go @@ -9,6 +9,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/deployments" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" scalingo "github.com/Scalingo/go-scalingo/v6" "github.com/Scalingo/go-scalingo/v6/io" ) @@ -28,6 +29,7 @@ var ( cli.ShowCommandHelp(c, "deployment-delete-cache") } else { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := deployments.ResetCache(c.Context, currentApp) if err != nil { errorQuit(err) @@ -121,8 +123,8 @@ var ( }, Description: CommandDescription{ Description: `Trigger the deployment of a custom archive for your application. - -The version reference is optional (generated from timestamp if none). + +The version reference is optional (generated from timestamp if none). It is a reference to the code you are deploying, version, commit SHA, etc.`, Examples: []string{ "scalingo --app my-app deploy archive.tar.gz v1.0.0", @@ -145,6 +147,7 @@ It is a reference to the code you are deploying, version, commit SHA, etc.`, gitRef = args.Slice()[1] } currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) opts := deployments.DeployOpts{NoFollow: c.Bool("no-follow")} if c.Bool("war") || strings.HasSuffix(archivePath, ".war") { io.Status(fmt.Sprintf("Deploying WAR archive: %s", archivePath)) diff --git a/cmd/destroy.go b/cmd/destroy.go index e53ed9902..ebb05ce44 100644 --- a/cmd/destroy.go +++ b/cmd/destroy.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -36,6 +37,7 @@ var ( currentApp = detect.CurrentApp(c) } + utils.CheckForConsent(c.Context, currentApp) err := apps.Destroy(c.Context, currentApp, c.Bool("force")) if err != nil { errorQuit(err) diff --git a/cmd/domains.go b/cmd/domains.go index 0b3bf2be3..818d49a09 100644 --- a/cmd/domains.go +++ b/cmd/domains.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" "github.com/Scalingo/cli/domains" + "github.com/Scalingo/cli/utils" ) var ( @@ -56,6 +57,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) var err error if c.Args().Len() == 1 { cert := c.String("cert") @@ -95,6 +97,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) var err error if c.Args().Len() == 1 { err = domains.Remove(c.Context, currentApp, c.Args().First()) @@ -134,6 +137,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) var err error if c.Args().Len() == 2 && c.Args().Slice()[1] == "disable" { err = domains.DisableSSL(c.Context, currentApp, c.Args().First()) @@ -171,6 +175,7 @@ This domain is called the canonical domain. This command sets the canonical doma cli.ShowCommandHelp(c, "set-canonical-domain") return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := domains.SetCanonical(c.Context, currentApp, c.Args().First()) if err != nil { @@ -201,6 +206,8 @@ This domain is called the canonical domain. This command sets the canonical doma return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err := domains.UnsetCanonical(c.Context, currentApp) if err != nil { errorQuit(err) diff --git a/cmd/integration_link.go b/cmd/integration_link.go index 28a39a5d8..4f5da8486 100644 --- a/cmd/integration_link.go +++ b/cmd/integration_link.go @@ -18,6 +18,7 @@ import ( "github.com/Scalingo/cli/integrationlink" "github.com/Scalingo/cli/io" "github.com/Scalingo/cli/scmintegrations" + "github.com/Scalingo/cli/utils" "github.com/Scalingo/go-scalingo/v6" "github.com/Scalingo/go-scalingo/v6/http" scalingoerrors "github.com/Scalingo/go-utils/errors/v2" @@ -98,6 +99,7 @@ List of available integrations: } currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) integrationURL := c.Args().First() integrationURLParsed, err := url.Parse(integrationURL) if err != nil { @@ -299,6 +301,7 @@ List of available integrations: } currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) params := integrationlink.CheckAndFillParams(c) if allowReviewAppsFromForks && !awareOfSecurityRisks { @@ -338,6 +341,9 @@ List of available integrations: } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err := integrationlink.Delete(c.Context, currentApp) if err != nil { errorQuit(err) @@ -401,6 +407,9 @@ List of available integrations: } currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + pullRequestID := c.Args().First() err := integrationlink.ManualReviewApp(c.Context, currentApp, pullRequestID) diff --git a/cmd/log_drains.go b/cmd/log_drains.go index 23c0c7102..a5784bd4a 100644 --- a/cmd/log_drains.go +++ b/cmd/log_drains.go @@ -9,6 +9,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" "github.com/Scalingo/cli/logdrains" + "github.com/Scalingo/cli/utils" "github.com/Scalingo/go-scalingo/v6" ) @@ -40,6 +41,8 @@ Use the parameter "--with-addons" to list log drains of all addons connected to return nil } + utils.CheckForConsent(c.Context, currentApp) + addonID := addonNameFromFlags(c) err := logdrains.List(c.Context, currentApp, logdrains.ListAddonOpts{ @@ -104,6 +107,8 @@ Warning: At the moment, only databases addons are able to forward logs to a drai addonID := addonNameFromFlags(c) + utils.CheckForConsent(c.Context, currentApp) + if addonID != "" && (c.Bool("with-addons") || c.Bool("with-databases")) { cli.ShowCommandHelp(c, "log-drains-add") return nil @@ -176,6 +181,8 @@ Warning: At the moment, only databases addons are able to forward logs to a drai return nil } + utils.CheckForConsent(c.Context, currentApp) + message := "This operation will delete the log drain " + drain if addonID == "" && !c.Bool("only-app") { // addons + app diff --git a/cmd/notifiers.go b/cmd/notifiers.go index 764ddbce6..1e46d21ed 100644 --- a/cmd/notifiers.go +++ b/cmd/notifiers.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" "github.com/Scalingo/cli/notifiers" + "github.com/Scalingo/cli/utils" scalingo "github.com/Scalingo/go-scalingo/v6" ) @@ -98,6 +99,8 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + if c.String("platform") == "" { cli.ShowCommandHelp(c, "notifiers-add") } @@ -163,6 +166,7 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) var err error var active *bool @@ -227,6 +231,7 @@ var ( }.Render(), Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) var err error if c.Args().Len() == 1 { err = notifiers.Destroy(c.Context, currentApp, c.Args().First()) diff --git a/cmd/one_off_stop.go b/cmd/one_off_stop.go index 615168c5c..3bfe3382b 100644 --- a/cmd/one_off_stop.go +++ b/cmd/one_off_stop.go @@ -8,6 +8,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -43,6 +44,8 @@ var ( oneOffLabel = "one-off-" + oneOffLabel } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err = apps.OneOffStop(c.Context, currentApp, oneOffLabel) if err != nil { errorQuit(err) diff --git a/cmd/region_migrations.go b/cmd/region_migrations.go index ff5d5d3ae..496893d7e 100644 --- a/cmd/region_migrations.go +++ b/cmd/region_migrations.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" "github.com/Scalingo/cli/regionmigrations" + "github.com/Scalingo/cli/utils" scalingo "github.com/Scalingo/go-scalingo/v6" ) @@ -35,6 +36,8 @@ var ( return nil } + utils.CheckForConsent(c.Context, currentApp) + err := regionmigrations.Create(c.Context, currentApp, c.String("to"), c.String("new-name")) if err != nil { errorQuit(err) @@ -65,6 +68,9 @@ var ( var step scalingo.RegionMigrationStep migrationID := c.Args().First() currentApp := detect.CurrentApp(c) + + utils.CheckForConsent(c.Context, currentApp) + stepsFound := 0 if c.Bool("prepare") { stepsFound++ @@ -109,6 +115,7 @@ var ( migrationID := c.Args().First() currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp) err := regionmigrations.Abort(c.Context, currentApp, migrationID) if err != nil { diff --git a/cmd/rename.go b/cmd/rename.go index 6e615763a..7c70d05dd 100644 --- a/cmd/rename.go +++ b/cmd/rename.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -25,6 +26,8 @@ var ( currentApp := detect.CurrentApp(c) newName := c.String("new-name") + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + err := apps.Rename(c.Context, currentApp, newName) if err != nil { errorQuit(err) diff --git a/cmd/restart.go b/cmd/restart.go index 2ee52ea36..4bef9c87d 100644 --- a/cmd/restart.go +++ b/cmd/restart.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -27,6 +28,8 @@ var ( Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + if err := apps.Restart(c.Context, currentApp, c.Bool("s"), c.Args().Slice()); err != nil { errorQuit(err) } diff --git a/cmd/routing_settings.go b/cmd/routing_settings.go index 68ff2e1d8..45eb8c907 100644 --- a/cmd/routing_settings.go +++ b/cmd/routing_settings.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -29,6 +30,8 @@ var ( return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + enable := true if c.IsSet("disable") { enable = false @@ -66,6 +69,8 @@ var ( return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + enable := true if c.IsSet("disable") { enable = false @@ -103,6 +108,8 @@ var ( return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) + enable := false if c.IsSet("enable") { enable = true diff --git a/cmd/scale.go b/cmd/scale.go index 1a72edb02..e594df439 100644 --- a/cmd/scale.go +++ b/cmd/scale.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" ) var ( @@ -29,6 +30,7 @@ var ( }.Render(), Action: func(c *cli.Context) error { currentApp := detect.CurrentApp(c) + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) if c.Args().Len() == 0 { err := apps.ContainerTypes(c.Context, currentApp) diff --git a/cmd/sendsignal.go b/cmd/sendsignal.go index 167945320..76cf157a2 100644 --- a/cmd/sendsignal.go +++ b/cmd/sendsignal.go @@ -7,6 +7,7 @@ import ( "github.com/Scalingo/cli/apps" "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" + "github.com/Scalingo/cli/utils" "github.com/Scalingo/go-utils/errors/v2" ) @@ -37,6 +38,7 @@ var ( } return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := apps.SendSignal(c.Context, currentApp, c.String("signal"), c.Args().Slice()) if err != nil { diff --git a/cmd/stacks.go b/cmd/stacks.go index 6f4a4598d..8ea0b4b0a 100644 --- a/cmd/stacks.go +++ b/cmd/stacks.go @@ -6,6 +6,7 @@ import ( "github.com/Scalingo/cli/cmd/autocomplete" "github.com/Scalingo/cli/detect" "github.com/Scalingo/cli/stacks" + "github.com/Scalingo/cli/utils" ) var ( @@ -48,6 +49,7 @@ var ( cli.ShowCommandHelp(c, "stacks-set") return nil } + utils.CheckForConsent(c.Context, currentApp, utils.ConsentTypeContainers) err := stacks.Set(c.Context, currentApp, c.Args().First()) if err != nil {