Skip to content

Commit 4876d47

Browse files
committed
[#4357,#4348] Bug/LF Users
- 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>
1 parent e23761e commit 4876d47

9 files changed

Lines changed: 1673 additions & 18 deletions

File tree

cla-backend-go/company/mocks/mock_service.go

Lines changed: 346 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cla-backend-go/company/service.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ type IService interface { // nolint
6262
// calls org service
6363
SearchOrganizationByName(ctx context.Context, orgName string, websiteName string, includeSigningEntityName bool, filter string) (*models.OrgList, error)
6464

65-
sendRequestAccessEmail(ctx context.Context, companyModel *models.Company, requesterName, requesterEmail, recipientName, recipientAddress string)
66-
sendRequestApprovedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
67-
sendRequestRejectedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
68-
getPreferredNameAndEmail(ctx context.Context, lfid string) (string, string, error)
65+
// sendRequestAccessEmail(ctx context.Context, companyModel *models.Company, requesterName, requesterEmail, recipientName, recipientAddress string)
66+
// sendRequestApprovedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
67+
// sendRequestRejectedEmailToRecipient(ctx context.Context, companyModel *models.Company, recipientName, recipientAddress string)
68+
// getPreferredNameAndEmail(ctx context.Context, lfid string) (string, string, error)
6969
}
7070

7171
// NewService creates a new company service object

cla-backend-go/project/mocks/mock_service.go

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cla-backend-go/signatures/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ type SignatureService interface {
7272
GetClaGroupCCLASignatures(ctx context.Context, claGroupID string, approved, signed *bool) (*models.Signatures, error)
7373
GetClaGroupCorporateContributors(ctx context.Context, claGroupID string, companyID *string, pageSize *int64, nextKey *string, searchTerm *string) (*models.CorporateContributorList, error)
7474

75-
createOrGetEmployeeModels(ctx context.Context, claGroupModel *models.ClaGroup, companyModel *models.Company, corporateSignatureModel *models.Signature) ([]*models.User, error)
75+
// createOrGetEmployeeModels(ctx context.Context, claGroupModel *models.ClaGroup, companyModel *models.Company, corporateSignatureModel *models.Signature) ([]*models.User, error)
7676
CreateOrUpdateEmployeeSignature(ctx context.Context, claGroupModel *models.ClaGroup, companyModel *models.Company, corporateSignatureModel *models.Signature) ([]*models.User, error)
7777
UpdateEnvelopeDetails(ctx context.Context, signatureID, envelopeID string, signURL *string) (*models.Signature, error)
78-
handleGitHubStatusUpdate(ctx context.Context, employeeUserModel *models.User) error
78+
// handleGitHubStatusUpdate(ctx context.Context, employeeUserModel *models.User) error
7979
ProcessEmployeeSignature(ctx context.Context, companyModel *models.Company, claGroupModel *models.ClaGroup, user *models.User) (*bool, error)
8080
}
8181

cla-backend-go/swagger/cla.v2.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6176,5 +6176,22 @@ definitions:
61766176
companyID:
61776177
type: string
61786178
description: The ID of the company associated with the User (optional)
6179+
CCLARequiresICLA:
6180+
type: boolean
6181+
description: Flag ensuring user signs ICLA and is acknowledged the company
6182+
x-omitempty: false
6183+
companyAffiliation:
6184+
type: boolean
6185+
description: User is affiliated with a company (use case when user has no companyID attribute)
6186+
x-omitempty: false
6187+
ICLA:
6188+
type: boolean
6189+
description: User has an ICLA signature
6190+
x-omitempty: false
6191+
CCLA:
6192+
type: boolean
6193+
description: Flag to indicate if user has been company acknowledged and approved
6194+
x-omitempty: false
6195+
61796196

61806197

0 commit comments

Comments
 (0)