gitlab-org--gitlab-foss/app/policies/namespace/root_storage_statistics_policy.rb
Alessio Caiazza 606a1d2d31 Expose namespace storage statistics with GraphQL
Root namespaces have storage statistics.
This commit allows namespace owners to get those stats via GraphQL
queries like the following one

{
  namespace(fullPath: "a_namespace_path") {
    rootStorageStatistics {
      storageSize
      repositorySize
      lfsObjectsSize
      buildArtifactsSize
      packagesSize
      wikiSize
    }
  }
}
2019-08-22 22:08:28 +00:00

5 lines
127 B
Ruby

# frozen_string_literal: true
class Namespace::RootStorageStatisticsPolicy < BasePolicy
delegate { @subject.namespace }
end