Commit 4c464c81 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'nicolasdular/expose-storage-limit-in-api' into 'master'

Expose storage size limit for namespaces in GraphQL

See merge request gitlab-org/gitlab!34882
parents 5f304f1f 239f58c1
......@@ -27,6 +27,9 @@ module Types
description: 'Indicates if Large File Storage (LFS) is enabled for namespace'
field :request_access_enabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if users can request access to namespace'
field :storage_size_limit, GraphQL::INT_TYPE, null: true,
description: 'Total storage limit of the root namespace in bytes',
resolve: -> (obj, _args, _ctx) { Namespace::RootStorageSize.new(obj).limit }
field :root_storage_statistics, Types::RootStorageStatisticsType,
null: true,
......
---
title: Expose storage size limit for namespaces in GraphQL
merge_request: 34882
author:
type: changed
......@@ -5023,6 +5023,11 @@ type Group {
"""
shareWithGroupLock: Boolean
"""
Total storage limit of the root namespace in bytes
"""
storageSizeLimit: Int
"""
The permission level required to create subgroups within the group
"""
......@@ -7802,6 +7807,11 @@ type Namespace {
"""
rootStorageStatistics: RootStorageStatistics
"""
Total storage limit of the root namespace in bytes
"""
storageSizeLimit: Int
"""
Visibility of the namespace
"""
......
......@@ -13756,6 +13756,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "storageSizeLimit",
"description": "Total storage limit of the root namespace in bytes",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "subgroupCreationLevel",
"description": "The permission level required to create subgroups within the group",
......@@ -23150,6 +23164,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "storageSizeLimit",
"description": "Total storage limit of the root namespace in bytes",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "visibility",
"description": "Visibility of the namespace",
......@@ -745,6 +745,7 @@ Autogenerated return type of EpicTreeReorder
| `requireTwoFactorAuthentication` | Boolean | Indicates if all users in this group are required to set up two-factor authentication |
| `rootStorageStatistics` | RootStorageStatistics | Aggregated storage statistics of the namespace. Only available for root namespaces |
| `shareWithGroupLock` | Boolean | Indicates if sharing a project with another group within this group is prevented |
| `storageSizeLimit` | Int | Total storage limit of the root namespace in bytes |
| `subgroupCreationLevel` | String | The permission level required to create subgroups within the group |
| `twoFactorGracePeriod` | Int | Time before two-factor authentication is enforced |
| `userPermissions` | GroupPermissions! | Permissions for the current user on the resource |
......@@ -1167,6 +1168,7 @@ Represents a milestone.
| `path` | String! | Path of the namespace |
| `requestAccessEnabled` | Boolean | Indicates if users can request access to namespace |
| `rootStorageStatistics` | RootStorageStatistics | Aggregated storage statistics of the namespace. Only available for root namespaces |
| `storageSizeLimit` | Int | Total storage limit of the root namespace in bytes |
| `visibility` | String | Visibility of the namespace |
## Note
......
......@@ -8,7 +8,7 @@ describe GitlabSchema.types['Namespace'] do
it 'has the expected fields' do
expected_fields = %w[
id name path full_name full_path description description_html visibility
lfs_enabled request_access_enabled projects root_storage_statistics
lfs_enabled request_access_enabled storage_size_limit projects root_storage_statistics
]
expect(described_class).to have_graphql_fields(*expected_fields)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment