Remove backend inactive profile validation
Users are created with state=INACTIVE and only become ACTIVE on first login. The server-side state check incorrectly rejected newly-created users who hadn't yet activated their accounts. The frontend filter (state: ACTIVE) is the correct layer to hide deactivated people from the recipient picker. The existing contract end date validation remains as server-side defense in depth. Co-authored-by: Émile Ré <nemile.re@gmail.com> Signed-off-by: Émile Ré <emile@getprobo.com> Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user