Show new issue link only if authorized. This relates to [#783] on cp.o

pull/41/head
Gregor Schmidt 13 years ago
parent 7a80a31a3d
commit 3698403e69
  1. 2
      app/views/issues/index.rhtml

@ -9,7 +9,7 @@
<%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
<%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
<% end %>
<%= link_to(l(:label_issue_new), {:controller => 'issues', :action => 'new', :project_id => @project}, :class => 'icon icon-add') if @project %>
<%= link_to_if_authorized(l(:label_issue_new), {:controller => 'issues', :action => 'new', :project_id => @project}, :class => 'icon icon-add') if @project %>
</div>
<% html_title(@query.new_record? ? l(:label_issue_plural) : h(@query.name)) %>

Loading…
Cancel
Save