From 82c12d09e94c502358b38166c5b239eb4ffcfff9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 22 May 2008 18:08:54 +0000 Subject: [PATCH] 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 --- app/models/user.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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