fix: check user is unique (#1678)

This commit is contained in:
Fabi
2021-04-27 11:22:33 +02:00
committed by GitHub
parent 10e85d999e
commit dbafb7b419
6 changed files with 209 additions and 20 deletions

View File

@@ -63,7 +63,7 @@ func AddHumanUserRequestToDomain(req *mgmt_pb.AddHumanUserRequest) *domain.Human
}
}
if req.InitialPassword != "" {
h.Password = &domain.Password{SecretString: req.InitialPassword}
h.Password = &domain.Password{SecretString: req.InitialPassword, ChangeRequired: true}
}
return h
@@ -95,7 +95,7 @@ func ImportHumanUserRequestToDomain(req *mgmt_pb.ImportHumanUserRequest) *domain
}
if req.Password != "" {
h.Password = &domain.Password{SecretString: req.Password}
h.Password.ChangeRequired = true
h.Password.ChangeRequired = req.PasswordChangeRequired
}
return h