Fix the permission check for user search API and limit the number of returned users for /user/search (#32310)

Partially backport #32288

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Zettat123
2024-10-23 04:56:13 +00:00
committed by GitHub
co-authored by wxiaoguang
parent b7d12347f3
commit 0d11ba93dd
4 changed files with 32 additions and 40 deletions
+1 -1
View File
@@ -668,7 +668,7 @@ func registerRoutes(m *web.Route) {
m.Post("/forgot_password", auth.ForgotPasswdPost)
m.Post("/logout", auth.SignOut)
m.Get("/stopwatches", reqSignIn, user.GetStopwatches)
m.Get("/search", ignExploreSignIn, user.Search)
m.Get("/search_candidates", ignExploreSignIn, user.SearchCandidates)
m.Group("/oauth2", func() {
m.Get("/{provider}", auth.SignInOAuth)
m.Get("/{provider}/callback", auth.SignInOAuthCallback)