mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
fix: prevent model edit loss from access auto-save (#26004)
This commit is contained in:
parent
bb1419328b
commit
d07e4154fe
1 changed files with 0 additions and 16 deletions
|
|
@ -29,7 +29,6 @@
|
|||
import TerminalSelector from './TerminalSelector.svelte';
|
||||
import AccessControlModal from '../common/AccessControlModal.svelte';
|
||||
import LockClosed from '$lib/components/icons/LockClosed.svelte';
|
||||
import { updateModelAccessGrants } from '$lib/apis/models';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
|
|
@ -363,21 +362,6 @@
|
|||
share={$user?.permissions?.sharing?.models || $user?.role === 'admin'}
|
||||
sharePublic={$user?.permissions?.sharing?.public_models || $user?.role === 'admin'}
|
||||
shareUsers={($user?.permissions?.access_grants?.allow_users ?? true) || $user?.role === 'admin'}
|
||||
onChange={async () => {
|
||||
if (edit && model?.id) {
|
||||
try {
|
||||
await updateModelAccessGrants(
|
||||
localStorage.token,
|
||||
model.id,
|
||||
model.name ?? name,
|
||||
accessGrants
|
||||
);
|
||||
toast.success($i18n.t('Saved'));
|
||||
} catch (error) {
|
||||
toast.error(error?.detail ?? `${error}`);
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
{#if onBack}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue