##// END OF EJS Templates
Fixed: non member or anonymous permissions change is effective only after an application restart (#1280)....
Jean-Philippe Lang -
r1429:82c12d09e94c
parent child
Show More
@@ -258,13 +258,12 class User < ActiveRecord::Base
258 end
258 end
259
259
260 def self.anonymous
260 def self.anonymous
261 return @anonymous_user if @anonymous_user
262 anonymous_user = AnonymousUser.find(:first)
261 anonymous_user = AnonymousUser.find(:first)
263 if anonymous_user.nil?
262 if anonymous_user.nil?
264 anonymous_user = AnonymousUser.create(:lastname => 'Anonymous', :firstname => '', :mail => '', :login => '', :status => 0)
263 anonymous_user = AnonymousUser.create(:lastname => 'Anonymous', :firstname => '', :mail => '', :login => '', :status => 0)
265 raise 'Unable to create the anonymous user.' if anonymous_user.new_record?
264 raise 'Unable to create the anonymous user.' if anonymous_user.new_record?
266 end
265 end
267 @anonymous_user = anonymous_user
266 anonymous_user
268 end
267 end
269
268
270 private
269 private
General Comments 0
You need to be logged in to leave comments. Login now