mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-29 01:28:59 -05:00
fix: non administrator user redirection error while setup isn't finished
This commit is contained in:
parent
979b882150
commit
dc8cf3d5ca
1 changed files with 2 additions and 2 deletions
|
@ -70,8 +70,8 @@ export async function middleware(request: NextRequest) {
|
||||||
path: "/auth/signUp",
|
path: "/auth/signUp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition: getConfig("SETUP_STATUS") == "REGISTERED" && !routes.setupStatusRegistered.contains(route),
|
condition: getConfig("SETUP_STATUS") == "REGISTERED" && !routes.setupStatusRegistered.contains(route) && user?.isAdmin,
|
||||||
path: user ? "/admin/setup" : "/auth/signIn",
|
path: "/admin/setup",
|
||||||
},
|
},
|
||||||
// Authenticated state
|
// Authenticated state
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue