Commit 82c12d09 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: non member or anonymous permissions change is effective only after an…

Fixed: non member or anonymous permissions change is effective only after an application restart (#1280).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1443 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 62125cad
......@@ -258,13 +258,12 @@ class User < ActiveRecord::Base
end
def self.anonymous
return @anonymous_user if @anonymous_user
anonymous_user = AnonymousUser.find(:first)
if anonymous_user.nil?
anonymous_user = AnonymousUser.create(:lastname => 'Anonymous', :firstname => '', :mail => '', :login => '', :status => 0)
raise 'Unable to create the anonymous user.' if anonymous_user.new_record?
end
@anonymous_user = anonymous_user
anonymous_user
end
private
......
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