1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +02:00

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
This commit is contained in:
Simon Hornby 2022-12-05 12:07:15 +02:00 committed by GitHub
parent 4a3d26065f
commit 447bd44c99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 52 additions and 98 deletions

View File

@ -40,7 +40,6 @@ export const OidcAuth = () => {
const { hasAccess } = useContext(AccessContext); const { hasAccess } = useContext(AccessContext);
const { config } = useAuthSettings('oidc'); const { config } = useAuthSettings('oidc');
const { updateSettings, errors, loading } = useAuthSettingsApi('oidc'); const { updateSettings, errors, loading } = useAuthSettingsApi('oidc');
const ssoSyncShown = Boolean(uiConfig.flags.syncSSOGroups);
useEffect(() => { useEffect(() => {
if (config.discoverUrl) { if (config.discoverUrl) {
@ -240,16 +239,11 @@ export const OidcAuth = () => {
/> />
</Grid> </Grid>
</Grid> </Grid>
<ConditionallyRender
condition={ssoSyncShown}
show={
<SsoGroupSettings <SsoGroupSettings
ssoType="OIDC" ssoType="OIDC"
data={data} data={data}
setValue={setValue} setValue={setValue}
/> />
}
/>
<AutoCreateForm data={data} setValue={setValue} /> <AutoCreateForm data={data} setValue={setValue} />
<Grid container spacing={3}> <Grid container spacing={3}>

View File

@ -40,7 +40,6 @@ export const SamlAuth = () => {
const { hasAccess } = useContext(AccessContext); const { hasAccess } = useContext(AccessContext);
const { config } = useAuthSettings('saml'); const { config } = useAuthSettings('saml');
const { updateSettings, errors, loading } = useAuthSettingsApi('saml'); const { updateSettings, errors, loading } = useAuthSettingsApi('saml');
const ssoSyncShown = Boolean(uiConfig.flags.syncSSOGroups);
useEffect(() => { useEffect(() => {
if (config.entityId) { if (config.entityId) {
@ -251,16 +250,12 @@ export const SamlAuth = () => {
/> />
</Grid> </Grid>
</Grid> </Grid>
<ConditionallyRender
condition={ssoSyncShown}
show={
<SsoGroupSettings <SsoGroupSettings
ssoType="SAML" ssoType="SAML"
data={data} data={data}
setValue={setValue} setValue={setValue}
/> />
}
/>
<AutoCreateForm data={data} setValue={setValue} /> <AutoCreateForm data={data} setValue={setValue} />
<Grid container spacing={3}> <Grid container spacing={3}>

View File

@ -127,18 +127,12 @@ export const GroupForm: FC<IGroupForm> = ({
onChange={e => setDescription(e.target.value)} onChange={e => setDescription(e.target.value)}
data-testid={UG_DESC_ID} data-testid={UG_DESC_ID}
/> />
<ConditionallyRender
condition={
Boolean(uiConfig.flags.syncSSOGroups) && !isOss()
}
show={
<ConditionallyRender <ConditionallyRender
condition={isGroupSyncingEnabled} condition={isGroupSyncingEnabled}
show={ show={
<> <>
<StyledInputDescription> <StyledInputDescription>
Is this group associated with SSO Is this group associated with SSO groups?
groups?
</StyledInputDescription> </StyledInputDescription>
<StyledItemList <StyledItemList
label="SSO group ID / name" label="SSO group ID / name"
@ -150,20 +144,16 @@ export const GroupForm: FC<IGroupForm> = ({
elseShow={() => ( elseShow={() => (
<StyledDescriptionBlock> <StyledDescriptionBlock>
<Box sx={{ display: 'flex' }}> <Box sx={{ display: 'flex' }}>
You can enable SSO groups syncronization You can enable SSO groups syncronization if
if needed needed
<HelpIcon tooltip="SSO groups syncronization allows SSO groups to be mapped to Unleash groups, so that user group membership is properly synchronized." /> <HelpIcon tooltip="SSO groups syncronization allows SSO groups to be mapped to Unleash groups, so that user group membership is properly synchronized." />
</Box> </Box>
<Link data-loading to={`/admin/auth`}> <Link data-loading to={`/admin/auth`}>
<span data-loading> <span data-loading>View SSO configuration</span>
View SSO configuration
</span>
</Link> </Link>
</StyledDescriptionBlock> </StyledDescriptionBlock>
)} )}
/> />
}
/>
<ConditionallyRender <ConditionallyRender
condition={mode === 'Create'} condition={mode === 'Create'}
show={ show={

View File

@ -118,9 +118,6 @@ export const EnvironmentActionCellPopover = ({
</StyledMenuItem> </StyledMenuItem>
)} )}
</PermissionHOC> </PermissionHOC>
<ConditionallyRender
condition={Boolean(uiConfig.flags.cloneEnvironment)}
show={
<PermissionHOC permission={ADMIN}> <PermissionHOC permission={ADMIN}>
{({ hasAccess }) => ( {({ hasAccess }) => (
<StyledMenuItem <StyledMenuItem
@ -141,8 +138,6 @@ export const EnvironmentActionCellPopover = ({
</StyledMenuItem> </StyledMenuItem>
)} )}
</PermissionHOC> </PermissionHOC>
}
/>
<PermissionHOC permission={UPDATE_ENVIRONMENT}> <PermissionHOC permission={UPDATE_ENVIRONMENT}>
{({ hasAccess }) => ( {({ hasAccess }) => (
<StyledMenuItem <StyledMenuItem

View File

@ -40,9 +40,7 @@ export interface IFlags {
UG?: boolean; UG?: boolean;
ENABLE_DARK_MODE_SUPPORT?: boolean; ENABLE_DARK_MODE_SUPPORT?: boolean;
embedProxyFrontend?: boolean; embedProxyFrontend?: boolean;
syncSSOGroups?: boolean;
changeRequests?: boolean; changeRequests?: boolean;
cloneEnvironment?: boolean;
variantsPerEnvironment?: boolean; variantsPerEnvironment?: boolean;
tokensLastSeen?: boolean; tokensLastSeen?: boolean;
favorites?: boolean; favorites?: boolean;

View File

@ -71,14 +71,12 @@ exports[`should create default config 1`] = `
"anonymiseEventLog": false, "anonymiseEventLog": false,
"batchMetrics": false, "batchMetrics": false,
"changeRequests": false, "changeRequests": false,
"cloneEnvironment": false,
"embedProxy": true, "embedProxy": true,
"embedProxyFrontend": true, "embedProxyFrontend": true,
"favorites": false, "favorites": false,
"networkView": false, "networkView": false,
"proxyReturnAllToggles": false, "proxyReturnAllToggles": false,
"responseTimeWithAppName": false, "responseTimeWithAppName": false,
"syncSSOGroups": false,
"toggleTagFiltering": false, "toggleTagFiltering": false,
"tokensLastSeen": false, "tokensLastSeen": false,
"variantsPerEnvironment": false, "variantsPerEnvironment": false,
@ -90,14 +88,12 @@ exports[`should create default config 1`] = `
"anonymiseEventLog": false, "anonymiseEventLog": false,
"batchMetrics": false, "batchMetrics": false,
"changeRequests": false, "changeRequests": false,
"cloneEnvironment": false,
"embedProxy": true, "embedProxy": true,
"embedProxyFrontend": true, "embedProxyFrontend": true,
"favorites": false, "favorites": false,
"networkView": false, "networkView": false,
"proxyReturnAllToggles": false, "proxyReturnAllToggles": false,
"responseTimeWithAppName": false, "responseTimeWithAppName": false,
"syncSSOGroups": false,
"toggleTagFiltering": false, "toggleTagFiltering": false,
"tokensLastSeen": false, "tokensLastSeen": false,
"variantsPerEnvironment": false, "variantsPerEnvironment": false,

View File

@ -14,10 +14,6 @@ export const defaultExperimentalOptions = {
process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUESTS, process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUESTS,
false, false,
), ),
syncSSOGroups: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_SYNC_SSO_GROUPS,
false,
),
embedProxyFrontend: parseEnvVarBoolean( embedProxyFrontend: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY_FRONTEND, process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY_FRONTEND,
true, true,
@ -30,10 +26,6 @@ export const defaultExperimentalOptions = {
process.env.UNLEASH_EXPERIMENTAL_RESPONSE_TIME_WITH_APP_NAME, process.env.UNLEASH_EXPERIMENTAL_RESPONSE_TIME_WITH_APP_NAME,
false, false,
), ),
cloneEnvironment: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_CLONE_ENVIRONMENT,
false,
),
toggleTagFiltering: parseEnvVarBoolean( toggleTagFiltering: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_TOGGLE_TAG_FILTERING, process.env.UNLEASH_EXPERIMENTAL_TOGGLE_TAG_FILTERING,
false, false,
@ -70,9 +62,7 @@ export interface IExperimentalOptions {
embedProxyFrontend?: boolean; embedProxyFrontend?: boolean;
batchMetrics?: boolean; batchMetrics?: boolean;
anonymiseEventLog?: boolean; anonymiseEventLog?: boolean;
syncSSOGroups?: boolean;
changeRequests?: boolean; changeRequests?: boolean;
cloneEnvironment?: boolean;
proxyReturnAllToggles?: boolean; proxyReturnAllToggles?: boolean;
variantsPerEnvironment?: boolean; variantsPerEnvironment?: boolean;
tokensLastSeen?: boolean; tokensLastSeen?: boolean;

View File

@ -38,9 +38,7 @@ process.nextTick(async () => {
batchMetrics: true, batchMetrics: true,
anonymiseEventLog: false, anonymiseEventLog: false,
responseTimeWithAppName: true, responseTimeWithAppName: true,
syncSSOGroups: true,
changeRequests: true, changeRequests: true,
cloneEnvironment: true,
toggleTagFiltering: true, toggleTagFiltering: true,
favorites: true, favorites: true,
variantsPerEnvironment: true, variantsPerEnvironment: true,

View File

@ -27,9 +27,7 @@ export function createTestConfig(config?: IUnleashOptions): IUnleashConfig {
embedProxy: true, embedProxy: true,
embedProxyFrontend: true, embedProxyFrontend: true,
batchMetrics: true, batchMetrics: true,
syncSSOGroups: true,
changeRequests: true, changeRequests: true,
cloneEnvironment: true,
variantsPerEnvironment: true, variantsPerEnvironment: true,
favorites: true, favorites: true,
}, },