v3: added a roles/permissions system, added user management tab on user profile
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 42s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 42s
This commit is contained in:
@@ -30,6 +30,13 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
||||
localStorage.removeItem("authResponse");
|
||||
return null;
|
||||
}
|
||||
// Sessions persisted before roles existed have no `role`; the server also
|
||||
// rejects their tokens, but discard them here so the UI never renders with
|
||||
// a roleless user.
|
||||
if (!parsed.user.role) {
|
||||
localStorage.removeItem("authResponse");
|
||||
return null;
|
||||
}
|
||||
|
||||
return parsed;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user