mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-13 09:25:12 +00:00
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:
@@ -27,11 +27,21 @@ func (wm *PasswordComplexityPolicyWriteModel) Reduce() error {
|
||||
wm.HasSymbol = e.HasSymbol
|
||||
wm.IsActive = true
|
||||
case *policy.PasswordComplexityPolicyChangedEvent:
|
||||
wm.MinLength = e.MinLength
|
||||
wm.HasLowercase = e.HasLowercase
|
||||
wm.HasUpperCase = e.HasUpperCase
|
||||
wm.HasNumber = e.HasNumber
|
||||
wm.HasSymbol = e.HasSymbol
|
||||
if e.MinLength != nil {
|
||||
wm.MinLength = *e.MinLength
|
||||
}
|
||||
if e.HasLowercase != nil {
|
||||
wm.HasLowercase = *e.HasLowercase
|
||||
}
|
||||
if e.HasUpperCase != nil {
|
||||
wm.HasUpperCase = *e.HasUpperCase
|
||||
}
|
||||
if e.HasNumber != nil {
|
||||
wm.HasNumber = *e.HasNumber
|
||||
}
|
||||
if e.HasSymbol != nil {
|
||||
wm.HasSymbol = *e.HasSymbol
|
||||
}
|
||||
case *policy.PasswordComplexityPolicyRemovedEvent:
|
||||
wm.IsActive = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user