Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user patch remove operation for migrating users #423

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

amanda-ariyaratne
Copy link
Contributor

@amanda-ariyaratne amanda-ariyaratne commented Feb 4, 2025

Purpose

  1. When two remove operations are sent for the same local claim, there will be an error thrown for the second one as BadRequest because there is no attribute to remove. The attribute will be removed by the first operation itself. Therefore, we need to keep track of the attributes removed by the synced attributes and if the Bad Request is thrown because of such an attribute, ignore it.
{
    "op": "remove",
    "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:country"
},
{
    "op": "remove",
    "path": "urn:scim:wso2:schema:country"
},
  1. Fix the path extraction for following type of requests.
{
    "op": "remove",
    "path": "urn:scim:wso2:schema:devices[value eq \"M7\"]"
},

Related Issues

Related PRs

@amanda-ariyaratne amanda-ariyaratne changed the title Fix user patch remove op for migrating users Fix user patch remove operation for migrating users Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 23.52941% with 13 lines in your changes missing coverage. Please review.

Project coverage is 30.14%. Comparing base (9353458) to head (1598c3f).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...3/core/protocol/endpoints/UserResourceManager.java 23.52% 12 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (23.52%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #423      +/-   ##
============================================
- Coverage     30.15%   30.14%   -0.01%     
- Complexity      991      992       +1     
============================================
  Files           134      134              
  Lines         13202    13214      +12     
  Branches       2534     2538       +4     
============================================
+ Hits           3981     3984       +3     
- Misses         8720     8728       +8     
- Partials        501      502       +1     
Flag Coverage Δ
unit 29.42% <23.52%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

PasinduYeshan
PasinduYeshan previously approved these changes Feb 5, 2025
@amanda-ariyaratne
Copy link
Contributor Author

The Integration test runner will be run with the version bump in wso2-extensions/identity-inbound-provisioning-scim2#600 PR.

@amanda-ariyaratne amanda-ariyaratne merged commit 4a6e0d2 into wso2:master Feb 5, 2025
2 of 4 checks passed
@amanda-ariyaratne
Copy link
Contributor Author

Integration test runner passed in the PR wso2-extensions/identity-inbound-provisioning-scim2#605 with the charon changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants