From fec1095f1729fefa8c0feca8cad8e8e81591d348 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sat, 18 Jan 2020 00:34:56 +0100 Subject: [PATCH] [Docs] add usefull info to REQUIRE_SIGNIN_VIEW (#9848) --- docs/content/doc/advanced/config-cheat-sheet.en-us.md | 2 +- routers/repo/pull.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md index ea17096ea..2cce34bd8 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md +++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md @@ -309,7 +309,7 @@ relation to port exhaustion. - `REQUIRE_EXTERNAL_REGISTRATION_PASSWORD`: **false**: Enable this to force externally created accounts (via GitHub, OpenID Connect, etc) to create a password. Warning: enabling this will decrease security, so you should only enable it if you know what you're doing. -- `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. +- `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page or to use API. - `ENABLE_NOTIFY_MAIL`: **false**: Enable this to send e-mail to watchers of a repository when something happens, like creating issues. Requires `Mailer` to be enabled. - `ENABLE_BASIC_AUTHENTICATION`: **true**: Disable this to disallow authenticaton using HTTP diff --git a/routers/repo/pull.go b/routers/repo/pull.go index fc0012ffb..f6397096e 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -351,7 +351,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare ctx.Data["Divergence"] = divergence allowUpdate, err := pull_service.IsUserAllowedToUpdate(pull, ctx.User) if err != nil { - ctx.ServerError("GetDiverging", err) + ctx.ServerError("IsUserAllowedToUpdate", err) return nil } ctx.Data["UpdateAllowed"] = allowUpdate