diff --git a/pkg/probo/document_service.go b/pkg/probo/document_service.go index 7de295e86..5e11cac51 100644 --- a/pkg/probo/document_service.go +++ b/pkg/probo/document_service.go @@ -97,10 +97,6 @@ type ( ProfileID gid.GID } - ErrProfileInactive struct { - ProfileID gid.GID - } - CreateDocumentRequest struct { OrganizationID gid.GID Title string @@ -282,10 +278,6 @@ func (e ErrProfileContractEnded) Error() string { return fmt.Sprintf("cannot use profile %q: contract has ended", e.ProfileID) } -func (e ErrProfileInactive) Error() string { - return fmt.Sprintf("cannot use profile %q: profile is inactive", e.ProfileID) -} - func (s *DocumentService) Get( ctx context.Context, documentID gid.GID, @@ -979,9 +971,6 @@ func (s *DocumentService) BulkRequestSignatures( now := time.Now() for _, p := range *profiles { - if p.State == coredata.ProfileStateInactive { - return &ErrProfileInactive{ProfileID: p.ID} - } if p.ContractEndDate != nil && p.ContractEndDate.Before(now) { return &ErrProfileContractEnded{ProfileID: p.ID} } @@ -1093,10 +1082,6 @@ func (s *DocumentService) RequestSignature( return fmt.Errorf("cannot load signatory profile: %w", err) } - if profile.State == coredata.ProfileStateInactive { - return &ErrProfileInactive{ProfileID: profile.ID} - } - if profile.ContractEndDate != nil && profile.ContractEndDate.Before(time.Now()) { return &ErrProfileContractEnded{ProfileID: profile.ID} } diff --git a/pkg/server/api/console/v1/document_resolvers.go b/pkg/server/api/console/v1/document_resolvers.go index e33bf6bba..467d3d3bf 100644 --- a/pkg/server/api/console/v1/document_resolvers.go +++ b/pkg/server/api/console/v1/document_resolvers.go @@ -1296,10 +1296,6 @@ func (r *mutationResolver) RequestSignature(ctx context.Context, input types.Req return nil, gqlutils.Conflict(ctx, errContractEnded) } - if errInactive, ok := errors.AsType[*probo.ErrProfileInactive](err); ok { - return nil, gqlutils.Conflict(ctx, errInactive) - } - r.logger.ErrorCtx(ctx, "cannot request signature", log.Error(err)) return nil, gqlutils.Internal(ctx) } @@ -1345,10 +1341,6 @@ func (r *mutationResolver) BulkRequestSignatures(ctx context.Context, input type return nil, gqlutils.Conflict(ctx, errContractEnded) } - if errInactive, ok := errors.AsType[*probo.ErrProfileInactive](err); ok { - return nil, gqlutils.Conflict(ctx, errInactive) - } - r.logger.ErrorCtx(ctx, "cannot bulk request signatures", log.Error(err)) return nil, gqlutils.Internal(ctx) }