feat: New user (#1153)

* fix: use pointer in events

* fix: change user requests to command side

* fix: org policy

* fix: profile
This commit is contained in:
Fabi
2021-01-06 11:12:56 +01:00
committed by GitHub
parent 61d16e4621
commit 65a8efeb0e
51 changed files with 810 additions and 283 deletions
@@ -20,14 +20,14 @@ const (
HumanPasswordCheckFailedType = passwordEventPrefix + "check.failed"
)
type HumanPasswordChangedChangedEvent struct {
type HumanPasswordChangedEvent struct {
eventstore.BaseEvent `json:"-"`
Secret *crypto.CryptoValue `json:"secret,omitempty"`
ChangeRequired bool `json:"changeRequired,omitempty"`
ChangeRequired bool `json:"changeRequired"`
}
func (e *HumanPasswordChangedChangedEvent) Data() interface{} {
func (e *HumanPasswordChangedEvent) Data() interface{} {
return e
}
@@ -35,8 +35,8 @@ func NewHumanPasswordChangedEvent(
ctx context.Context,
secret *crypto.CryptoValue,
changeRequired bool,
) *HumanPasswordChangedChangedEvent {
return &HumanPasswordChangedChangedEvent{
) *HumanPasswordChangedEvent {
return &HumanPasswordChangedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
HumanPasswordChangedType,
@@ -47,7 +47,7 @@ func NewHumanPasswordChangedEvent(
}
func HumanPasswordChangedEventMapper(event *repository.Event) (eventstore.EventReader, error) {
humanAdded := &HumanPasswordChangedChangedEvent{
humanAdded := &HumanPasswordChangedEvent{
BaseEvent: *eventstore.BaseEventFromRepo(event),
}
err := json.Unmarshal(event.Data, humanAdded)