summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/helpers/tree_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index a77db475234..73d36d0801c 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -57,6 +57,8 @@ module TreeHelper
end
def allowed_tree_edit?
+ return false unless @repository.branch_names.include?(@ref)
+
if @project.protected_branch? @ref
can?(current_user, :push_code_to_protected_branches, @project)
else