pull/2978/head
Markus Kahl 10 years ago
parent c60928d8c7
commit e4dbfeef3a
  1. 3
      lib/open_project/authentication.rb
  2. 1
      lib/open_project/authentication/manager.rb
  3. 2
      lib/warden/strategies/global_basic_auth.rb

@ -11,7 +11,8 @@ module OpenProject
# For available scopes please refer to `OpenProject::Authentication::Scope`. # For available scopes please refer to `OpenProject::Authentication::Scope`.
# #
# @param [Symbol] scope The scope for which to update the used warden strategies. # @param [Symbol] scope The scope for which to update the used warden strategies.
# @param [Boolean] store Indicates whether the user should be stored in the session for this scope. # @param [Boolean] store Indicates whether the user should be stored in the session
# for this scope.
# #
# @yield [strategies] A block returning the strategies to be used for this scope. # @yield [strategies] A block returning the strategies to be used for this scope.
# @yieldparam [Array] The strategies currently used by this scope. May be empty. # @yieldparam [Array] The strategies currently used by this scope. May be empty.

@ -1,7 +1,6 @@
module OpenProject module OpenProject
module Authentication module Authentication
class Manager < Warden::Manager class Manager < Warden::Manager
serialize_into_session do |user| serialize_into_session do |user|
user.id user.id
end end

@ -19,7 +19,7 @@ module Warden
class GlobalBasicAuth < BasicAuth class GlobalBasicAuth < BasicAuth
def self.configuration def self.configuration
path = %w(authentication global_basic_auth) path = %w(authentication global_basic_auth)
config = path.reduce(OpenProject::Configuration) { |acc, key| Hash(acc[key]) } config = path.inject(OpenProject::Configuration) { |acc, key| Hash(acc[key]) }
user = config['user'] user = config['user']
password = config['password'] password = config['password']

Loading…
Cancel
Save