Identity: Unfurl OrgID in pkg/services to allow using identity.Requester interface (#76113)

Unfurl OrgID in pkg/services to allow using identity.Requester interface
This commit is contained in:
Jo
2023-10-09 10:40:19 +02:00
committed by GitHub
parent 20d64705f5
commit dcd0c6b11e
19 changed files with 100 additions and 98 deletions

View File

@ -118,7 +118,7 @@ func Auth(options *AuthOptions) web.Handler {
if !forceLogin {
orgIDValue := c.Req.URL.Query().Get("orgId")
orgID, err := strconv.ParseInt(orgIDValue, 10, 64)
if err == nil && orgID > 0 && orgID != c.OrgID {
if err == nil && orgID > 0 && orgID != c.SignedInUser.GetOrgID() {
forceLogin = true
}
}