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
+2 -19
View File
@@ -190,8 +190,8 @@ func NewUserV1PasswordChangedEvent(
ctx context.Context,
secret *crypto.CryptoValue,
changeRequired bool,
) *HumanPasswordChangedChangedEvent {
return &HumanPasswordChangedChangedEvent{
) *HumanPasswordChangedEvent {
return &HumanPasswordChangedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
UserV1PasswordChangedType,
@@ -360,24 +360,12 @@ func NewUserV1PhoneCodeSentEvent(ctx context.Context) *HumanPhoneCodeSentEvent {
func NewUserV1ProfileChangedEvent(
ctx context.Context,
firstName,
lastName,
nickName,
displayName string,
preferredLanguage language.Tag,
gender domain.Gender,
) *HumanProfileChangedEvent {
return &HumanProfileChangedEvent{
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
UserV1ProfileChangedType,
),
FirstName: firstName,
LastName: lastName,
NickName: nickName,
DisplayName: displayName,
PreferredLanguage: preferredLanguage,
Gender: gender,
}
}
@@ -394,11 +382,6 @@ func NewUserV1AddressChangedEvent(
ctx,
UserV1AddressChangedType,
),
Country: country,
Locality: locality,
PostalCode: postalCode,
Region: region,
StreetAddress: streetAddress,
}
}