Update sanctioned message#5113
Conversation
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
WalkthroughUpdates Go and legacy signature compliance handling to describe companies requiring further trade compliance review, including revised blocked responses and corporate CLA finalization errors. ChangesTrade compliance handling
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates user-facing messaging for organizations requiring additional trade-compliance review.
Changes:
- Replaces sanctioned-entity wording with trade-compliance review messaging.
- Updates corporate-signature error classification and blocked-signature descriptions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
cla-backend-legacy/internal/api/handlers.go |
Updates blocked employee-signature messaging. |
cla-backend-go/v2/sign/handlers.go |
Updates corporate-signature compliance error handling and messaging. |
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
|
Good catch. This is a real compatibility issue because the error text is used to select the existing 403 response, while the producer-side wording is being changed separately in #5108. I updated the condition to recognize both the current |
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
cla-backend-go/v2/sign/handlers.go:140
- Please add a regression test for this new error-to-403 mapping. The status depends on matching service error text, and that coupling already produced the earlier mismatch in this PR; currently no
*_test.goexercisesRequestCorporateSignaturethrough this handler. Have the service return the new trade-compliance error and assert the forbidden response and description.
if strings.Contains(err.Error(), "is sanctioned") || strings.Contains(err.Error(), "requires further review for trade compliance") {
desc := "We're sorry, but this organization requires additional trade compliance review, so the Contributor License Agreement (CLA) cannot be completed at this time. If you believe this is an error, please contact EasyCLA Support via the chat widget."
return sign.NewRequestCorporateSignatureForbidden().WithPayload(errorResponseWithDesc(reqID, err, desc))
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot) Assisted by [Claude](https://claude.ai)
|
Updated. Since #5113 now changes the The existing |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cla-backend-go/v2/sign/handlers.go`:
- Around line 138-140: Update the trade-compliance condition in the sign request
handler to match both the revised “requires further review for trade compliance”
wording and the legacy “is sanctioned” wording. Preserve the existing 403
response and descriptive payload through
sign.NewRequestCorporateSignatureForbidden for either match.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 941b811e-c9ef-43d2-97d4-bf3b72002c10
📒 Files selected for processing (1)
cla-backend-go/v2/sign/handlers.go
|
@ahmedomosanya @mlehotskylf PTAL. |
Required by linuxfoundation/easycla-contributor-console#506, also mentioned here: #5108 (comment)
Signed-off-by: Łukasz Gryglicki lgryglicki@cncf.io
Assisted by OpenAI
Assisted by GitHub Copilot
Assisted by Claude