Skip to content

Commit d049463

Browse files
committed
fix(auth): access user admin status correctly
1 parent 893e0b1 commit d049463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui/components/PrivateRoute/PrivateRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const PrivateRoute = ({ component: Component, adminOnly = false }) => {
1616
return <Navigate to="/login" />;
1717
}
1818

19-
if (adminOnly && !user.isAdmin) {
19+
if (adminOnly && !user.admin) {
2020
console.debug('User is not an admin, redirecting to not authorized page');
2121
return <Navigate to="/not-authorized" />;
2222
}

0 commit comments

Comments
 (0)