Project

General

Profile

Actions

Defect #2

closed

Listing 5 projects on Welcome page

Added by Todd McGrath almost 18 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Jean-Philippe,

I think there is an issue on the welcome.rhtml page when the code lists all the projects:

<div class="splitcontentright">
<div class="box">
<h3><%=l(:label_project_latest)%></h3>
<ul>
<% for project in Projects Projects >
<li>
<
= link_to project.name, :controller => 'projects', :action => 'show', :id => project > (<=
format_time(project.created_on) >)<br />
<
=h project.description >
</li>
<
end %>
</ul>
</div>
</div>

Or, perhaps more importantly in the welcome_controller.rb:

def index
@news = News.latest
@projects = Project.latest
end

Reason: If a user clicks on a non-public project where he is not a member, they will receive a blank page (error).

Perhaps it will be better not to see private projects where the user is not a member?

As a potential solution, let's update the Project.latest method to return 5 projects where logged_in_user is a member
or the project is public?

What do you think?

Todd


Files

welcome_controller.rb-PATCH.txt (480 Bytes) welcome_controller.rb-PATCH.txt Todd McGrath, 2008-02-03 10:48
project.rb-PATCH.txt (735 Bytes) project.rb-PATCH.txt Todd McGrath, 2008-02-03 10:48
Actions

Also available in: Atom PDF