mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-24 05:38:46 +00:00
fix: use domain models for v2 eventstore (#1151)
* fix: use domain models for v2 eventstore * fix: user domain model * Update internal/api/grpc/admin/login_policy_converter.go Co-authored-by: Livio Amstutz <[email protected]> * fix: converter Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
@@ -2,10 +2,10 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
iam_model "github.com/caos/zitadel/internal/iam/model"
|
||||
"github.com/caos/zitadel/internal/v2/domain"
|
||||
)
|
||||
|
||||
func (r *CommandSide) GetOrgPasswordComplexityPolicy(ctx context.Context, orgID string) (*iam_model.PasswordComplexityPolicy, error) {
|
||||
func (r *CommandSide) GetOrgPasswordComplexityPolicy(ctx context.Context, orgID string) (*domain.PasswordComplexityPolicy, error) {
|
||||
policy := NewOrgPasswordComplexityPolicyWriteModel(orgID)
|
||||
err := r.eventstore.FilterToQueryReducer(ctx, policy)
|
||||
if err != nil {
|
||||
@@ -14,5 +14,5 @@ func (r *CommandSide) GetOrgPasswordComplexityPolicy(ctx context.Context, orgID
|
||||
if policy.IsActive {
|
||||
return orgWriteModelToPasswordComplexityPolicy(policy), nil
|
||||
}
|
||||
return r.GetDefaultPasswordComplexityPolicy(ctx, r.iamID)
|
||||
return r.GetDefaultPasswordComplexityPolicy(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user