mirror of
https://github.com/open-webui/open-webui
synced 2024-11-21 23:57:51 +00:00
refac: access control
This commit is contained in:
parent
07a9b37737
commit
85731f400c
@ -18,6 +18,21 @@
|
||||
|
||||
onMount(async () => {
|
||||
groups = await getGroups(localStorage.token);
|
||||
|
||||
if (accessControl === null) {
|
||||
accessControl = null;
|
||||
} else {
|
||||
accessControl = {
|
||||
read: {
|
||||
group_ids: accessControl?.read?.group_ids ?? [],
|
||||
user_ids: accessControl?.read?.user_ids ?? []
|
||||
},
|
||||
write: {
|
||||
group_ids: accessControl?.write?.group_ids ?? [],
|
||||
user_ids: accessControl?.write?.user_ids ?? []
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
$: onChange(accessControl);
|
||||
|
Loading…
Reference in New Issue
Block a user