Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

Commit dc8cf3d

Browse files
committed
fix: non administrator user redirection error while setup isn't finished
1 parent 979b882 commit dc8cf3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export async function middleware(request: NextRequest) {
7070
path: "/auth/signUp",
7171
},
7272
{
73-
condition: getConfig("SETUP_STATUS") == "REGISTERED" && !routes.setupStatusRegistered.contains(route),
74-
path: user ? "/admin/setup" : "/auth/signIn",
73+
condition: getConfig("SETUP_STATUS") == "REGISTERED" && !routes.setupStatusRegistered.contains(route) && user?.isAdmin,
74+
path: "/admin/setup",
7575
},
7676
// Authenticated state
7777
{

0 commit comments

Comments
 (0)