Commit 77c7051f authored by jplang's avatar jplang

New Permission: View Forum (#4866).

Patch by Felix Schäfer.

git-svn-id: https://svn.redmine.org/redmine/trunk@16637 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent f815df92
class AddViewMessagesToAllExistingRoles < ActiveRecord::Migration
def up
Role.all.each { |role| role.add_permission! :view_messages }
end
def down
# nothing to revert
end
end
...@@ -169,7 +169,7 @@ Redmine::AccessControl.map do |map| ...@@ -169,7 +169,7 @@ Redmine::AccessControl.map do |map|
end end
map.project_module :boards do |map| map.project_module :boards do |map|
map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :read => true
map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload} map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload}
map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member
map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin
......
...@@ -71,6 +71,7 @@ module Redmine ...@@ -71,6 +71,7 @@ module Redmine
:view_wiki_edits, :view_wiki_edits,
:edit_wiki_pages, :edit_wiki_pages,
:delete_wiki_pages, :delete_wiki_pages,
:view_messages,
:add_messages, :add_messages,
:edit_own_messages, :edit_own_messages,
:view_files, :view_files,
...@@ -94,6 +95,7 @@ module Redmine ...@@ -94,6 +95,7 @@ module Redmine
:view_documents, :view_documents,
:view_wiki_pages, :view_wiki_pages,
:view_wiki_edits, :view_wiki_edits,
:view_messages,
:add_messages, :add_messages,
:edit_own_messages, :edit_own_messages,
:view_files, :view_files,
...@@ -111,6 +113,7 @@ module Redmine ...@@ -111,6 +113,7 @@ module Redmine
:view_documents, :view_documents,
:view_wiki_pages, :view_wiki_pages,
:view_wiki_edits, :view_wiki_edits,
:view_messages,
:add_messages, :add_messages,
:view_files, :view_files,
:browse_repository, :browse_repository,
...@@ -123,6 +126,7 @@ module Redmine ...@@ -123,6 +126,7 @@ module Redmine
:view_documents, :view_documents,
:view_wiki_pages, :view_wiki_pages,
:view_wiki_edits, :view_wiki_edits,
:view_messages,
:view_files, :view_files,
:browse_repository, :browse_repository,
:view_changesets] :view_changesets]
......
...@@ -50,6 +50,7 @@ roles_001: ...@@ -50,6 +50,7 @@ roles_001:
- :protect_wiki_pages - :protect_wiki_pages
- :delete_wiki_pages - :delete_wiki_pages
- :rename_wiki_pages - :rename_wiki_pages
- :view_messages
- :add_messages - :add_messages
- :edit_messages - :edit_messages
- :delete_messages - :delete_messages
...@@ -102,6 +103,7 @@ roles_002: ...@@ -102,6 +103,7 @@ roles_002:
- :edit_wiki_pages - :edit_wiki_pages
- :protect_wiki_pages - :protect_wiki_pages
- :delete_wiki_pages - :delete_wiki_pages
- :view_messages
- :add_messages - :add_messages
- :edit_own_messages - :edit_own_messages
- :delete_own_messages - :delete_own_messages
...@@ -145,6 +147,7 @@ roles_003: ...@@ -145,6 +147,7 @@ roles_003:
- :view_wiki_edits - :view_wiki_edits
- :edit_wiki_pages - :edit_wiki_pages
- :delete_wiki_pages - :delete_wiki_pages
- :view_messages
- :add_messages - :add_messages
- :manage_boards - :manage_boards
- :view_files - :view_files
...@@ -176,6 +179,7 @@ roles_004: ...@@ -176,6 +179,7 @@ roles_004:
- :view_wiki_pages - :view_wiki_pages
- :view_wiki_edits - :view_wiki_edits
- :edit_wiki_pages - :edit_wiki_pages
- :view_messages
- :add_messages - :add_messages
- :view_files - :view_files
- :manage_files - :manage_files
...@@ -199,6 +203,7 @@ roles_005: ...@@ -199,6 +203,7 @@ roles_005:
- :view_documents - :view_documents
- :view_wiki_pages - :view_wiki_pages
- :view_wiki_edits - :view_wiki_edits
- :view_messages
- :view_files - :view_files
- :browse_repository - :browse_repository
- :view_changesets - :view_changesets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment