Auth: Unfurl OrgID in pkg/api to allow using identity.Requester interface (#76108)

Unfurl OrgID in pkg/api to allow using identity.Requester interface
This commit is contained in:
Jo
2023-10-06 11:34:36 +02:00
committed by GitHub
parent fb0ac351bc
commit 729dafaff9
21 changed files with 116 additions and 114 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexV
return nil, err
}
prefsQuery := pref.GetPreferenceWithDefaultsQuery{UserID: c.UserID, OrgID: c.OrgID, Teams: c.Teams}
prefsQuery := pref.GetPreferenceWithDefaultsQuery{UserID: c.UserID, OrgID: c.SignedInUser.GetOrgID(), Teams: c.Teams}
prefs, err := hs.preferenceService.GetWithDefaults(c.Req.Context(), &prefsQuery)
if err != nil {
return nil, err
@@ -99,7 +99,7 @@ func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexV
Login: c.Login,
Email: c.Email,
Name: c.Name,
OrgId: c.OrgID,
OrgId: c.SignedInUser.GetOrgID(),
OrgName: c.OrgName,
OrgRole: c.OrgRole,
OrgCount: userOrgCount,