[v9.5.x] Render analytics identifiers (#67925)

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 18:38:31 +03:00
committed by GitHub
co-authored by linoman
parent 8fc8a5e208
commit 4b6ce21884
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 {