From b0e4c8a57ef7fb7ec009f140e704252dce6d5b60 Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Wed, 5 Jul 2023 14:33:33 +0200 Subject: [PATCH] chore: remove group root role toggle (#4026) --- .../admin/groups/GroupForm/GroupForm.tsx | 42 +++++++------------ frontend/src/interfaces/uiConfig.ts | 1 - .../__snapshots__/create-config.test.ts.snap | 2 - src/lib/types/experimental.ts | 5 --- 4 files changed, 14 insertions(+), 36 deletions(-) diff --git a/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx b/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx index e0a4fa538b..9fa4765986 100644 --- a/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx +++ b/frontend/src/component/admin/groups/GroupForm/GroupForm.tsx @@ -12,7 +12,6 @@ import { Link } from 'react-router-dom'; import { HelpIcon } from 'component/common/HelpIcon/HelpIcon'; import { IRole } from 'interfaces/role'; import { useUsers } from 'hooks/api/getters/useUsers/useUsers'; -import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { RoleSelect } from 'component/common/RoleSelect/RoleSelect'; const StyledForm = styled('form')(() => ({ @@ -111,15 +110,12 @@ export const GroupForm: FC = ({ }) => { const { config: oidcSettings } = useAuthSettings('oidc'); const { config: samlSettings } = useAuthSettings('saml'); - const { uiConfig } = useUiConfig(); const { roles } = useUsers(); const isGroupSyncingEnabled = (oidcSettings?.enabled && oidcSettings.enableGroupSyncing) || (samlSettings?.enabled && samlSettings.enableGroupSyncing); - const groupRootRolesEnabled = Boolean(uiConfig.flags.groupRootRoles); - const roleIdToRole = (rootRoleId: number | null): IRole | null => { return roles.find((role: IRole) => role.id === rootRoleId) || null; }; @@ -180,30 +176,20 @@ export const GroupForm: FC = ({ )} /> - - - - Do you want to associate a root role with - this group? - - - - - - setRootRole(role?.id || null) - } - /> - - - } - /> + + + Do you want to associate a root role with this group? + + + + + setRootRole(role?.id || null)} + /> +