Commit b99f357e96f683643b1e739b12a1ba972303d0aa

Authored by Dmitriy Zaporozhets
1 parent 65197b8a

Dont allow file edit for non-branches ref

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
app/helpers/tree_helper.rb
... ... @@ -57,6 +57,8 @@ module TreeHelper
57 57 end
58 58  
59 59 def allowed_tree_edit?
  60 + return false unless @repository.branch_names.include?(@ref)
  61 +
60 62 if @project.protected_branch? @ref
61 63 can?(current_user, :push_code_to_protected_branches, @project)
62 64 else
... ...