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