diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index a77db47..73d36d0 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 -- libgit2 0.21.2