Render analytics identifiers (#67860)

* Append analytics identifier upon authenticate session

* Add id and module upon syncing user to identity

* Add authModule & id to `IdentityFromSignedInUser`

* Allow req calls in test to use basic auth

* Add `intercom_secret` to grafana config in tests

* Add test for analytics render in html view
This commit is contained in:
linoman
2023-05-05 17:17:18 +02:00
committed by GitHub
parent ae1a85b5ad
commit 15e34505e2
5 changed files with 78 additions and 6 deletions
@@ -392,6 +392,8 @@ func syncSignedInUserToIdentity(usr *user.SignedInUser, identity *authn.Identity
identity.LastSeenAt = usr.LastSeenAt
identity.IsDisabled = usr.IsDisabled
identity.IsGrafanaAdmin = &usr.IsGrafanaAdmin
identity.AuthID = usr.ExternalAuthID
identity.AuthModule = usr.ExternalAuthModule
}
func shouldUpdateLastSeen(t time.Time) bool {