Skip to content

Commit

Permalink
[#4357,#4348] Bug/LF Users
Browse files Browse the repository at this point in the history
- Handled exception case for users that dont exist
- Updated response with ccla,icla,ccla_requires_icla fields

Signed-off-by: Harold Wanyama <hwanyama@contractor.linuxfoundation.org>
  • Loading branch information
nickmango committed Jun 18, 2024
1 parent e23761e commit 4876d47
Show file tree
Hide file tree
Showing 9 changed files with 1,673 additions and 18 deletions.
346 changes: 346 additions & 0 deletions cla-backend-go/company/mocks/mock_service.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions cla-backend-go/company/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ type IService interface { // nolint
// calls org service
SearchOrganizationByName(ctx context.Context, orgName string, websiteName string, includeSigningEntityName bool, filter string) (*models.OrgList, error)

sendRequestAccessEmail(ctx context.Context, companyModel *models.Company, requesterName, requesterEmail, recipientName, recipientAddress string)
sendRequestApprovedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
sendRequestRejectedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
getPreferredNameAndEmail(ctx context.Context, lfid string) (string, string, error)
// sendRequestAccessEmail(ctx context.Context, companyModel *models.Company, requesterName, requesterEmail, recipientName, recipientAddress string)
// sendRequestApprovedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
// sendRequestRejectedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
// getPreferredNameAndEmail(ctx context.Context, lfid string) (string, string, error)
}

// NewService creates a new company service object
Expand Down
249 changes: 249 additions & 0 deletions cla-backend-go/project/mocks/mock_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cla-backend-go/signatures/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ type SignatureService interface {
GetClaGroupCCLASignatures(ctx context.Context, claGroupID string, approved, signed *bool) (*models.Signatures, error)
GetClaGroupCorporateContributors(ctx context.Context, claGroupID string, companyID *string, pageSize *int64, nextKey *string, searchTerm *string) (*models.CorporateContributorList, error)

createOrGetEmployeeModels(ctx context.Context, claGroupModel *models.ClaGroup, companyModel *models.Company, corporateSignatureModel *models.Signature) ([]*models.User, error)
// createOrGetEmployeeModels(ctx context.Context, claGroupModel *models.ClaGroup, companyModel *models.Company, corporateSignatureModel *models.Signature) ([]*models.User, error)
CreateOrUpdateEmployeeSignature(ctx context.Context, claGroupModel *models.ClaGroup, companyModel *models.Company, corporateSignatureModel *models.Signature) ([]*models.User, error)
UpdateEnvelopeDetails(ctx context.Context, signatureID, envelopeID string, signURL *string) (*models.Signature, error)
handleGitHubStatusUpdate(ctx context.Context, employeeUserModel *models.User) error
// handleGitHubStatusUpdate(ctx context.Context, employeeUserModel *models.User) error
ProcessEmployeeSignature(ctx context.Context, companyModel *models.Company, claGroupModel *models.ClaGroup, user *models.User) (*bool, error)
}

Expand Down
17 changes: 17 additions & 0 deletions cla-backend-go/swagger/cla.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6176,5 +6176,22 @@ definitions:
companyID:
type: string
description: The ID of the company associated with the User (optional)
CCLARequiresICLA:
type: boolean
description: Flag ensuring user signs ICLA and is acknowledged the company
x-omitempty: false
companyAffiliation:
type: boolean
description: User is affiliated with a company (use case when user has no companyID attribute)
x-omitempty: false
ICLA:
type: boolean
description: User has an ICLA signature
x-omitempty: false
CCLA:
type: boolean
description: Flag to indicate if user has been company acknowledged and approved
x-omitempty: false



Loading

0 comments on commit 4876d47

Please sign in to comment.