Skip to content

Commit 6dff436

Browse files
authored
Merge pull request #669 from code0-tech/644-expose-active-license
Expose current license on namespace
2 parents e68bd82 + b8eb59b commit 6dff436

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docs/graphql/object/namespace.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Represents a Namespace
99
| Name | Type | Description |
1010
|------|------|-------------|
1111
| `createdAt` | [`Time!`](../scalar/time.md) | Time when this Namespace was created |
12+
| `currentNamespaceLicense` | [`NamespaceLicense`](../object/namespacelicense.md) | (EE only) Currently active license of the namespace |
1213
| `id` | [`NamespaceID!`](../scalar/namespaceid.md) | Global ID of this Namespace |
1314
| `members` | [`NamespaceMemberConnection!`](../object/namespacememberconnection.md) | Members of the namespace |
1415
| `namespaceLicenses` | [`NamespaceLicenseConnection!`](../object/namespacelicenseconnection.md) | (EE only) Licenses of the namespace |

extensions/ee/app/graphql/ee/types/namespace_type.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ module NamespaceType
1010
null: false,
1111
description: '(EE only) Licenses of the namespace'
1212

13+
field :current_namespace_license, ::Types::NamespaceLicenseType,
14+
null: true,
15+
description: '(EE only) Currently active license of the namespace',
16+
method: :current_license
17+
1318
expose_abilities %i[
1419
create_namespace_license
1520
]

extensions/ee/spec/graphql/types/ee/types/namespace_type_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
createdAt
1515
updatedAt
1616
namespaceLicenses
17+
currentNamespaceLicense
1718
userAbilities
1819
]
1920
end

0 commit comments

Comments
 (0)