Commit b99f357e96f683643b1e739b12a1ba972303d0aa
1 parent
65197b8a
Exists in
master
and in
4 other branches
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,6 +57,8 @@ module TreeHelper | ||
57 | end | 57 | end |
58 | 58 | ||
59 | def allowed_tree_edit? | 59 | def allowed_tree_edit? |
60 | + return false unless @repository.branch_names.include?(@ref) | ||
61 | + | ||
60 | if @project.protected_branch? @ref | 62 | if @project.protected_branch? @ref |
61 | can?(current_user, :push_code_to_protected_branches, @project) | 63 | can?(current_user, :push_code_to_protected_branches, @project) |
62 | else | 64 | else |