diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-08-01 20:42:54 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-08-03 19:07:18 +0300 |
commit | c2dd4239c939e003dfe569196ec2d39e2478606e (patch) | |
tree | 05fa09b5d0f6324add395e5c5bf768c619d308a8 /app/services | |
parent | 488e8e79dd85e973e1b562fe0320f69b2bedec06 (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.rb | 6 |
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 |