diff options
author | Toon Claes <toon@iotcl.com> | 2017-10-17 15:20:07 +0200 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-10-18 10:17:14 +0200 |
commit | b40ff63412ef89ba61a4215ee7478b06b22cf9ca (patch) | |
tree | 5c90aa16335a5aefe1adb86e9d481de466f3a681 /lib | |
parent | f69b54682fc1770a73c528032b1a86f3e7d547a1 (diff) | |
download | gitlab-ce-b40ff63412ef89ba61a4215ee7478b06b22cf9ca.tar.gz |
Fix SAML error 500 when no groups are defined for usertc-saml-fix-false-empty
When there are no groups defined in the auth hash attributes,
`Gitlab::Saml::AuthHash#groups` should return an empty array, and
`Gitlab::Saml::User#find_user` should not mark the user as external.
Closes gitlab-org/gitlab-ce#38923.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/saml/auth_hash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/saml/auth_hash.rb b/lib/gitlab/saml/auth_hash.rb index 67a5f368bdb..33d19373098 100644 --- a/lib/gitlab/saml/auth_hash.rb +++ b/lib/gitlab/saml/auth_hash.rb @@ -2,7 +2,7 @@ module Gitlab module Saml class AuthHash < Gitlab::OAuth::AuthHash def groups - get_raw(Gitlab::Saml::Config.groups) + Array.wrap(get_raw(Gitlab::Saml::Config.groups)) end private |