summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorHassan Zamani <hsn.zamani@gmail.com>2017-05-30 10:36:00 +0430
committerMarkus Koller <markus.koller.ext@siemens.com>2018-02-08 13:22:41 +0100
commit583ef9458c5e5c32a14629f5754bc53ed0ad8a33 (patch)
tree711012ffe04f5822e55332ef971a37e26748689b /config
parentbfb32b46327576f5b5d4ff3d42198ba4601f1830 (diff)
downloadgitlab-ce-583ef9458c5e5c32a14629f5754bc53ed0ad8a33.tar.gz
Add groups to OpenID Connect claims
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: