perf: remove owner removed columns from projections for oidc (#6925)

* fix: remove owner removed columns from login names projection

* fix: remove owner removed columns from flow projection

* fix: remove owner removed columns from project, projectgrant and member projections

* fix: correct unit tests for session projection

* fix: correct unit tests for session projection
This commit is contained in:
Stefan Benz
2023-11-20 16:21:08 +01:00
committed by GitHub
parent 3bed5f50a8
commit 0ec7a74877
65 changed files with 358 additions and 654 deletions

View File

@@ -329,15 +329,12 @@ func (q *Queries) AppBySAMLEntityID(ctx context.Context, entityID string, withOw
return app, err
}
func (q *Queries) ProjectByClientID(ctx context.Context, appID string, withOwnerRemoved bool) (project *Project, err error) {
func (q *Queries) ProjectByClientID(ctx context.Context, appID string) (project *Project, err error) {
ctx, span := tracing.NewSpan(ctx)
defer func() { span.EndWithError(err) }()
stmt, scan := prepareProjectByAppQuery(ctx, q.client)
eq := sq.Eq{AppColumnInstanceID.identifier(): authz.GetInstance(ctx).InstanceID()}
if !withOwnerRemoved {
eq[ProjectColumnOwnerRemoved.identifier()] = false
}
query, args, err := stmt.Where(sq.And{
eq,
sq.Or{