refacto(*): remove everything about default workspace (#9157)
## Summary - [x] Remove defaultWorkspace in user - [x] Remove all occurrence of defaultWorkspace and defaultWorkspaceId - [x] Improve activate workspace flow - [x] Improve security on social login - [x] Add `ImpersonateGuard` - [x] Allow to use impersonation with couple `User/Workspace` - [x] Prevent unexpected reload on activate workspace - [x] Scope login token with workspaceId Fix https://github.com/twentyhq/twenty/issues/9033#event-15714863042
This commit is contained in:
@ -1,14 +1,10 @@
|
||||
import { SettingsAdminImpersonateUsers } from '@/settings/admin-panel/components/SettingsAdminImpersonateUsers';
|
||||
import { SettingsCard } from '@/settings/components/SettingsCard';
|
||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||
import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { IconFlag, UndecoratedLink } from 'twenty-ui';
|
||||
import { SettingsAdminContent } from '@/settings/admin-panel/components/SettingsAdminContent';
|
||||
|
||||
export const SettingsAdmin = () => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<SubMenuTopBarContainer
|
||||
title="Server Admin Panel"
|
||||
@ -21,18 +17,7 @@ export const SettingsAdmin = () => {
|
||||
]}
|
||||
>
|
||||
<SettingsPageContainer>
|
||||
<SettingsAdminImpersonateUsers />
|
||||
<UndecoratedLink to={getSettingsPagePath(SettingsPath.FeatureFlags)}>
|
||||
<SettingsCard
|
||||
Icon={
|
||||
<IconFlag
|
||||
size={theme.icon.size.lg}
|
||||
stroke={theme.icon.stroke.sm}
|
||||
/>
|
||||
}
|
||||
title="Feature Flags"
|
||||
/>
|
||||
</UndecoratedLink>
|
||||
<SettingsAdminContent />
|
||||
</SettingsPageContainer>
|
||||
</SubMenuTopBarContainer>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user