fix: authorize super admins by dynamic highest rank
Remote Build and Deploy / deploy (push) Successful in 42s

This commit is contained in:
Simo committed 2026-07-11 22:35:40 +02:00
1 parent bb847176ad
commit f08e56cf53
10 files changed
+173 -65

No files matched your search

+1 -2
View File
@@ -4,6 +4,5 @@ export interface ProxyToken {
export function shouldRedirectAdminRequest(pathname: string, token: ProxyToken | null): boolean {
if (pathname !== "/admin" && !pathname.startsWith("/admin/")) return false;
const rank = typeof token?.rank === "number" ? token.rank : Number(token?.rank);
return !Number.isInteger(rank) || rank < 7;
return token === null;
}