]> source.dussan.org Git - redmine.git/commitdiff
Fixed: non member or anonymous permissions change is effective only after an applicat...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 22 May 2008 18:08:54 +0000 (18:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 22 May 2008 18:08:54 +0000 (18:08 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1443 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user.rb

index a67a085675b3510252519f7909fea90d88395f7f..573261b77b3793d466a014619664ad36aae8ab36 100644 (file)
@@ -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