Fix workspace logo, cookie security, and improve workspace impersonation (#14838)
3 small fixes: - Fix workspace logo - Improve cookie security - Improve workspace impersonation
This commit is contained in:
+17
-1
@@ -26,6 +26,7 @@ import {
|
||||
IconEyeShare,
|
||||
IconHome,
|
||||
IconId,
|
||||
IconLink,
|
||||
IconUser,
|
||||
} from 'twenty-ui/display';
|
||||
import { Button, Toggle } from 'twenty-ui/input';
|
||||
@@ -133,6 +134,10 @@ export const SettingsAdminWorkspaceContent = ({
|
||||
});
|
||||
};
|
||||
|
||||
const getWorkspaceUrl = (workspaceUrls: WorkspaceInfo['workspaceUrls']) => {
|
||||
return workspaceUrls.customUrl ?? workspaceUrls.subdomainUrl;
|
||||
};
|
||||
|
||||
const workspaceInfoItems = [
|
||||
{
|
||||
Icon: IconHome,
|
||||
@@ -160,6 +165,13 @@ export const SettingsAdminWorkspaceContent = ({
|
||||
label: t`ID`,
|
||||
value: activeWorkspace?.id,
|
||||
},
|
||||
{
|
||||
Icon: IconLink,
|
||||
label: t`URL`,
|
||||
value: activeWorkspace?.workspaceUrls
|
||||
? getWorkspaceUrl(activeWorkspace.workspaceUrls)
|
||||
: '',
|
||||
},
|
||||
{
|
||||
Icon: IconUser,
|
||||
label: t`Members`,
|
||||
@@ -186,7 +198,11 @@ export const SettingsAdminWorkspaceContent = ({
|
||||
Icon={IconEyeShare}
|
||||
variant="primary"
|
||||
accent="default"
|
||||
title={t`Impersonate`}
|
||||
title={
|
||||
activeWorkspace.allowImpersonation === false
|
||||
? t`Impersonation is disabled for this workspace`
|
||||
: t`Impersonate`
|
||||
}
|
||||
onClick={() => handleImpersonate(activeWorkspace.id)}
|
||||
disabled={
|
||||
isImpersonateLoading ||
|
||||
|
||||
Reference in New Issue
Block a user