diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-27 18:06:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 18:06:38 +0800 |
commit | 7950f2d17d97c37fca22b88d48056de1c00b4d77 (patch) | |
tree | 962531de3ff86417dc06cc4ece6eb22176fb5b8c /internal/cmd/serv.go | |
parent | cf3d55fa10f9b16d0ba996f8129f50743b2cd4ad (diff) |
conf: overhaul auth and user settings (#5942)
* conf: overhaul auth and user settings
* ci: update travis Go versions
Diffstat (limited to 'internal/cmd/serv.go')
-rw-r--r-- | internal/cmd/serv.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/cmd/serv.go b/internal/cmd/serv.go index b6df787e..e00a392b 100644 --- a/internal/cmd/serv.go +++ b/internal/cmd/serv.go @@ -220,12 +220,11 @@ func runServ(c *cli.Context) error { } } } else { - conf.NewService() // Check if the key can access to the repository in case of it is a deploy key (a deploy keys != user key). - // A deploy key doesn't represent a signed in user, so in a site with Service.RequireSignInView activated - // we should give read access only in repositories where this deploy key is in use. In other case, a server - // or system using an active deploy key can get read access to all the repositories in a Gogs service. - if key.IsDeployKey() && conf.Service.RequireSignInView { + // A deploy key doesn't represent a signed in user, so in a site with Auth.RequireSignInView enabled, + // we should give read access only in repositories where this deploy key is in use. In other cases, + // a server or system using an active deploy key can get read access to all repositories on a Gogs instace. + if key.IsDeployKey() && conf.Auth.RequireSigninView { checkDeployKey(key, repo) } } |