From 36b66ee5de3a7e970d5a4142e3353b7de9df8001 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Thu, 21 Jul 2022 13:27:06 +1000 Subject: [PATCH] Add feature flag for scim navigation (#3146) --- apps/web/config/cloud.json | 3 ++- apps/web/config/development.json | 3 ++- apps/web/config/qa.json | 3 ++- apps/web/config/selfhosted.json | 3 ++- .../web/src/app/organizations/manage/manage.component.ts | 9 ++++++++- apps/web/src/utils/flags.ts | 1 + 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/apps/web/config/cloud.json b/apps/web/config/cloud.json index 088b52f6dc..daf5ba62bb 100644 --- a/apps/web/config/cloud.json +++ b/apps/web/config/cloud.json @@ -16,6 +16,7 @@ "proxyEvents": "https://events.bitwarden.com" }, "flags": { - "showTrial": false + "showTrial": false, + "scim": false } } diff --git a/apps/web/config/development.json b/apps/web/config/development.json index e3048db7a2..c1e7bbf08f 100644 --- a/apps/web/config/development.json +++ b/apps/web/config/development.json @@ -10,6 +10,7 @@ "proxyNotifications": "http://localhost:61840" }, "flags": { - "showTrial": true + "showTrial": true, + "scim": true } } diff --git a/apps/web/config/qa.json b/apps/web/config/qa.json index 4371ea1ff9..6f7b413579 100644 --- a/apps/web/config/qa.json +++ b/apps/web/config/qa.json @@ -10,6 +10,7 @@ "proxyEvents": "https://events.qa.bitwarden.pw" }, "flags": { - "showTrial": true + "showTrial": true, + "scim": true } } diff --git a/apps/web/config/selfhosted.json b/apps/web/config/selfhosted.json index 3ba61fda59..435fb2770f 100644 --- a/apps/web/config/selfhosted.json +++ b/apps/web/config/selfhosted.json @@ -7,6 +7,7 @@ "port": 8081 }, "flags": { - "showTrial": false + "showTrial": false, + "scim": false } } diff --git a/apps/web/src/app/organizations/manage/manage.component.ts b/apps/web/src/app/organizations/manage/manage.component.ts index 410a4927d2..85ba511021 100644 --- a/apps/web/src/app/organizations/manage/manage.component.ts +++ b/apps/web/src/app/organizations/manage/manage.component.ts @@ -4,6 +4,8 @@ import { ActivatedRoute } from "@angular/router"; import { OrganizationService } from "@bitwarden/common/abstractions/organization.service"; import { Organization } from "@bitwarden/common/models/domain/organization"; +import { flagEnabled } from "../../../utils/flags"; + @Component({ selector: "app-org-manage", templateUrl: "manage.component.html", @@ -25,7 +27,12 @@ export class ManageComponent implements OnInit { this.accessSso = this.organization.useSso; this.accessEvents = this.organization.useEvents; this.accessGroups = this.organization.useGroups; - this.accessScim = this.organization.useScim; + + if (flagEnabled("scim")) { + this.accessScim = this.organization.useScim; + } else { + this.accessScim = false; + } }); } } diff --git a/apps/web/src/utils/flags.ts b/apps/web/src/utils/flags.ts index d6d9d0fe0b..5e7671e8b3 100644 --- a/apps/web/src/utils/flags.ts +++ b/apps/web/src/utils/flags.ts @@ -1,5 +1,6 @@ export type Flags = { showTrial?: boolean; + scim?: boolean; }; export type FlagName = keyof Flags;