refac: access control

This commit is contained in:
Timothy Jaeryang Baek 2024-11-17 17:40:31 -08:00
parent 07a9b37737
commit 85731f400c

View File

@ -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);