Browse Source

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
tags/0.8.0-RC1
Jean-Philippe Lang 16 years ago
parent
commit
82c12d09e9
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      app/models/user.rb

+ 1
- 2
app/models/user.rb View 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

Loading…
Cancel
Save