diff options
Diffstat (limited to 'app/controllers/projects/protected_branches_controller.rb')
-rw-r--r-- | app/controllers/projects/protected_branches_controller.rb | 17 |
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 |