allow using targetOrgId parameter to set organisation ID for a request (#41561)

This commit is contained in:
Ieva
2021-11-11 16:39:08 +00:00
committed by GitHub
parent eb40723bcb
commit 08276225c1
2 changed files with 34 additions and 0 deletions

View File

@@ -105,6 +105,10 @@ func (h *ContextHandler) Middleware(mContext *web.Context) {
}
}
if targetOrgId := reqContext.QueryInt64("targetOrgId"); targetOrgId != 0 {
orgID = targetOrgId
}
// the order in which these are tested are important
// look for api key in Authorization header first
// then init session and look for userId in session