mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:47:33 +00:00
fix: set domain verified if domain policy does not require validation (#4061)
* fix: set domain verified if domain policy does not require validation * handle domain claimed
This commit is contained in:
@@ -140,16 +140,17 @@ func (s *Server) ListOrgDomains(ctx context.Context, req *mgmt_pb.ListOrgDomains
|
||||
}
|
||||
|
||||
func (s *Server) AddOrgDomain(ctx context.Context, req *mgmt_pb.AddOrgDomainRequest) (*mgmt_pb.AddOrgDomainResponse, error) {
|
||||
domain, err := s.command.AddOrgDomain(ctx, AddOrgDomainRequestToDomain(ctx, req), nil)
|
||||
orgID := authz.GetCtxData(ctx).OrgID
|
||||
userIDs, err := s.getClaimedUserIDsOfOrgDomain(ctx, req.Domain, orgID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
details, err := s.command.AddOrgDomain(ctx, orgID, req.Domain, userIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &mgmt_pb.AddOrgDomainResponse{
|
||||
Details: object.AddToDetailsPb(
|
||||
domain.Sequence,
|
||||
domain.ChangeDate,
|
||||
domain.ResourceOwner,
|
||||
),
|
||||
Details: object.DomainToAddDetailsPb(details),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user