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/serializers/issuable_sidebar_extras_entity.rb')
-rw-r--r--app/serializers/issuable_sidebar_extras_entity.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/serializers/issuable_sidebar_extras_entity.rb b/app/serializers/issuable_sidebar_extras_entity.rb
index fb35b7522c5..0e1fcc58d7a 100644
--- a/app/serializers/issuable_sidebar_extras_entity.rb
+++ b/app/serializers/issuable_sidebar_extras_entity.rb
@@ -3,11 +3,20 @@
class IssuableSidebarExtrasEntity < Grape::Entity
include RequestAwareEntity
include TimeTrackableEntity
+ include NotificationsHelper
expose :participants, using: ::API::Entities::UserBasic do |issuable|
issuable.participants(request.current_user)
end
+ expose :project_emails_disabled do |issuable|
+ issuable.project.emails_disabled?
+ end
+
+ expose :subscribe_disabled_description do |issuable|
+ notification_description(:owner_disabled)
+ end
+
expose :subscribed do |issuable|
issuable.subscribed?(request.current_user, issuable.project)
end