Class: Projects::ContainerRepository::DeleteTagsService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/projects/container_repository/delete_tags_service.rb

Constant Summary collapse

LOG_DATA_BASE =
{ service_class: self.to_s }.freeze

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#execute(container_repository) ⇒ Object


8
9
10
11
12
13
14
15
16
# File 'app/services/projects/container_repository/delete_tags_service.rb', line 8

def execute(container_repository)
  @container_repository = container_repository
  return error('access denied') unless can?(current_user, :destroy_container_image, project)

  @tag_names = params[:tags]
  return error('not tags specified') if @tag_names.blank?

  delete_tags
end