summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorToon Claes <toon@iotcl.com>2017-10-17 15:20:07 +0200
committerToon Claes <toon@iotcl.com>2017-10-18 10:17:14 +0200
commitb40ff63412ef89ba61a4215ee7478b06b22cf9ca (patch)
tree5c90aa16335a5aefe1adb86e9d481de466f3a681 /lib
parentf69b54682fc1770a73c528032b1a86f3e7d547a1 (diff)
downloadgitlab-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.rb2
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