fix: hide chat fork actions when chat import permission is disabled (#27711)
Co-authored-by: Nameless-Monster-Nerd <Nameless-Monster-Nerd@users.noreply.github.com>
This commit is contained in:
co-authored by
Nameless-Monster-Nerd
parent
5c79ccc9e5
commit
b91bb67b55
@@ -1277,7 +1277,9 @@
|
||||
canCompact: () => !!history?.currentId && contextCompactionEnabled,
|
||||
compactDisabled: () => isActive,
|
||||
canStatus: () => !!history?.currentId,
|
||||
canFork: () => !!history?.currentId,
|
||||
canFork: () =>
|
||||
!!history?.currentId &&
|
||||
($_user?.role === 'admin' || ($_user?.permissions?.chat?.import ?? true)),
|
||||
forkDisabled: () => isActive,
|
||||
contextUsage: () => statusContextUsage,
|
||||
onCompact: compactHandler,
|
||||
|
||||
@@ -1486,7 +1486,7 @@
|
||||
</Tooltip>
|
||||
{/each}
|
||||
|
||||
{#if message.done && !readOnly && forkHandler}
|
||||
{#if message.done && !readOnly && forkHandler && ($user?.role === 'admin' || ($user?.permissions?.chat?.import ?? true))}
|
||||
<Tooltip content="Fork chat" placement="bottom">
|
||||
<button
|
||||
aria-label="Fork chat"
|
||||
|
||||
Reference in New Issue
Block a user