mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:57:33 +00:00
fix: remove duplicate pw and otp verification (#2226)
* fix: save data (userAgentID) of otp verified event * fix: change event to human.seftregistered on org setup * fix: change event to human.seftregistered on org setup only from login * fix: set password
This commit is contained in:
@@ -2,6 +2,7 @@ package admin
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/api/authz"
|
||||
"github.com/caos/zitadel/internal/api/grpc/object"
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
@@ -44,7 +45,7 @@ func (s *Server) SetUpOrg(ctx context.Context, req *admin_pb.SetUpOrgRequest) (*
|
||||
human := setUpOrgHumanToDomain(req.User.(*admin_pb.SetUpOrgRequest_Human_).Human) //TODO: handle machine
|
||||
org := setUpOrgOrgToDomain(req.Org)
|
||||
|
||||
objectDetails, err := s.command.SetUpOrg(ctx, org, human, userIDs)
|
||||
objectDetails, err := s.command.SetUpOrg(ctx, org, human, userIDs, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ func setUpOrgHumanToDomain(human *admin_grpc.SetUpOrgRequest_Human) *domain.Huma
|
||||
Profile: setUpOrgHumanProfileToDomain(human.Profile),
|
||||
Email: setUpOrgHumanEmailToDomain(human.Email),
|
||||
Phone: setUpOrgHumanPhoneToDomain(human.Phone),
|
||||
Password: setUpOrgHumanPasswordToDomain(human.Password),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,3 +49,10 @@ func setUpOrgHumanPhoneToDomain(phone *admin_grpc.SetUpOrgRequest_Human_Phone) *
|
||||
IsPhoneVerified: phone.IsPhoneVerified,
|
||||
}
|
||||
}
|
||||
|
||||
func setUpOrgHumanPasswordToDomain(password string) *domain.Password {
|
||||
if password == "" {
|
||||
return nil
|
||||
}
|
||||
return domain.NewPassword(password)
|
||||
}
|
||||
|
Reference in New Issue
Block a user