2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
class IssuableSidebarExtrasEntity < Grape::Entity
|
2018-03-17 18:26:18 +05:30
|
|
|
include RequestAwareEntity
|
2019-02-15 15:39:39 +05:30
|
|
|
include TimeTrackableEntity
|
2019-12-26 22:10:19 +05:30
|
|
|
include NotificationsHelper
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
expose :participants, using: ::API::Entities::UserBasic do |issuable|
|
|
|
|
issuable.participants(request.current_user)
|
|
|
|
end
|
|
|
|
|
2019-12-26 22:10:19 +05:30
|
|
|
expose :project_emails_disabled do |issuable|
|
|
|
|
issuable.project.emails_disabled?
|
|
|
|
end
|
|
|
|
|
|
|
|
expose :subscribe_disabled_description do |issuable|
|
|
|
|
notification_description(:owner_disabled)
|
|
|
|
end
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
expose :subscribed do |issuable|
|
|
|
|
issuable.subscribed?(request.current_user, issuable.project)
|
|
|
|
end
|
2019-07-31 22:56:46 +05:30
|
|
|
|
|
|
|
expose :assignees, using: API::Entities::UserBasic
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|