diff --git a/app/models/document.rb b/app/models/document.rb index 3fcdcee..0c2ce17 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -19,7 +19,7 @@ class Document < ActiveRecord::Base include Redmine::SafeAttributes belongs_to :project belongs_to :category, :class_name => "DocumentCategory", :foreign_key => "category_id" - acts_as_attachable :delete_permission => :manage_documents + acts_as_attachable :delete_permission => :delete_documents acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"}, diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index 28fc746..8456774 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -1,6 +1,6 @@
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %> + :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>