Disable document title for read only role

Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
Anton Alexeyev 2025-05-22 11:47:26 +07:00
parent 98fc3751c6
commit 662a65e3e3

View File

@ -18,6 +18,7 @@
import { IntlString, translateCB } from '@hcengineering/platform'
import { registerFocus, themeStore } from '@hcengineering/ui'
import { onMount } from 'svelte'
import { AccountRole, getCurrentAccount } from '@hcengineering/core'
export let value: string | undefined = undefined
export let placeholder: IntlString | undefined
@ -25,6 +26,7 @@
export let autoFocus = false
export let fill = false
const me = getCurrentAccount()
let input: HTMLInputElement
let placeholderTranslation = ''
@ -69,7 +71,7 @@
<div class="root" class:fill>
<input
bind:this={input}
disabled={readonly}
disabled={readonly || me.role === AccountRole.ReadOnlyGuest}
type="text"
bind:value
placeholder={placeholderTranslation}