From 075b6400b557b893556d6d229973e1230e26df42 Mon Sep 17 00:00:00 2001 From: Wesley Maffly-Kipp Date: Wed, 16 Oct 2024 15:02:26 -0700 Subject: [PATCH] BED-4934: Posture page feature flag (#902) * added updated_posture_page feature flag * reformatting * move migration to next version --- .../database/migration/migrations/v6.2.0.sql | 26 +++++++++++++++++++ cmd/api/src/model/appcfg/flag.go | 1 + 2 files changed, 27 insertions(+) create mode 100644 cmd/api/src/database/migration/migrations/v6.2.0.sql diff --git a/cmd/api/src/database/migration/migrations/v6.2.0.sql b/cmd/api/src/database/migration/migrations/v6.2.0.sql new file mode 100644 index 0000000000..d7d8259207 --- /dev/null +++ b/cmd/api/src/database/migration/migrations/v6.2.0.sql @@ -0,0 +1,26 @@ +-- Copyright 2024 Specter Ops, Inc. +-- +-- Licensed under the Apache License, Version 2.0 +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- SPDX-License-Identifier: Apache-2.0 + +-- Add updated posture page feature flag +INSERT INTO feature_flags (created_at, updated_at, key, name, description, enabled, user_updatable) +VALUES (current_timestamp, + current_timestamp, + 'updated_posture_page', + 'Updated Posture Page', + 'Enables the updated version of the posture page in the UI application', + false, + false) +ON CONFLICT DO NOTHING; diff --git a/cmd/api/src/model/appcfg/flag.go b/cmd/api/src/model/appcfg/flag.go index 0f86eb7aef..74f9a7bcb5 100644 --- a/cmd/api/src/model/appcfg/flag.go +++ b/cmd/api/src/model/appcfg/flag.go @@ -37,6 +37,7 @@ const ( FeatureDarkMode = "dark_mode" FeatureAutoTagT0ParentObjects = "auto_tag_t0_parent_objects" FeatureOIDCSupport = "oidc_support" + FeatureUpdatedPosturePage = "updated_posture_page" ) // FeatureFlag defines the most basic details of what a feature flag must contain to be actionable. Feature flags should be