<% end %>
<tr>
<td><%= t'trace.view.owner' %></td>
- <td><%= link_to h(@trace.user.display_name), {:controller => 'user', :action => 'view', :display_name => @trace.user.display_name} %></td>
+ <td><%= link_to h(@trace.user.display_name), user_path(@trace.user) %></td>
</tr>
<tr>
<td><%= t'trace.view.description' %></td>
<br /><br />
-<%= if_user(@trace.user) do %>
+<% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?)%>
<div class="buttons">
- <%= button_to t('trace.view.edit_track'), :controller => 'trace', :action => 'edit', :id => @trace.id %>
+ <%= if_user(@trace.user) do %>
+ <%= button_to t('trace.view.edit_track'), :controller => 'trace', :action => 'edit', :id => @trace.id %>
+ <% end %>
<%= button_to t('trace.view.delete_track'), :controller => 'trace', :action => 'delete', :id => @trace.id %>
</div>
<% end %>