mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-27 17:52:14 +00:00
fix: query organization directly from event store (#10463)
Querying an organization by id allowed to trigger the org projection. This could lead to performance impacts if the projection gets triggered too often. Instead of executing the trigger the organization by id query is now always executed on the eventstore and reduces all event types required of the organization requested. --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
@@ -571,7 +571,7 @@ func (l *Login) getOrgPrimaryDomain(r *http.Request, authReq *domain.AuthRequest
|
||||
if authReq != nil && authReq.RequestedPrimaryDomain != "" {
|
||||
return authReq.RequestedPrimaryDomain
|
||||
}
|
||||
org, err := l.query.OrgByID(r.Context(), false, orgID)
|
||||
org, err := l.query.OrgByID(r.Context(), orgID)
|
||||
if err != nil {
|
||||
logging.New().WithError(err).Error("cannot get default org")
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user