gitlab-org--gitlab-foss/app/controllers/projects/protected_branches_controller.rb
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00

23 lines
629 B
Ruby

# frozen_string_literal: true
class Projects::ProtectedBranchesController < Projects::ProtectedRefsController
protected
def project_refs
@project.repository.branches
end
def service_namespace
::ProtectedBranches
end
def load_protected_ref
@protected_ref = @project.protected_branches.find(params[:id])
end
def protected_ref_params
params.require(:protected_branch).permit(:name,
merge_access_levels_attributes: access_level_attributes,
push_access_levels_attributes: access_level_attributes)
end
end