Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-10 20:27:43 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-03-06 18:47:44 +0300
commit336b818bcbcb070968f825f6a426e046a457d556 (patch)
tree5c4b2c2c4b1d0655dd14acb373d8a3dde153880e /app/controllers/projects/protected_branches_controller.rb
parentc4f09f23c7228341d97c45e44612a513c70c5ed9 (diff)
Added access spec tests
Also created changelog and removed redundant code
Diffstat (limited to 'app/controllers/projects/protected_branches_controller.rb')
-rw-r--r--app/controllers/projects/protected_branches_controller.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb
index ac886f0739a..1c22b9c2ca8 100644
--- a/app/controllers/projects/protected_branches_controller.rb
+++ b/app/controllers/projects/protected_branches_controller.rb
@@ -1,5 +1,4 @@
class Projects::ProtectedBranchesController < Projects::ApplicationController
- include RepositoryHelper
# Authorize
before_action :require_non_empty_project
before_action :authorize_admin_project!
@@ -61,20 +60,4 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
def load_protected_branches
@protected_branches = @project.protected_branches.order(:name).page(params[:page])
end
-
- def access_levels_options
- {
- push_access_levels: {
- "Roles" => ProtectedBranch::PushAccessLevel.human_access_levels.map { |id, text| { id: id, text: text, before_divider: true } },
- },
- merge_access_levels: {
- "Roles" => ProtectedBranch::MergeAccessLevel.human_access_levels.map { |id, text| { id: id, text: text, before_divider: true } }
- }
- }
- end
-
- def load_gon_index
- params = { open_branches: @project.open_branches.map { |br| { text: br.name, id: br.name, title: br.name } } }
- gon.push(params.merge(access_levels_options))
- end
end