mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
fox #620
This commit is contained in:
@@ -174,7 +174,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) {
|
||||
return
|
||||
}
|
||||
|
||||
// NOTE: need password length check?
|
||||
// FIXME: need password length check
|
||||
if len(form.Passwd) > 0 {
|
||||
u.Passwd = form.Passwd
|
||||
u.Salt = models.GetUserSalt()
|
||||
@@ -191,6 +191,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) {
|
||||
u.AvatarEmail = form.Avatar
|
||||
u.IsActive = form.Active
|
||||
u.IsAdmin = form.Admin
|
||||
u.AllowGitHook = form.AllowGitHook
|
||||
if err := models.UpdateUser(u); err != nil {
|
||||
ctx.Handle(500, "UpdateUser", err)
|
||||
return
|
||||
|
@@ -14,9 +14,9 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -184,6 +184,7 @@ func Http(ctx *middleware.Context) {
|
||||
|
||||
handler := HttpBackend(&config)
|
||||
handler(ctx.Resp, ctx.Req.Request)
|
||||
runtime.GC()
|
||||
}
|
||||
|
||||
type route struct {
|
||||
|
Reference in New Issue
Block a user