summaryrefslogtreecommitdiff
path: root/app/helpers/notifications_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 21:07:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 21:07:38 +0000
commit9d54184f308893338967b18874dedebf38acf89e (patch)
tree100e32c6d4b34deac52d9e98a083361d89804b50 /app/helpers/notifications_helper.rb
parentd5b5f5e6e1474d5526add9033c9754b8e395841f (diff)
downloadgitlab-ce-9d54184f308893338967b18874dedebf38acf89e.tar.gz
Add latest changes from gitlab-org/gitlab@master
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 8855e0cdd70..9a64fe98f86 100644
--- a/app/helpers/notifications_helper.rb
+++ b/app/helpers/notifications_helper.rb
@@ -116,4 +116,8 @@ module NotificationsHelper
def show_unsubscribe_title?(noteable)
can?(current_user, "read_#{noteable.to_ability_name}".to_sym, noteable)
end
+
+ def can_read_project?(project)
+ can?(current_user, :read_project, project)
+ end
end