mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
fix: user queries (#4920)
This commit is contained in:
parent
dad9738ceb
commit
a99da4f8e4
@ -373,7 +373,7 @@ func ListUserMembershipsRequestToModel(ctx context.Context, req *mgmt_pb.ListUse
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
ownerQuery, err := query.NewMembershipResourceOwnerQuery(authz.GetCtxData(ctx).OrgID)
|
ownerQuery, err := query.NewMembershipResourceOwnersSearchQuery(authz.GetInstance(ctx).InstanceID(), authz.GetCtxData(ctx).OrgID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -387,7 +387,7 @@ func (q *Queries) GetHumanProfile(ctx context.Context, userID string, withOwnerR
|
|||||||
UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID(),
|
UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID(),
|
||||||
}
|
}
|
||||||
if !withOwnerRemoved {
|
if !withOwnerRemoved {
|
||||||
addUserWithoutOwnerRemoved(eq)
|
eq[UserOwnerRemovedCol.identifier()] = false
|
||||||
}
|
}
|
||||||
stmt, args, err := query.Where(eq).ToSql()
|
stmt, args, err := query.Where(eq).ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -411,7 +411,7 @@ func (q *Queries) GetHumanEmail(ctx context.Context, userID string, withOwnerRem
|
|||||||
UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID(),
|
UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID(),
|
||||||
}
|
}
|
||||||
if !withOwnerRemoved {
|
if !withOwnerRemoved {
|
||||||
addUserWithoutOwnerRemoved(eq)
|
eq[UserOwnerRemovedCol.identifier()] = false
|
||||||
}
|
}
|
||||||
stmt, args, err := query.Where(eq).ToSql()
|
stmt, args, err := query.Where(eq).ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -435,7 +435,7 @@ func (q *Queries) GetHumanPhone(ctx context.Context, userID string, withOwnerRem
|
|||||||
UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID(),
|
UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID(),
|
||||||
}
|
}
|
||||||
if !withOwnerRemoved {
|
if !withOwnerRemoved {
|
||||||
addUserWithoutOwnerRemoved(eq)
|
eq[UserOwnerRemovedCol.identifier()] = false
|
||||||
}
|
}
|
||||||
stmt, args, err := query.Where(eq).ToSql()
|
stmt, args, err := query.Where(eq).ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -562,7 +562,7 @@ func (q *Queries) IsUserUnique(ctx context.Context, username, email, resourceOwn
|
|||||||
}
|
}
|
||||||
eq := sq.Eq{UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID()}
|
eq := sq.Eq{UserInstanceIDCol.identifier(): authz.GetInstance(ctx).InstanceID()}
|
||||||
if !withOwnerRemoved {
|
if !withOwnerRemoved {
|
||||||
addUserWithoutOwnerRemoved(eq)
|
eq[UserOwnerRemovedCol.identifier()] = false
|
||||||
}
|
}
|
||||||
stmt, args, err := query.Where(eq).ToSql()
|
stmt, args, err := query.Where(eq).ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user