summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-01-24 05:38:22 +0000
committerGo MAEDA <maeda@farend.jp>2021-01-24 05:38:22 +0000
commit091dd36accf8cb26b66a1307bd0899b3ca1e3c33 (patch)
treed8b4c2f350709264b0076769aaea6a11ca7e0252 /app/helpers
parent0f4228d4e6dca2b23409b8a67632c473e0426555 (diff)
downloadredmine-091dd36accf8cb26b66a1307bd0899b3ca1e3c33.tar.gz
redmine-091dd36accf8cb26b66a1307bd0899b3ca1e3c33.zip
Show a warning message for watchers who cannot view the object (#33329).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20725 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/watchers_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb
index ce39d7fb3..b3b9dc772 100644
--- a/app/helpers/watchers_helper.rb
+++ b/app/helpers/watchers_helper.rb
@@ -52,6 +52,9 @@ module WatchersHelper
s = ''.html_safe
s << avatar(user, :size => "16").to_s
s << link_to_user(user, :class => 'user')
+ if object.respond_to?(:visible?) && user.is_a?(User) && !object.visible?(user)
+ s << content_tag('span', l(:notice_invalid_watcher), class: 'icon-only icon-warning', title: l(:notice_invalid_watcher))
+ end
if remove_allowed
url = {:controller => 'watchers',
:action => 'destroy',