2017-04-03 20:00:51 +00:00
|
|
|
class Projects::ProtectedTagsController < Projects::ProtectedRefsController
|
|
|
|
protected
|
2017-03-15 22:29:07 +00:00
|
|
|
|
2017-04-03 20:00:51 +00:00
|
|
|
def project_refs
|
|
|
|
@project.repository.tags
|
2017-03-15 22:29:07 +00:00
|
|
|
end
|
|
|
|
|
2017-04-05 17:59:46 +00:00
|
|
|
def create_service_class
|
2017-04-03 20:00:51 +00:00
|
|
|
::ProtectedTags::CreateService
|
2017-03-15 22:29:07 +00:00
|
|
|
end
|
|
|
|
|
2017-04-05 17:59:46 +00:00
|
|
|
def update_service_class
|
2017-04-03 20:00:51 +00:00
|
|
|
::ProtectedTags::UpdateService
|
|
|
|
end
|
2017-03-15 22:29:07 +00:00
|
|
|
|
2017-04-03 20:00:51 +00:00
|
|
|
def load_protected_ref
|
2017-04-05 17:59:46 +00:00
|
|
|
@protected_ref = @project.protected_tags.find(params[:id])
|
2017-03-15 22:29:07 +00:00
|
|
|
end
|
|
|
|
|
2017-04-03 20:00:51 +00:00
|
|
|
def protected_ref_params
|
2017-05-05 15:59:31 +00:00
|
|
|
params.require(:protected_tag).permit(:name, create_access_levels_attributes: access_level_attributes)
|
2017-03-15 22:29:07 +00:00
|
|
|
end
|
|
|
|
end
|