mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 14:30:00 +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 <livio.a@gmail.com>
This commit is contained in:
@@ -261,7 +261,7 @@ func (s *Server) checkOrgScopes(ctx context.Context, resourceOwner string, scope
|
||||
if slices.ContainsFunc(scopes, func(scope string) bool {
|
||||
return strings.HasPrefix(scope, domain.OrgDomainPrimaryScope)
|
||||
}) {
|
||||
org, err := s.query.OrgByID(ctx, false, resourceOwner)
|
||||
org, err := s.query.OrgByID(ctx, resourceOwner)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user