mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
K8s: Set X-Remote-Extra-User-Instance-Role header for SignedInUser (#87958)
This commit is contained in:
parent
5c27f223af
commit
fbda55316d
@ -38,6 +38,9 @@ func signedInUserAuthenticator(req *http.Request) (*authenticator.Response, bool
|
|||||||
if signedInUser.IDToken != "" {
|
if signedInUser.IDToken != "" {
|
||||||
userInfo.Extra["id-token"] = []string{signedInUser.IDToken}
|
userInfo.Extra["id-token"] = []string{signedInUser.IDToken}
|
||||||
}
|
}
|
||||||
|
if signedInUser.OrgRole.IsValid() {
|
||||||
|
userInfo.Extra["user-instance-role"] = []string{string(signedInUser.OrgRole)}
|
||||||
|
}
|
||||||
|
|
||||||
return &authenticator.Response{
|
return &authenticator.Response{
|
||||||
User: userInfo,
|
User: userInfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user