mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
template: repo: compare: display a warning if the user is not logged in
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
(cherry picked from commit dd4a1107ed
)
This commit is contained in:
parent
424f85304e
commit
5a0c79e6b4
4 changed files with 46 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue