conf: overhaul server settings (#5928)

* conf: rename package

* Requires Go 1.12

* Fix lint

* Fix lint

* Overhaul

* db: fix tests

* Save my work

* Fix tests

* Server.UnixSocketPermission

* Server.LocalRootURL

* SSH settings

* Server.OfflineMode

* Save my work

* App.Version

* Remove [server] STATIC_ROOT_PATH

* Server.LandingURL
This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-02-22 09:05:26 +08:00
committed by GitHub
parent 5b14cc6f0b
commit 648d9e253c
102 changed files with 1464 additions and 1329 deletions

View File

@@ -16,7 +16,7 @@ import (
"gogs.io/gogs/internal/db/errors"
"gogs.io/gogs/internal/mailer"
"gogs.io/gogs/internal/route/api/v1/user"
"gogs.io/gogs/internal/setting"
"gogs.io/gogs/internal/conf"
)
func parseLoginSource(c *context.APIContext, u *db.User, sourceID int64, loginName string) {
@@ -68,7 +68,7 @@ func CreateUser(c *context.APIContext, form api.CreateUserOption) {
log.Trace("Account created by admin %q: %s", c.User.Name, u.Name)
// Send email notification.
if form.SendNotify && setting.MailService != nil {
if form.SendNotify && conf.MailService != nil {
mailer.SendRegisterNotifyMail(c.Context.Context, db.NewMailerUser(u))
}