diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 65debd9..541f27d 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -15,7 +15,9 @@
<%= project.name %> |
<%= project.description %> |
<%= link_to 'Show', project_path(project.id) %> |
- <%= link_to 'Edit', edit_project_path(project.id) %> |
+ <% if project_owner? project.id %>
+ <%= link_to 'Edit', edit_project_path(project.id) %> |
+ <% end %>
<% end %>
diff --git a/features/project/edition.feature b/features/project/edition.feature
index ace2a3a..6f6c796 100644
--- a/features/project/edition.feature
+++ b/features/project/edition.feature
@@ -4,13 +4,21 @@ Feature: Project
I should be able to edit my projects
@kalibro_restart
- Scenario: Going to the edit page
+ Scenario: Should go to the edit page from a project that I own
Given I am a regular user
And I am signed in
- And I have a sample project
+ And I own a sample project
And I am at the All Projects page
When I click the Edit link
Then I should be in the Edit Project page
+
+ @kalibro_restart
+ Scenario: Should not show edit links from projects that doesn't belongs to me
+ Given I am a regular user
+ And I am signed in
+ And I have a sample project
+ And I am at the All Projects page
+ Then I should not see Edit
@kalibro_restart
Scenario: Filling up the form
--
libgit2 0.21.2