Expose 'username' via forward auth headers

This commit is contained in:
Dan Milne
2026-01-05 15:12:02 +11:00
parent ba08158c85
commit 27d77ebf47
3 changed files with 9 additions and 3 deletions

View File

@@ -88,6 +88,8 @@ module Api
case key
when :user, :email, :name
[header_name, user.email_address]
when :username
[header_name, user.username] if user.username.present?
when :groups
user.groups.any? ? [header_name, user.groups.pluck(:name).join(",")] : nil
when :admin