Commit b99f357e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont allow file edit for non-branches ref

parent 65197b8a
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment