make it clearer with a LocalError

This commit is contained in:
Azareal 2021-01-19 12:51:24 +10:00
parent 033ddb185d
commit 0bf1b6dbd3
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ func Users(w http.ResponseWriter, r *http.Request, u *c.User) c.RouteError {
name := r.FormValue("s-name")
email := r.FormValue("s-email")
if !u.Perms.EditUserEmail && email != "" {
email = ""
return c.LocalError("Only users with the EditUserEmail permission can search by email.", w, r, u)
}
hasParam := name != "" || email != ""