From 447bd44c99cd221ae86bc8183006715ce55853cd Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Mon, 5 Dec 2022 12:07:15 +0200 Subject: [PATCH] Remove clone env and sync sso group flags (#2596) Removes feature flags for syncing sso groups and clone environment. These features are being made generally available for all who have access to environments and sso groups --- .../admin/auth/OidcAuth/OidcAuth.tsx | 14 ++--- .../admin/auth/SamlAuth/SamlAuth.tsx | 15 ++--- .../admin/groups/GroupForm/GroupForm.tsx | 56 ++++++++----------- .../EnvironmentActionCellPopover.tsx | 45 +++++++-------- frontend/src/interfaces/uiConfig.ts | 2 - .../__snapshots__/create-config.test.ts.snap | 4 -- src/lib/types/experimental.ts | 10 ---- src/server-dev.ts | 2 - src/test/config/test-config.ts | 2 - 9 files changed, 52 insertions(+), 98 deletions(-) diff --git a/frontend/src/component/admin/auth/OidcAuth/OidcAuth.tsx b/frontend/src/component/admin/auth/OidcAuth/OidcAuth.tsx index 383d750abcc..b000f6ede08 100644 --- a/frontend/src/component/admin/auth/OidcAuth/OidcAuth.tsx +++ b/frontend/src/component/admin/auth/OidcAuth/OidcAuth.tsx @@ -40,7 +40,6 @@ export const OidcAuth = () => { const { hasAccess } = useContext(AccessContext); const { config } = useAuthSettings('oidc'); const { updateSettings, errors, loading } = useAuthSettingsApi('oidc'); - const ssoSyncShown = Boolean(uiConfig.flags.syncSSOGroups); useEffect(() => { if (config.discoverUrl) { @@ -240,15 +239,10 @@ export const OidcAuth = () => { /> - - } + diff --git a/frontend/src/component/admin/auth/SamlAuth/SamlAuth.tsx b/frontend/src/component/admin/auth/SamlAuth/SamlAuth.tsx index 7ecbded6491..a52281c8b5e 100644 --- a/frontend/src/component/admin/auth/SamlAuth/SamlAuth.tsx +++ b/frontend/src/component/admin/auth/SamlAuth/SamlAuth.tsx @@ -40,7 +40,6 @@ export const SamlAuth = () => { const { hasAccess } = useContext(AccessContext); const { config } = useAuthSettings('saml'); const { updateSettings, errors, loading } = useAuthSettingsApi('saml'); - const ssoSyncShown = Boolean(uiConfig.flags.syncSSOGroups); useEffect(() => { if (config.entityId) { @@ -251,15 +250,11 @@ export const SamlAuth = () => { /> - - } + + diff --git a/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx b/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx index 06d65f35dde..f53eeeda4a1 100644 --- a/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx +++ b/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx @@ -128,41 +128,31 @@ export const GroupForm: FC = ({ data-testid={UG_DESC_ID} /> - - Is this group associated with SSO - groups? - - - - } - elseShow={() => ( - - - You can enable SSO groups syncronization - if needed - - - - - View SSO configuration - - - - )} - /> + <> + + Is this group associated with SSO groups? + + + } + elseShow={() => ( + + + You can enable SSO groups syncronization if + needed + + + + View SSO configuration + + + )} /> )} - - {({ hasAccess }) => ( - { - onClone(); - handleClose(); - }} - disabled={!hasAccess} - > - - - - - - Clone - - - - )} - - } - /> + + {({ hasAccess }) => ( + { + onClone(); + handleClose(); + }} + disabled={!hasAccess} + > + + + + + + Clone + + + + )} + {({ hasAccess }) => ( { batchMetrics: true, anonymiseEventLog: false, responseTimeWithAppName: true, - syncSSOGroups: true, changeRequests: true, - cloneEnvironment: true, toggleTagFiltering: true, favorites: true, variantsPerEnvironment: true, diff --git a/src/test/config/test-config.ts b/src/test/config/test-config.ts index 4e305cecfb0..f96f4896be2 100644 --- a/src/test/config/test-config.ts +++ b/src/test/config/test-config.ts @@ -27,9 +27,7 @@ export function createTestConfig(config?: IUnleashOptions): IUnleashConfig { embedProxy: true, embedProxyFrontend: true, batchMetrics: true, - syncSSOGroups: true, changeRequests: true, - cloneEnvironment: true, variantsPerEnvironment: true, favorites: true, },