Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/issue_type.rb')
-rw-r--r--app/graphql/types/issue_type.rb7
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