Commit 8fe28cae authored by http://jneen.net/'s avatar http://jneen.net/ Committed by Felipe Artur

allow the support bot to be considered "subscribed"

unless explicitly unsubscribed
parent 239d57fc
......@@ -6,5 +6,30 @@ module EE
super
end
# override
def subscribed_without_subscriptions?(user, *)
# TODO: this really shouldn't be necessary, because
# the support bot should be a participant (which is
# what the superclass method checks for). However,
# the support bot is not permitted to :read_project
# the project, so it gets filtered out at the end of
# Participable#raw_participants. Overriding *that*
# behavior is problematic because it doesn't use the
# Policy framework, and instead uses a custom-coded
# Ability.users_that_can_read_project, which is...
# a pain to override in EE. So... here we say, the
# support bot is subscribed by default, until an
# unsubscribed record appears, even though it's not
# *technically* a participant in this issue.
#
# Making the support bot subscribed to every issue
# is not as bad as it seems, though, since it isn't
# permitted to :receive_notifications, and doesn't
# actually show up in the participants list.
return true if user == ::User.support_bot
super
end
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