From 983ec24a97d4f7243d347da7b7fdfcf961153130 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 1 May 2014 13:37:08 +0000 Subject: [PATCH] 2.5-stable: revert r13111 and r13113 (#16685) git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13120 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 1 - app/models/user.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b5ce92849..0f8e538fa 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,6 @@ 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" gem "awesome_nested_set", "2.1.6" diff --git a/app/models/user.rb b/app/models/user.rb index fd245c3e8..4a33590f7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -626,11 +626,11 @@ class User < Principal end def self.current=(user) - RequestStore.store[:current_user] = user + Thread.current[:current_user] = user end def self.current - RequestStore.store[:current_user] ||= User.anonymous + Thread.current[:current_user] ||= User.anonymous end # Returns the anonymous user. If the anonymous user does not exist, it is created. There can be only -- 2.39.5