mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 08:21:08 +00:00
UBERF-5734: Fix guest mode display of server generated links (#4790)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
336732948d
commit
604e37576a
@ -265,8 +265,8 @@
|
|||||||
|
|
||||||
{#await load() then res}
|
{#await load() then res}
|
||||||
{#if res}
|
{#if res}
|
||||||
<div class="workbench-container" style:flex-direction={'row'}>
|
<div class="workbench-container h-full" style:flex-direction={'row'}>
|
||||||
<div class="workbench-container inner">
|
<div class="workbench-container inner h-full">
|
||||||
<div class="antiPanel-component antiComponent" bind:this={contentPanel}>
|
<div class="antiPanel-component antiComponent" bind:this={contentPanel}>
|
||||||
{#if currentApplication && currentApplication.component}
|
{#if currentApplication && currentApplication.component}
|
||||||
<Component is={currentApplication.component} props={{ currentSpace, visibleNav: false }} />
|
<Component is={currentApplication.component} props={{ currentSpace, visibleNav: false }} />
|
||||||
|
@ -54,14 +54,18 @@ export async function OnPublicLinkCreate (tx: Tx, control: TriggerControl): Prom
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateUrl (linkId: Ref<PublicLink>, workspace: WorkspaceId): string {
|
export function getPublicLinkUrl (workspace: WorkspaceId): string {
|
||||||
const front = getMetadata(serverCore.metadata.FrontUrl) ?? ''
|
const front = getMetadata(serverCore.metadata.FrontUrl) ?? ''
|
||||||
const token = generateToken(guestAccountEmail, workspace, { linkId, guest: 'true' })
|
const path = `${guestId}/${workspace.name}`
|
||||||
const path = `${guestId}/${workspace.name}?token=${token}`
|
|
||||||
return concatLink(front, path)
|
return concatLink(front, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function GetPublicLink (
|
function generateUrl (linkId: Ref<PublicLink>, workspace: WorkspaceId): string {
|
||||||
|
const token = generateToken(guestAccountEmail, workspace, { linkId, guest: 'true' })
|
||||||
|
return `${getPublicLinkUrl(workspace)}?token=${token}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getPublicLink (
|
||||||
doc: Doc,
|
doc: Doc,
|
||||||
client: TxOperations,
|
client: TxOperations,
|
||||||
workspace: WorkspaceId,
|
workspace: WorkspaceId,
|
||||||
|
Loading…
Reference in New Issue
Block a user