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 {
524524
525525	// Treat as pull request if both references are branches 
526526	if  ctx .Data ["PageIsComparePull" ] ==  nil  {
527- 		ctx .Data ["PageIsComparePull" ] =  headIsBranch  &&  baseIsBranch 
527+ 		ctx .Data ["PageIsComparePull" ] =  headIsBranch  &&  baseIsBranch   &&   permBase . CanReadIssuesOrPulls ( true ) 
528528	}
529529
530530	if  ctx .Data ["PageIsComparePull" ] ==  true  &&  ! permBase .CanReadIssuesOrPulls (true ) {
@@ -730,6 +730,7 @@ func CompareDiff(ctx *context.Context) {
730730		return 
731731	}
732732
733+ 	ctx .Data ["PageIsViewCode" ] =  true 
733734	ctx .Data ["PullRequestWorkInProgressPrefixes" ] =  setting .Repository .PullRequest .WorkInProgressPrefixes 
734735	ctx .Data ["DirectComparison" ] =  ci .DirectComparison 
735736	ctx .Data ["OtherCompareSeparator" ] =  ".." 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments