[v10.0.x] Render analytics identifiers (#67926)

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

(cherry picked from commit 15e34505e2)

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2023-05-05 17:36:08 +02:00
committed by GitHub
co-authored by linoman
parent 9a1e114009
commit 8a8d796c1f
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 {