refac: temporary enforced behaviour
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user