fix: default permissions not being loaded

This commit is contained in:
Timothy Jaeryang Baek 2025-09-29 21:36:07 -05:00
parent 73f32a88e3
commit 887772db22

View file

@ -57,12 +57,6 @@
const setGroups = async () => { const setGroups = async () => {
const allGroups = await getGroups(localStorage.token); const allGroups = await getGroups(localStorage.token);
const userGroup = allGroups.find((g) => g.name.toLowerCase() === 'user');
if (userGroup) {
defaultPermissions = userGroup.permissions;
}
groups = allGroups.filter((g) => g.name.toLowerCase() !== 'user'); groups = allGroups.filter((g) => g.name.toLowerCase() !== 'user');
}; };
@ -110,6 +104,7 @@
total = res.total; total = res.total;
} }
defaultPermissions = await getUserDefaultPermissions(localStorage.token);
await setGroups(); await setGroups();
loaded = true; loaded = true;
}); });