|
|
@ -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 |
|
|
|