summaryrefslogtreecommitdiff
path: root/app/helpers/notifications_helper.rb
diff options
context:
space:
mode:
authorAlexandru Croitor <acroitor@gitlab.com>2019-05-09 16:09:04 +0300
committerAlexandru Croitor <acroitor@gitlab.com>2019-05-16 20:17:23 +0300
commit1be66c4a098290d72cb19b4c844a9bee4eff630b (patch)
treebdfbfd3edd601df14ef9f1eaade2d1215ef09a28 /app/helpers/notifications_helper.rb
parent74511b049743cf543694bb92a8acd7e7586e533d (diff)
downloadgitlab-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.rb4
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