feat: add get my password policy (#346)

* feat: add get my password policy

* fix: failed merges
This commit is contained in:
Fabi
2020-07-06 15:35:20 +02:00
committed by GitHub
parent 5251fc712c
commit 645c4597e8
14 changed files with 18263 additions and 16374 deletions

View File

@@ -0,0 +1,18 @@
package eventstore
import (
"context"
"github.com/caos/zitadel/internal/api/auth"
pol_model "github.com/caos/zitadel/internal/policy/model"
pol_event "github.com/caos/zitadel/internal/policy/repository/eventsourcing"
)
type PolicyRepo struct {
PolicyEvents *pol_event.PolicyEventstore
}
func (repo *PolicyRepo) GetMyPasswordComplexityPolicy(ctx context.Context) (*pol_model.PasswordComplexityPolicy, error) {
ctxData := auth.GetCtxData(ctx)
return repo.PolicyEvents.GetPasswordComplexityPolicy(ctx, ctxData.OrgID)
}