]> source.dussan.org Git - redmine.git/commitdiff
Display watch link only when inside project with logged-in user (#2549).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Feb 2014 12:01:22 +0000 (12:01 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Feb 2014 12:01:22 +0000 (12:01 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12868 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/news/index.html.erb

index 7fa75dc51596d00427b25230650e4220b43b2df0..614a7b1f7316417e433b7f255037f1e41199d6f9 100644 (file)
@@ -3,7 +3,7 @@
             new_project_news_path(@project),
             :class => 'icon icon-add',
             :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
-<%= watcher_link(@project.enabled_module('news'), User.current) %>
+<%= watcher_link(@project.enabled_module('news'), User.current) if @project && User.current.logged? %>
 </div>
 
 <div id="add-news" style="display:none;">