File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
523523
524524 // Treat as pull request if both references are branches
525525 if ctx .Data ["PageIsComparePull" ] == nil {
526- ctx .Data ["PageIsComparePull" ] = headIsBranch && baseIsBranch
526+ ctx .Data ["PageIsComparePull" ] = headIsBranch && baseIsBranch && permBase . CanReadIssuesOrPulls ( true )
527527 }
528528
529529 if ctx .Data ["PageIsComparePull" ] == true && ! permBase .CanReadIssuesOrPulls (true ) {
@@ -735,6 +735,7 @@ func CompareDiff(ctx *context.Context) {
735735 return
736736 }
737737
738+ ctx .Data ["PageIsViewCode" ] = true
738739 ctx .Data ["PullRequestWorkInProgressPrefixes" ] = setting .Repository .PullRequest .WorkInProgressPrefixes
739740 ctx .Data ["DirectComparison" ] = ci .DirectComparison
740741 ctx .Data ["OtherCompareSeparator" ] = ".."
You can’t perform that action at this time.
0 commit comments