mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 03:14:40 +03: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}
|
||||
{#if res}
|
||||
<div class="workbench-container" style:flex-direction={'row'}>
|
||||
<div class="workbench-container inner">
|
||||
<div class="workbench-container h-full" style:flex-direction={'row'}>
|
||||
<div class="workbench-container inner h-full">
|
||||
<div class="antiPanel-component antiComponent" bind:this={contentPanel}>
|
||||
{#if currentApplication && currentApplication.component}
|
||||
<Component is={currentApplication.component} props={{ currentSpace, visibleNav: false }} />
|
||||
|
@ -54,14 +54,18 @@ export async function OnPublicLinkCreate (tx: Tx, control: TriggerControl): Prom
|
||||
return res
|
||||
}
|
||||
|
||||
function generateUrl (linkId: Ref<PublicLink>, workspace: WorkspaceId): string {
|
||||
export function getPublicLinkUrl (workspace: WorkspaceId): string {
|
||||
const front = getMetadata(serverCore.metadata.FrontUrl) ?? ''
|
||||
const token = generateToken(guestAccountEmail, workspace, { linkId, guest: 'true' })
|
||||
const path = `${guestId}/${workspace.name}?token=${token}`
|
||||
const path = `${guestId}/${workspace.name}`
|
||||
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,
|
||||
client: TxOperations,
|
||||
workspace: WorkspaceId,
|
||||
|
Loading…
Reference in New Issue
Block a user