Commit f1ec5c67 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'feat/backfill-group-graphql-api' into 'master'

Backfill group type in GraphQL API

See merge request gitlab-org/gitlab!23389
parents 49d44e93 6dd5eaad
...@@ -17,6 +17,25 @@ module Types ...@@ -17,6 +17,25 @@ module Types
group.avatar_url(only_path: false) group.avatar_url(only_path: false)
end end
field :share_with_group_lock, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if sharing a project with another group within this group is prevented'
field :project_creation_level, GraphQL::STRING_TYPE, null: true, method: :project_creation_level_str,
description: 'The permission level required to create projects in the group'
field :subgroup_creation_level, GraphQL::STRING_TYPE, null: true, method: :subgroup_creation_level_str,
description: 'The permission level required to create subgroups within the group'
field :require_two_factor_authentication, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if all users in this group are required to set up two-factor authentication'
field :two_factor_grace_period, GraphQL::INT_TYPE, null: true,
description: 'Time before two-factor authentication is enforced'
field :auto_devops_enabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates whether Auto DevOps is enabled for all projects within this group'
field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if a group has email notifications disabled'
field :mentions_disabled, GraphQL::BOOLEAN_TYPE, null: true, field :mentions_disabled, GraphQL::BOOLEAN_TYPE, null: true,
description: 'Indicates if a group is disabled from getting mentioned' description: 'Indicates if a group is disabled from getting mentioned'
......
---
title: Backfill missing GraphQL API Group type properties
merge_request: 23389
author: Fabio Huser
type: added
...@@ -2434,6 +2434,11 @@ type GrafanaIntegration { ...@@ -2434,6 +2434,11 @@ type GrafanaIntegration {
} }
type Group { type Group {
"""
Indicates whether Auto DevOps is enabled for all projects within this group
"""
autoDevopsEnabled: Boolean
""" """
Avatar URL of the group Avatar URL of the group
""" """
...@@ -2449,6 +2454,11 @@ type Group { ...@@ -2449,6 +2454,11 @@ type Group {
""" """
descriptionHtml: String descriptionHtml: String
"""
Indicates if a group has email notifications disabled
"""
emailsDisabled: Boolean
""" """
Find a single epic Find a single epic
""" """
...@@ -2623,6 +2633,11 @@ type Group { ...@@ -2623,6 +2633,11 @@ type Group {
""" """
path: String! path: String!
"""
The permission level required to create projects in the group
"""
projectCreationLevel: String
""" """
Projects within this namespace Projects within this namespace
""" """
...@@ -2658,11 +2673,26 @@ type Group { ...@@ -2658,11 +2673,26 @@ type Group {
""" """
requestAccessEnabled: Boolean requestAccessEnabled: Boolean
"""
Indicates if all users in this group are required to set up two-factor authentication
"""
requireTwoFactorAuthentication: Boolean
""" """
Aggregated storage statistics of the namespace. Only available for root namespaces Aggregated storage statistics of the namespace. Only available for root namespaces
""" """
rootStorageStatistics: RootStorageStatistics rootStorageStatistics: RootStorageStatistics
"""
Indicates if sharing a project with another group within this group is prevented
"""
shareWithGroupLock: Boolean
"""
The permission level required to create subgroups within the group
"""
subgroupCreationLevel: String
""" """
Time logged in issues by group members Time logged in issues by group members
""" """
...@@ -2698,6 +2728,11 @@ type Group { ...@@ -2698,6 +2728,11 @@ type Group {
startDate: Time! startDate: Time!
): TimelogConnection! ): TimelogConnection!
"""
Time before two-factor authentication is enforced
"""
twoFactorGracePeriod: Int
""" """
Permissions for the current user on the resource Permissions for the current user on the resource
""" """
......
...@@ -3044,6 +3044,20 @@ ...@@ -3044,6 +3044,20 @@
"name": "Group", "name": "Group",
"description": null, "description": null,
"fields": [ "fields": [
{
"name": "autoDevopsEnabled",
"description": "Indicates whether Auto DevOps is enabled for all projects within this group",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "avatarUrl", "name": "avatarUrl",
"description": "Avatar URL of the group", "description": "Avatar URL of the group",
...@@ -3086,6 +3100,20 @@ ...@@ -3086,6 +3100,20 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "emailsDisabled",
"description": "Indicates if a group has email notifications disabled",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "epic", "name": "epic",
"description": "Find a single epic", "description": "Find a single epic",
...@@ -3524,6 +3552,20 @@ ...@@ -3524,6 +3552,20 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "projectCreationLevel",
"description": "The permission level required to create projects in the group",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "projects", "name": "projects",
"description": "Projects within this namespace", "description": "Projects within this namespace",
...@@ -3605,6 +3647,20 @@ ...@@ -3605,6 +3647,20 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "requireTwoFactorAuthentication",
"description": "Indicates if all users in this group are required to set up two-factor authentication",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "rootStorageStatistics", "name": "rootStorageStatistics",
"description": "Aggregated storage statistics of the namespace. Only available for root namespaces", "description": "Aggregated storage statistics of the namespace. Only available for root namespaces",
...@@ -3619,6 +3675,34 @@ ...@@ -3619,6 +3675,34 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "shareWithGroupLock",
"description": "Indicates if sharing a project with another group within this group is prevented",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "subgroupCreationLevel",
"description": "The permission level required to create subgroups within the group",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "timelogs", "name": "timelogs",
"description": "Time logged in issues by group members", "description": "Time logged in issues by group members",
...@@ -3704,6 +3788,20 @@ ...@@ -3704,6 +3788,20 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "twoFactorGracePeriod",
"description": "Time before two-factor authentication is enforced",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "userPermissions", "name": "userPermissions",
"description": "Permissions for the current user on the resource", "description": "Permissions for the current user on the resource",
......
...@@ -393,6 +393,13 @@ Autogenerated return type of EpicTreeReorder ...@@ -393,6 +393,13 @@ Autogenerated return type of EpicTreeReorder
| `userPermissions` | GroupPermissions! | Permissions for the current user on the resource | | `userPermissions` | GroupPermissions! | Permissions for the current user on the resource |
| `webUrl` | String! | Web URL of the group | | `webUrl` | String! | Web URL of the group |
| `avatarUrl` | String | Avatar URL of the group | | `avatarUrl` | String | Avatar URL of the group |
| `shareWithGroupLock` | Boolean | Indicates if sharing a project with another group within this group is prevented |
| `projectCreationLevel` | String | The permission level required to create projects in the group |
| `subgroupCreationLevel` | String | The permission level required to create subgroups within the group |
| `requireTwoFactorAuthentication` | Boolean | Indicates if all users in this group are required to set up two-factor authentication |
| `twoFactorGracePeriod` | Int | Time before two-factor authentication is enforced |
| `autoDevopsEnabled` | Boolean | Indicates whether Auto DevOps is enabled for all projects within this group |
| `emailsDisabled` | Boolean | Indicates if a group has email notifications disabled |
| `mentionsDisabled` | Boolean | Indicates if a group is disabled from getting mentioned | | `mentionsDisabled` | Boolean | Indicates if a group is disabled from getting mentioned |
| `parent` | Group | Parent group | | `parent` | Group | Parent group |
| `epicsEnabled` | Boolean | Indicates if Epics are enabled for namespace | | `epicsEnabled` | Boolean | Indicates if Epics are enabled for namespace |
......
...@@ -10,7 +10,14 @@ describe GitlabSchema.types['Group'] do ...@@ -10,7 +10,14 @@ describe GitlabSchema.types['Group'] do
it { expect(described_class).to require_graphql_authorizations(:read_group) } it { expect(described_class).to require_graphql_authorizations(:read_group) }
it 'has the expected fields' do it 'has the expected fields' do
expected_fields = %w[web_url avatar_url mentions_disabled parent] expected_fields = %w[
id name path full_name full_path description description_html visibility
lfs_enabled request_access_enabled projects root_storage_statistics
web_url avatar_url share_with_group_lock project_creation_level
subgroup_creation_level require_two_factor_authentication
two_factor_grace_period auto_devops_enabled emails_disabled
mentions_disabled parent
]
is_expected.to include_graphql_fields(*expected_fields) is_expected.to include_graphql_fields(*expected_fields)
end end
......
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