protected_tags_controller.rb 521 Bytes
Newer Older
1 2
class Projects::ProtectedTagsController < Projects::ProtectedRefsController
  protected
3

4 5
  def project_refs
    @project.repository.tags
6 7
  end

8
  def create_service_class
9
    ::ProtectedTags::CreateService
10 11
  end

12
  def update_service_class
13 14
    ::ProtectedTags::UpdateService
  end
15

16
  def load_protected_ref
17
    @protected_ref = @project.protected_tags.find(params[:id])
18 19
  end

20
  def protected_ref_params
21
    params.require(:protected_tag).permit(:name, create_access_levels_attributes: access_level_attributes)
22 23
  end
end