[v11.2.x] Identity: remove GetTypedID (#92256)
Identity: remove GetTypedID (#91745)
(cherry picked from commit bcfb66b416)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
co-authored by
Karl Persson
parent
7a25060fa6
commit
811307c46b
+2
-4
@@ -31,7 +31,7 @@ func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexV
|
||||
return nil, err
|
||||
}
|
||||
|
||||
userID, _ := identity.UserIdentifier(c.SignedInUser.GetTypedID())
|
||||
userID, _ := identity.UserIdentifier(c.SignedInUser.GetID())
|
||||
|
||||
prefsQuery := pref.GetPreferenceWithDefaultsQuery{UserID: userID, OrgID: c.SignedInUser.GetOrgID(), Teams: c.Teams}
|
||||
prefs, err := hs.preferenceService.GetWithDefaults(c.Req.Context(), &prefsQuery)
|
||||
@@ -169,10 +169,8 @@ func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexV
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) buildUserAnalyticsSettings(c *contextmodel.ReqContext) dtos.AnalyticsSettings {
|
||||
namespace, _ := c.SignedInUser.GetTypedID()
|
||||
|
||||
// Anonymous users do not have an email or auth info
|
||||
if namespace != identity.TypeUser {
|
||||
if !identity.IsIdentityType(c.SignedInUser.GetID(), identity.TypeUser) {
|
||||
return dtos.AnalyticsSettings{Identifier: "@" + hs.Cfg.AppURL}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user