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 @@ -524,7 +524,7 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
524
524
525
525
// Treat as pull request if both references are branches
526
526
if ctx .Data ["PageIsComparePull" ] == nil {
527
- ctx .Data ["PageIsComparePull" ] = headIsBranch && baseIsBranch
527
+ ctx .Data ["PageIsComparePull" ] = headIsBranch && baseIsBranch && permBase . CanReadIssuesOrPulls ( true )
528
528
}
529
529
530
530
if ctx .Data ["PageIsComparePull" ] == true && ! permBase .CanReadIssuesOrPulls (true ) {
@@ -730,6 +730,7 @@ func CompareDiff(ctx *context.Context) {
730
730
return
731
731
}
732
732
733
+ ctx .Data ["PageIsViewCode" ] = true
733
734
ctx .Data ["PullRequestWorkInProgressPrefixes" ] = setting .Repository .PullRequest .WorkInProgressPrefixes
734
735
ctx .Data ["DirectComparison" ] = ci .DirectComparison
735
736
ctx .Data ["OtherCompareSeparator" ] = ".."
You can’t perform that action at this time.
0 commit comments