2016-06-02 11:05:42 +05:30
|
|
|
module Gitlab
|
|
|
|
module Saml
|
|
|
|
class AuthHash < Gitlab::OAuth::AuthHash
|
|
|
|
def groups
|
2018-03-17 18:26:18 +05:30
|
|
|
Array.wrap(get_raw(Gitlab::Saml::Config.groups))
|
2016-06-02 11:05:42 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def get_raw(key)
|
|
|
|
# Needs to call `all` because of https://git.io/vVo4u
|
|
|
|
# otherwise just the first value is returned
|
|
|
|
auth_hash.extra[:raw_info].all[key]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|