Ask for fullName on NDA signing

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-15 17:05:09 +04:00
committed by Bryan Frimin
parent 44d85a2b12
commit 491caa9e22
8 changed files with 219 additions and 52 deletions

View File

@@ -423,7 +423,7 @@ func (r *mutationResolver) ExportReportPDF(ctx context.Context, input types.Expo
}
// AcceptNonDisclosureAgreement is the resolver for the acceptNonDisclosureAgreement field.
func (r *mutationResolver) AcceptNonDisclosureAgreement(ctx context.Context) (*types.AcceptNonDisclosureAgreementPayload, error) {
func (r *mutationResolver) AcceptNonDisclosureAgreement(ctx context.Context, input types.AcceptNonDisclosureAgreementInput) (*types.AcceptNonDisclosureAgreementPayload, error) {
identity := authn.IdentityFromContext(ctx)
if identity == nil {
return nil, gqlutils.Unauthenticatedf(ctx, "unauthenticated")
@@ -433,6 +433,16 @@ func (r *mutationResolver) AcceptNonDisclosureAgreement(ctx context.Context) (*t
httpReq := gqlutils.HTTPRequestFromContext(ctx)
if _, err := r.iam.AuthService.UpdateIdentity(ctx, identity.ID, input.FullName); err != nil {
var errNotFound *iam.ErrIdentityNotFound
if errors.As(err, &errNotFound) {
return nil, gqlutils.NotFound(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot update identity", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
if err := trustService.TrustCenterAccesses.AcceptNonDisclosureAgreement(
ctx,
&trust.AcceptNDARequest{