summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-02-08 14:26:18 +0000
committerDouwe Maan <douwe@gitlab.com>2018-02-08 14:26:18 +0000
commitbbb3e58bc7143df31355baddc970670e1e64503d (patch)
tree712b159ad384f7c349416f7de8e8feb9afe9b43a /config
parent15eb0ab0f8ec1bef02065949cade065956c9d4d1 (diff)
parent583ef9458c5e5c32a14629f5754bc53ed0ad8a33 (diff)
downloadgitlab-ce-bbb3e58bc7143df31355baddc970670e1e64503d.tar.gz
Merge branch 'feature/oidc-groups-claim' into 'master'
Add groups to OpenID Connect claims See merge request gitlab-org/gitlab-ce!16929
Diffstat (limited to 'config')
-rw-r--r--config/initializers/doorkeeper_openid_connect.rb1
-rw-r--r--config/locales/doorkeeper.en.yml2
2 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/doorkeeper_openid_connect.rb b/config/initializers/doorkeeper_openid_connect.rb
index af174def047..98e1f6e830f 100644
--- a/config/initializers/doorkeeper_openid_connect.rb
+++ b/config/initializers/doorkeeper_openid_connect.rb
@@ -31,6 +31,7 @@ Doorkeeper::OpenidConnect.configure do
o.claim(:website) { |user| user.full_website_url if user.website_url? }
o.claim(:profile) { |user| Gitlab::Routing.url_helpers.user_url user }
o.claim(:picture) { |user| user.avatar_url(only_path: false) }
+ o.claim(:groups) { |user| user.membership_groups.map(&:full_path) }
end
end
end
diff --git a/config/locales/doorkeeper.en.yml b/config/locales/doorkeeper.en.yml
index b1c71095d4f..889111282ef 100644
--- a/config/locales/doorkeeper.en.yml
+++ b/config/locales/doorkeeper.en.yml
@@ -68,7 +68,7 @@ en:
read_user:
Read-only access to the user's profile information, like username, public email and full name
openid:
- The ability to authenticate using GitLab, and read-only access to the user's profile information
+ The ability to authenticate using GitLab, and read-only access to the user's profile information and group memberships
sudo:
Access to the Sudo feature, to perform API actions as any user in the system (only available for admins)
flash: