diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 25903f588..9a3b79051 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -45,7 +45,7 @@ <%= link_to @topic_count,:controller => 'boards',:action => 'index' %> 个贴子 - <% if @project.enabled_modules.where("name = 'boards'").count > 0 %> + <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> <%= link_to l(:label_message_new), new_board_message_path(@board), diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index b18c2abd8..4d20c62f7 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -70,11 +70,11 @@ <%= label_tips %> -<% if @project.enabled_modules.where("name = 'news'").count > 0 %> -<%= link_to(btn_tips, - new_project_news_path(@project), - :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %> +<% if @project.enabled_modules.where("name = 'news'").count > 0 && User.current.member_of?(@project) %> + <%= link_to(btn_tips, + new_project_news_path(@project), + :class => 'icon icon-add', + :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %> <% end %> <% if @project && User.current.allowed_to?(:manage_news, @project) %>