web client login: redirect to setup page if no admin is found

This commit is contained in:
Nicola Murino
2021-09-25 14:50:08 +02:00
parent ad8ebcc031
commit ae9c540640
2 changed files with 9 additions and 0 deletions

View File

@@ -253,6 +253,10 @@ func renderCredentialsPage(w http.ResponseWriter, r *http.Request, pwdError stri
}
func handleClientWebLogin(w http.ResponseWriter, r *http.Request) {
if !dataprovider.HasAdmin() {
http.Redirect(w, r, webAdminSetupPath, http.StatusFound)
return
}
renderClientLoginPage(w, "")
}