From: Jean-Philippe Lang Date: Thu, 22 May 2008 18:08:54 +0000 (+0000) Subject: Fixed: non member or anonymous permissions change is effective only after an applicat... X-Git-Tag: 0.8.0-RC1~529 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=82c12d09e94c502358b38166c5b239eb4ffcfff9;p=redmine.git 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 --- diff --git a/app/models/user.rb b/app/models/user.rb index a67a08567..573261b77 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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