From 537ef42f7da99f20cd1bbda9042068f588254b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 9 Jan 2025 13:07:28 +0000 Subject: [PATCH] chore: mark SSO as an Enterprise only feature (#9071) https://linear.app/unleash/issue/2-3124/mark-sso-as-an-enterprise-only-feature For all intents and purposes, SSO seems to have always been an Enterprise only feature. It just wasn't very clear previously. See: https://github.com/Unleash/unleash/pull/9045/files#r1899635618 ![image](https://github.com/user-attachments/assets/7ffed499-83d6-4dc2-ae11-6b0d930a82d1) --- frontend/src/component/admin/adminRoutes.ts | 2 +- .../src/component/admin/auth/AuthSettings.tsx | 80 +++++++++---------- .../common/PremiumFeature/PremiumFeature.tsx | 2 +- 3 files changed, 38 insertions(+), 46 deletions(-) diff --git a/frontend/src/component/admin/adminRoutes.ts b/frontend/src/component/admin/adminRoutes.ts index 23ed877b76dc..5f4fdd7dbf69 100644 --- a/frontend/src/component/admin/adminRoutes.ts +++ b/frontend/src/component/admin/adminRoutes.ts @@ -58,7 +58,7 @@ export const adminRoutes: INavigationMenuItem[] = [ { path: '/admin/auth', title: 'Single sign-on', - menu: { adminSettings: true, mode: ['pro', 'enterprise'] }, + menu: { adminSettings: true, mode: ['enterprise'] }, group: 'access', }, { diff --git a/frontend/src/component/admin/auth/AuthSettings.tsx b/frontend/src/component/admin/auth/AuthSettings.tsx index 59df7bfd3751..b91e7f99f0d9 100644 --- a/frontend/src/component/admin/auth/AuthSettings.tsx +++ b/frontend/src/component/admin/auth/AuthSettings.tsx @@ -1,6 +1,5 @@ import { Tab, Tabs } from '@mui/material'; import { PageContent } from 'component/common/PageContent/PageContent'; -import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { OidcAuth } from './OidcAuth/OidcAuth'; import { SamlAuth } from './SamlAuth/SamlAuth'; @@ -45,58 +44,51 @@ export const AuthSettings = () => { const [activeTab, setActiveTab] = useState(0); usePageTitle(`Single sign-on: ${tabs[activeTab].label}`); + if (!isEnterprise()) { + return ; + } + return (
{ - setActiveTab(tabId); + { + setActiveTab(tabId); + }} + indicatorColor='primary' + textColor='primary' + > + {tabs.map((tab, index) => ( + - {tabs.map((tab, index) => ( - - ))} - - } - /> + /> + ))} + } > - - {tabs.map((tab, index) => ( - - {tab.component} - - ))} -
- } - elseShow={} - /> +
+ {tabs.map((tab, index) => ( + + {tab.component} + + ))} +
diff --git a/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx b/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx index 90b71404f72a..2f7ff59996a2 100644 --- a/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx +++ b/frontend/src/component/common/PremiumFeature/PremiumFeature.tsx @@ -89,7 +89,7 @@ const PremiumFeatures = { label: 'User groups', }, sso: { - plan: FeaturePlan.PRO, + plan: FeaturePlan.ENTERPRISE, url: 'https://docs.getunleash.io/reference/rbac#user-group-sso-integration', label: 'Single Sign-On', },