diff options
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -6,6 +6,7 @@ gem "jquery-rails", "~> 2.0.2" gem "coderay", "~> 1.1.0" gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] gem "builder", "3.0.0" +gem 'request_store' gem "mime-types" # Optional gem for LDAP authentication diff --git a/app/models/user.rb b/app/models/user.rb index 4a33590f7..fd245c3e8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -626,11 +626,11 @@ class User < Principal end def self.current=(user) - Thread.current[:current_user] = user + RequestStore.store[:current_user] = user end def self.current - Thread.current[:current_user] ||= User.anonymous + RequestStore.store[:current_user] ||= User.anonymous end # Returns the anonymous user. If the anonymous user does not exist, it is created. There can be only |