diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-20 15:40:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-20 15:40:16 +0000 |
commit | 987a5aa22114ec2e931464782351431e4dfec97c (patch) | |
tree | 57af15078250c620d494306c251ad66af779bc0b /app/models/query.rb | |
parent | 99f9aea80a2bc43cdfc2933728f0ab72d7bf99d5 (diff) | |
download | redmine-987a5aa22114ec2e931464782351431e4dfec97c.tar.gz redmine-987a5aa22114ec2e931464782351431e4dfec97c.zip |
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums.
These permissions need to be explicitly given to the Anonymous role (Admin -> Roles & Permissions -> Anonymous).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@919 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 30df55b96..f869f648b 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -112,11 +112,8 @@ class Query < ActiveRecord::Base def initialize(attributes = nil) super attributes self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} } - end - - def executed_by=(user) - @executed_by = user - set_language_if_valid(user.language) if user + @executed_by = User.current.logged? ? User.current : nil + set_language_if_valid(executed_by.language) if executed_by end def validate |