#3158 skip RUN_USER check on Windows

This commit is contained in:
Unknwon 2016-08-09 17:41:18 -07:00
parent b0b88d9bc5
commit edd786446c
5 changed files with 24 additions and 10 deletions

View file

@ -252,11 +252,10 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
return
}
// Check run user.
curUser := user.CurrentUsername()
if form.RunUser != curUser {
currentUser, match := setting.IsRunUserMatchCurrentUser(form.RunUser)
if !match {
ctx.Data["Err_RunUser"] = true
ctx.RenderWithErr(ctx.Tr("install.run_user_not_match", form.RunUser, curUser), INSTALL, &form)
ctx.RenderWithErr(ctx.Tr("install.run_user_not_match", form.RunUser, currentUser), INSTALL, &form)
return
}