diff options
author | Alexandru Croitor <acroitor@gitlab.com> | 2019-05-09 16:09:04 +0300 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-05-16 20:17:23 +0300 |
commit | 1be66c4a098290d72cb19b4c844a9bee4eff630b (patch) | |
tree | bdfbfd3edd601df14ef9f1eaade2d1215ef09a28 /app/helpers/notifications_helper.rb | |
parent | 74511b049743cf543694bb92a8acd7e7586e533d (diff) | |
download | gitlab-ce-1be66c4a098290d72cb19b4c844a9bee4eff630b.tar.gz |
Hide issue title on unsubscribe for anonymous users
Diffstat (limited to 'app/helpers/notifications_helper.rb')
-rw-r--r-- | app/helpers/notifications_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index a7ce7667916..11b9cf22142 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -100,4 +100,8 @@ module NotificationsHelper css_class: "icon notifications-icon js-notifications-icon" ) end + + def show_unsubscribe_title?(noteable) + can?(current_user, "read_#{noteable.to_ability_name}".to_sym, noteable) + end end |