From 0711c585b65b388dade9a8ea9b1890d55fd34312 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jan 2014 12:27:01 +0000 Subject: [PATCH] Adds missing permissions on attachments/upload (#15664). git-svn-id: http://svn.redmine.org/redmine/trunk@12652 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index d35f82847..b66753f97 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -134,20 +134,20 @@ Redmine::AccessControl.map do |map| end map.project_module :news do |map| - map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member + map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy], :attachments => :upload}, :require => :member map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true map.permission :comment_news, {:comments => :create} end map.project_module :documents do |map| - map.permission :add_documents, {:documents => [:new, :create, :add_attachment]}, :require => :loggedin - map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment]}, :require => :loggedin + map.permission :add_documents, {:documents => [:new, :create, :add_attachment], :attachments => :upload}, :require => :loggedin + map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment], :attachments => :upload}, :require => :loggedin map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true end map.project_module :files do |map| - map.permission :manage_files, {:files => [:new, :create]}, :require => :loggedin + map.permission :manage_files, {:files => [:new, :create], :attachments => :upload}, :require => :loggedin map.permission :view_files, {:files => :index, :versions => :download}, :read => true end @@ -158,7 +158,7 @@ Redmine::AccessControl.map do |map| map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true - map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment] + map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment], :attachments => :upload map.permission :delete_wiki_pages_attachments, {} map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member end @@ -174,9 +174,9 @@ Redmine::AccessControl.map do |map| map.project_module :boards do |map| map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true - map.permission :add_messages, {:messages => [:new, :reply, :quote]} - map.permission :edit_messages, {:messages => :edit}, :require => :member - map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin + map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload} + map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member + map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin map.permission :delete_messages, {:messages => :destroy}, :require => :member map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin end