summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-06 12:20:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-06 12:20:47 +0000
commita7bacf70fb187bcb32ab15671ef835fd60d2a01d (patch)
tree6093b72c11f58b3b18faf0d260c466828b6850ef /app
parent07d20cc5f70b55787296539276f198cc47004ae7 (diff)
downloadredmine-a7bacf70fb187bcb32ab15671ef835fd60d2a01d.tar.gz
redmine-a7bacf70fb187bcb32ab15671ef835fd60d2a01d.zip
Fixed: Unable to change locked, sticky flags and board when editing a message (#10564).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9350 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/message.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/message.rb b/app/models/message.rb
index 5721cb571..5d028870d 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -37,7 +37,6 @@ class Message < ActiveRecord::Base
:author_key => :author_id
acts_as_watchable
- attr_protected :locked, :sticky
validates_presence_of :board, :subject, :content
validates_length_of :subject, :maximum => 255
validate :cannot_reply_to_locked_topic, :on => :create
@@ -50,7 +49,7 @@ class Message < ActiveRecord::Base
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_messages, *args) } }
safe_attributes 'subject', 'content'
- safe_attributes 'locked', 'sticky',
+ safe_attributes 'locked', 'sticky', 'board_id',
:if => lambda {|message, user|
user.allowed_to?(:edit_messages, message.project)
}