diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/graphql/types/issue_type.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/graphql/types/issue_type.rb')
-rw-r--r-- | app/graphql/types/issue_type.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/graphql/types/issue_type.rb b/app/graphql/types/issue_type.rb index 42feb8a8076..c8db2b84ff2 100644 --- a/app/graphql/types/issue_type.rb +++ b/app/graphql/types/issue_type.rb @@ -53,6 +53,9 @@ module Types description: 'Due date of the issue.' field :confidential, GraphQL::Types::Boolean, null: false, description: 'Indicates the issue is confidential.' + field :hidden, GraphQL::Types::Boolean, null: true, resolver_method: :hidden?, + description: 'Indicates the issue is hidden because the author has been banned. ' \ + 'Will always return `null` if `ban_user_feature_flag` feature flag is disabled.' field :discussion_locked, GraphQL::Types::Boolean, null: false, description: 'Indicates discussion is locked on the issue.' @@ -156,6 +159,10 @@ module Types def create_note_email object.creatable_note_email_address(context[:current_user]) end + + def hidden? + object.hidden? if Feature.enabled?(:ban_user_feature_flag) + end end end |