chnage role table so own user can not change his own rules

This commit is contained in:
Adrian Zürcher
2026-02-19 10:51:32 +01:00
parent e686a27bf1
commit 8e3e8f8bc7
2 changed files with 18 additions and 27 deletions

View File

@@ -68,7 +68,11 @@ export function useRoleTable() {
.get('/login/me')
.then((resp) => {
userStore
.setUser({ id: resp.data.id, username: resp.data.username, role: resp.data.role })
.setUser({
id: resp.data.id,
user: resp.data.user,
role: { role: resp.data.role, permissions: [] },
})
.catch((err) => NotifyResponse(err, 'error'));
login.refresh().catch((err) => NotifyResponse(err, 'error'));
})