fix: ensure resource owner in update human profile (#6253)

This commit is contained in:
Livio Spring
2023-07-21 15:42:24 +02:00
committed by GitHub
parent cedf4dda5b
commit 13e284dd56
2 changed files with 3 additions and 3 deletions

View File

@@ -146,11 +146,11 @@ func AddMachineUserRequestToCommand(req *mgmt_pb.AddMachineUserRequest, resource
}
}
func UpdateHumanProfileRequestToDomain(req *mgmt_pb.UpdateHumanProfileRequest) *domain.Profile {
func UpdateHumanProfileRequestToDomain(req *mgmt_pb.UpdateHumanProfileRequest, orgID string) *domain.Profile {
preferredLanguage, err := language.Parse(req.PreferredLanguage)
logging.Log("MANAG-GPcYv").OnError(err).Debug("language malformed")
return &domain.Profile{
ObjectRoot: models.ObjectRoot{AggregateID: req.UserId},
ObjectRoot: models.ObjectRoot{AggregateID: req.UserId, ResourceOwner: orgID},
FirstName: req.FirstName,
LastName: req.LastName,
NickName: req.NickName,