diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-04 17:18:49 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-04 17:18:49 +0300 |
| commit | b99f357e96f683643b1e739b12a1ba972303d0aa (patch) | |
| tree | 107180cf5bc10399b04dda277e926a3a47d32f6a | |
| parent | 65197b8a8a74f662313ac0885aced49b9d243e9d (diff) | |
| download | gitlab-ce-b99f357e96f683643b1e739b12a1ba972303d0aa.tar.gz | |
Dont allow file edit for non-branches ref
| -rw-r--r-- | app/helpers/tree_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index a77db475234..73d36d0801c 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 |
