Adds missing permissions on attachments/upload (#15664).

git-svn-id: http://svn.redmine.org/redmine/trunk@12652 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-01-11 12:27:01 +00:00
parent 4e151a4722
commit 0711c585b6
1 changed files with 8 additions and 8 deletions

View File

@ -134,20 +134,20 @@ Redmine::AccessControl.map do |map|
end end
map.project_module :news do |map| 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 :view_news, {:news => [:index, :show]}, :public => true, :read => true
map.permission :comment_news, {:comments => :create} map.permission :comment_news, {:comments => :create}
end end
map.project_module :documents do |map| map.project_module :documents do |map|
map.permission :add_documents, {:documents => [:new, :create, :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]}, :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 :delete_documents, {:documents => [:destroy]}, :require => :loggedin
map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true
end end
map.project_module :files do |map| 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 map.permission :view_files, {:files => :index, :versions => :download}, :read => true
end 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 :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true
map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true
map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :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 :delete_wiki_pages_attachments, {}
map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
end end
@ -174,9 +174,9 @@ Redmine::AccessControl.map do |map|
map.project_module :boards do |map| map.project_module :boards do |map|
map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member 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 :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true
map.permission :add_messages, {:messages => [:new, :reply, :quote]} map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload}
map.permission :edit_messages, {:messages => :edit}, :require => :member map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member
map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin
map.permission :delete_messages, {:messages => :destroy}, :require => :member map.permission :delete_messages, {:messages => :destroy}, :require => :member
map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
end end