2018-09-26 03:45:43 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
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
|
|
|
|
|
2018-03-24 11:05:04 +00:00
|
|
|
def service_namespace
|
|
|
|
::ProtectedTags
|
2017-04-03 20:00:51 +00:00
|
|
|
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
|
|
|
|
|
2018-12-17 18:05:08 +00:00
|
|
|
def access_levels
|
|
|
|
[:create_access_levels]
|
|
|
|
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
|