Skip to content

Commit

Permalink
fixed issue on request ccla function
Browse files Browse the repository at this point in the history
Signed-off-by: Umesh Lumbhani <[email protected]>
  • Loading branch information
umeshlumbhani247 committed Nov 17, 2023
1 parent f5e84b2 commit 6e4b631
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cla-backend-go/v2/sign/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1417,9 +1417,10 @@ func (s *service) requestCorporateSignature(ctx context.Context, apiURL string,
var signed bool
if len(companySignatures) > 0 {
companySignature = companySignatures[0]
_, currentTime := utils.CurrentTime()
itemSignature = &signatures.ItemSignature{
SignatureID: companySignature.SignatureID,
DateModified: companySignature.Modified,
DateModified: currentTime,
}
signed = companySignature.SignatureSigned
approved = companySignature.SignatureApproved
Expand All @@ -1444,22 +1445,21 @@ func (s *service) requestCorporateSignature(ctx context.Context, apiURL string,
SignatoryName: signatoryName,
SignatureSigned: false,
SignatureApproved: true,
SignatureCallbackURL: callbackURL,
SignatureReturnURL: input.ReturnURL,
SigtypeSignedApprovedID: fmt.Sprintf("%s#%v#%v#%s", utils.SignatureTypeCCLA, signed, approved, signatureID),
SignatureReferenceNameLower: strings.ToLower(comp.CompanyName),
}

}
companySignature.SignatureCallbackURL = callbackURL

if !input.SendAsEmail {
companySignature.SignatureReturnURL = input.ReturnURL
itemSignature.SignatureReturnURL = input.ReturnURL
}

// 6. Set signature ACL
log.WithFields(f).Debugf("setting signature ACL...")
companySignature.SignatureACL = []v1Models.User{
*claUser,
}
itemSignature.SignatureACL = []string{claUser.LfUsername}

// 7. Populate sign url
log.WithFields(f).Debugf("populating sign url...")
Expand Down

0 comments on commit 6e4b631

Please sign in to comment.