diff options
author | Litchi Pi <litchi.pi@proton.me> | 2024-12-16 13:44:25 +0100 |
---|---|---|
committer | litchipi <litchipi@noreply.codeberg.org> | 2024-12-25 18:18:00 +0100 |
commit | dd4a1107ed8977594be48d06aaec2039c983c943 (patch) | |
tree | 55839886a19bd752e0a244ef9fc6e0ff11c793e0 /routers | |
parent | chore(release): first commit of v11.0 (diff) | |
download | forgejo-dd4a1107ed8977594be48d06aaec2039c983c943.tar.xz forgejo-dd4a1107ed8977594be48d06aaec2039c983c943.zip |
template: repo: compare: display a warning if the user is not logged in
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/compare.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index e5eab2bffa..03d49fa692 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -51,6 +51,7 @@ const ( func setCompareContext(ctx *context.Context, before, head *git.Commit, headOwner, headName string) { ctx.Data["BeforeCommit"] = before ctx.Data["HeadCommit"] = head + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + url.QueryEscape(ctx.Data["Link"].(string)) ctx.Data["GetBlobByPathForCommit"] = func(commit *git.Commit, path string) *git.Blob { if commit == nil { |