Project

General

Profile

Feature #4866 » 4866.patch

Felix Schäfer, 2017-04-19 16:49

View differences:

db/migrate/20170419144536_add_view_messages_to_all_existing_roles.rb
1
class AddViewMessagesToAllExistingRoles < ActiveRecord::Migration
2
  def up
3
    Role.all.each { |role| role.add_permission! :view_messages }
4
  end
5

  
6
  def down
7
    # nothing to revert
8
  end
9
end
lib/redmine.rb
169 169
  end
170 170

  
171 171
  map.project_module :boards do |map|
172
    map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true
172
    map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :read => true
173 173
    map.permission :add_messages, {:messages => [:new, :reply, :quote], :attachments => :upload}
174 174
    map.permission :edit_messages, {:messages => :edit, :attachments => :upload}, :require => :member
175 175
    map.permission :edit_own_messages, {:messages => :edit, :attachments => :upload}, :require => :loggedin
lib/redmine/default_data/loader.rb
71 71
                                                      :view_wiki_edits,
72 72
                                                      :edit_wiki_pages,
73 73
                                                      :delete_wiki_pages,
74
                                                      :view_messages,
74 75
                                                      :add_messages,
75 76
                                                      :edit_own_messages,
76 77
                                                      :view_files,
......
94 95
                                                    :view_documents,
95 96
                                                    :view_wiki_pages,
96 97
                                                    :view_wiki_edits,
98
                                                    :view_messages,
97 99
                                                    :add_messages,
98 100
                                                    :edit_own_messages,
99 101
                                                    :view_files,
......
111 113
                                                            :view_documents,
112 114
                                                            :view_wiki_pages,
113 115
                                                            :view_wiki_edits,
116
                                                            :view_messages,
114 117
                                                            :add_messages,
115 118
                                                            :view_files,
116 119
                                                            :browse_repository,
......
123 126
                                                           :view_documents,
124 127
                                                           :view_wiki_pages,
125 128
                                                           :view_wiki_edits,
129
                                                           :view_messages,
126 130
                                                           :view_files,
127 131
                                                           :browse_repository,
128 132
                                                           :view_changesets]
(1-1/2)