Merge pull request #8421 from opf/fix/dont-set-login-from-uid-saml

Don't set login from uid for SAML strategy

[ci skip]
pull/8423/head
Oliver Günther 4 years ago committed by GitHub
commit 2eb663ab08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      modules/auth_saml/lib/open_project/auth_saml/engine.rb

@ -75,10 +75,10 @@ module OpenProject
strategy :saml do strategy :saml do
OpenProject::AuthSaml.configuration.values.map do |h| OpenProject::AuthSaml.configuration.values.map do |h|
h[:openproject_attribute_map] = Proc.new do |auth| h[:openproject_attribute_map] = Proc.new do |auth|
{ {}.tap do |additional|
login: auth[:uid], additional[:login] = auth.info[:login] if auth.info.key? :login
admin: (auth.info['admin'].to_s.downcase == "true") additional[:admin] = auth.info[:admin] if auth.info.key? :admin
} end
end end
h.symbolize_keys h.symbolize_keys
end end

Loading…
Cancel
Save