Skip to content
Snippets Groups Projects
Commit b99f357e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Dont allow file edit for non-branches ref

parent 65197b8a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment