2
0
Эх сурвалжийг харах

check if user exists, handle oauth not configured for host SSO

abhishek9686 1 жил өмнө
parent
commit
bb5ad8a241

+ 2 - 2
auth/register_callback.go

@@ -75,8 +75,8 @@ func HandleHostSSOCallback(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 	if !user.IsAdmin && !user.IsSuperAdmin {
-		response := returnErrTemplate("", "only admin users can register using SSO", state, reqKeyIf)
-		w.WriteHeader(http.StatusInternalServerError)
+		response := returnErrTemplate(userClaims.getUserName(), "only admin users can register using SSO", state, reqKeyIf)
+		w.WriteHeader(http.StatusForbidden)
 		w.Write(response)
 		return
 	}