mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac: temporary enforced behaviour
This commit is contained in:
parent
c75d0bd20b
commit
eac2f36f4f
3 changed files with 4 additions and 4 deletions
|
|
@ -708,7 +708,7 @@
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
const initNewChat = async () => {
|
const initNewChat = async () => {
|
||||||
if ($user?.permissions?.chat?.temporary_enforced) {
|
if ($user?.role !== 'admin' && $user?.permissions?.chat?.temporary_enforced) {
|
||||||
await temporaryChatEnabled.set(true);
|
await temporaryChatEnabled.set(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -491,7 +491,7 @@
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
selectedChatId = null;
|
selectedChatId = null;
|
||||||
|
|
||||||
if ($user?.permissions?.chat?.temporary_enforced) {
|
if ($user?.role !== 'admin' && $user?.permissions?.chat?.temporary_enforced) {
|
||||||
await temporaryChatEnabled.set(true);
|
await temporaryChatEnabled.set(true);
|
||||||
} else {
|
} else {
|
||||||
await temporaryChatEnabled.set(false);
|
await temporaryChatEnabled.set(false);
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
console.log('temporaryChat');
|
console.log('temporaryChat');
|
||||||
|
|
||||||
if ($user?.permissions?.chat?.temporary_enforced) {
|
if ($user?.role !== 'admin' && $user?.permissions?.chat?.temporary_enforced) {
|
||||||
temporaryChatEnabled.set(true);
|
temporaryChatEnabled.set(true);
|
||||||
} else {
|
} else {
|
||||||
temporaryChatEnabled.set(!$temporaryChatEnabled);
|
temporaryChatEnabled.set(!$temporaryChatEnabled);
|
||||||
|
|
@ -222,7 +222,7 @@
|
||||||
temporaryChatEnabled.set(true);
|
temporaryChatEnabled.set(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user?.permissions?.chat?.temporary_enforced) {
|
if ($user?.role !== 'admin' && $user?.permissions?.chat?.temporary_enforced) {
|
||||||
temporaryChatEnabled.set(true);
|
temporaryChatEnabled.set(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue