Commit 50096526 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Removed ProjectsController#feeds. This view was incomplete and inconsistent with permissions.

Feeds can still be accessed from the corresponding screens (eg. news feed is accessible from the news view).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@787 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent c6e8cf5c
......@@ -580,11 +580,6 @@ class ProjectsController < ApplicationController
render :template => "projects/gantt.rhtml"
end
end
def feeds
@queries = @project.queries.find :all, :conditions => ["is_public=? or user_id=?", true, (logged_in_user ? logged_in_user.id : 0)]
@key = User.current.rss_key
end
private
# Find project of id params[:id]
......
<h2><%= l(:label_feed_plural) %> (<%=h @project.name %>)</h2>
<table>
<tr><td colspan="3"><h3><%= l(:label_issue_plural) %></h3></td></tr>
<tr><td><%= l(:label_reported_issues) %></td>
<td><%= link_to 'RSS', {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, :class => 'icon icon-feed' %></td>
<td><%= link_to 'Atom', {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, :class => 'icon icon-feed' %></td>
</tr>
<tr><td><%= l(:label_changes_details) %></td>
<td><%= link_to 'RSS', {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key}, :class => 'icon icon-feed' %></td>
<td><%= link_to 'Atom', {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key, :format => 'atom'}, :class => 'icon icon-feed' %></td>
</tr>
<% @queries.each do |query| %>
<tr><td colspan="3"><h4><%=h query.name %></h4></td></tr>
<tr><td><%= l(:label_reported_issues) %></td>
<td><%= link_to 'RSS', {:controller => 'feeds', :action => 'issues', :project_id => @project, :query_id => query, :key => @key}, :class => 'icon icon-feed' %></td>
<td><%= link_to 'Atom', {:controller => 'feeds', :action => 'issues', :project_id => @project, :query_id => query, :key => @key, :format => 'atom'}, :class => 'icon icon-feed' %></td>
</tr>
<tr><td><%= l(:label_changes_details) %></td>
<td><%= link_to 'RSS', {:controller => 'feeds', :action => 'history', :project_id => @project, :query_id => query, :key => @key}, :class => 'icon icon-feed' %></td>
<td><%= link_to 'Atom', {:controller => 'feeds', :action => 'history', :project_id => @project, :query_id => query, :key => @key, :format => 'atom'}, :class => 'icon icon-feed' %></td>
</tr>
<% end %>
<tr><td colspan="3">&nbsp;<h3><%= l(:label_news_plural) %></h3></td></tr>
<tr><td><%= l(:label_news_latest) %></td>
<td><%= link_to 'RSS', {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key}, :class => 'icon icon-feed' %></td>
<td><%= link_to 'Atom', {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key, :format => 'atom'}, :class => 'icon icon-feed' %></td>
</tr>
</table>
\ No newline at end of file
......@@ -76,18 +76,8 @@
<p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> |
<%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p>
<% end %>
<hr />
<p><%= link_to l(:label_feed_plural), {:action => 'feeds', :id => @project}, :class => 'icon icon-feed' %></p>
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, {:title => l(:label_reported_issues)}) %>
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_reported_issues)}) %>
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key }, {:title => l(:label_changes_details)}) %>
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_changes_details)}) %>
<%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key}, {:title => l(:label_news_latest)}) %>
<%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %>
<%= auto_discovery_link_tag(:atom, {:action => 'activity', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
<% end %>
......@@ -13,7 +13,7 @@ REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs )
# Permissions
Redmine::AccessControl.map do |map|
map.permission :view_project, {:projects => [:show, :activity, :feeds]}, :public => true
map.permission :view_project, {:projects => [:show, :activity]}, :public => true
map.permission :search_project, {:search => :index}, :public => true
map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member
map.permission :select_project_modules, {:projects => :modules}, :require => :member
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment