mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-07 05:13:49 +00:00
fix: filter of users uniqueness (#2753)
This commit is contained in:
@@ -151,8 +151,8 @@ func (repo *UserRepo) GetUserByLoginNameGlobal(ctx context.Context, loginName st
|
||||
return model.UserToModel(user, repo.PrefixAvatarURL), nil
|
||||
}
|
||||
|
||||
func (repo *UserRepo) IsUserUnique(ctx context.Context, userName, email string) (bool, error) {
|
||||
return repo.View.IsUserUnique(userName, email)
|
||||
func (repo *UserRepo) IsUserUnique(ctx context.Context, userName, email, orgID string) (bool, error) {
|
||||
return repo.View.IsUserUnique(userName, email, orgID)
|
||||
}
|
||||
|
||||
func (repo *UserRepo) GetMetadataByKey(ctx context.Context, userID, resourceOwner, key string) (*domain.Metadata, error) {
|
||||
|
||||
@@ -37,8 +37,8 @@ func (v *View) UserIDsByDomain(domain string) ([]string, error) {
|
||||
return view.UserIDsByDomain(v.Db, userTable, domain)
|
||||
}
|
||||
|
||||
func (v *View) IsUserUnique(userName, email string) (bool, error) {
|
||||
return view.IsUserUnique(v.Db, userTable, userName, email)
|
||||
func (v *View) IsUserUnique(userName, email, orgID string) (bool, error) {
|
||||
return view.IsUserUnique(v.Db, userTable, userName, email, orgID)
|
||||
}
|
||||
|
||||
func (v *View) UserMFAs(userID string) ([]*usr_model.MultiFactor, error) {
|
||||
|
||||
@@ -16,7 +16,7 @@ type UserRepository interface {
|
||||
UserIDsByDomain(ctx context.Context, domain string) ([]string, error)
|
||||
|
||||
GetUserByLoginNameGlobal(ctx context.Context, email string) (*model.UserView, error)
|
||||
IsUserUnique(ctx context.Context, userName, email string) (bool, error)
|
||||
IsUserUnique(ctx context.Context, userName, email, orgID string) (bool, error)
|
||||
|
||||
GetMetadataByKey(ctx context.Context, userID, resourceOwner, key string) (*domain.Metadata, error)
|
||||
SearchMetadata(ctx context.Context, userID, resourceOwner string, req *domain.MetadataSearchRequest) (*domain.MetadataSearchResponse, error)
|
||||
|
||||
Reference in New Issue
Block a user