Class: Types::ContainerRepositoryDetailsType
Instance Method Summary
collapse
#project, #tags_count
Methods inherited from BaseObject
accepts, assignable?, authorization, authorize, authorized?, #current_user, #id
#present, #unpresented
Instance Method Details
#can_delete ⇒ Object
23
24
25
|
# File 'app/graphql/types/container_repository_details_type.rb', line 23
def can_delete
Ability.allowed?(current_user, :destroy_container_image, object)
end
|
#size ⇒ Object
27
28
29
30
31
|
# File 'app/graphql/types/container_repository_details_type.rb', line 27
def size
object.size
rescue Faraday::Error
raise ::Gitlab::Graphql::Errors::ResourceNotAvailable, "Can't connect to the Container Registry. If this error persists, please review the troubleshooting documentation."
end
|