aboutsummaryrefslogtreecommitdiff
path: root/modules/context/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r--modules/context/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 924898aa..97fd3e36 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -73,7 +73,7 @@ func (r *Repository) HasAccess() bool {
// CanEnableEditor returns true if repository is editable and user has proper access level.
func (r *Repository) CanEnableEditor() bool {
- return r.Repository.CanEnableEditor() && r.IsViewBranch && r.IsWriter()
+ return r.Repository.CanEnableEditor() && r.IsViewBranch && r.IsWriter() && !r.Repository.IsBranchRequirePullRequest(r.BranchName)
}
// GetEditorconfig returns the .editorconfig definition if found in the