فهرست منبع

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

abhishek9686 1 سال پیش
والد
کامیت
bb5ad8a241
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      auth/register_callback.go

+ 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
 	}