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:
authorhttp://jneen.net/ <jneen@jneen.net>2017-08-01 20:42:54 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2017-08-03 19:07:18 +0300
commitc2dd4239c939e003dfe569196ec2d39e2478606e (patch)
tree05fa09b5d0f6324add395e5c5bf768c619d308a8 /app/services
parent488e8e79dd85e973e1b562fe0320f69b2bedec06 (diff)
short-circuit if there is no policy, and add :read_project check
Diffstat (limited to 'app/services')
-rw-r--r--app/services/notification_recipient_service.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb
index 1ce92c8cbdc..540e568fed2 100644
--- a/app/services/notification_recipient_service.rb
+++ b/app/services/notification_recipient_service.rb
@@ -308,11 +308,7 @@ module NotificationRecipientService
end
def read_ability
- @read_ability ||=
- case target
- when Commit then nil
- else :"read_#{target.class.model_name.name.underscore}"
- end
+ @read_ability ||= :"read_#{target.class.model_name.name.underscore}"
end
def subject