mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 20:08:02 +00:00
19 lines
527 B
Go
19 lines
527 B
Go
|
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)
|
||
|
}
|