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 for Incorrect Retention of Previous Resource Sharing Policy When Switching Between General and Selective Policies #482

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BimsaraBodaragama
Copy link
Contributor

Purpose

Ensure that when a user is switched between general and selective resource-sharing policies, the previous policy is removed to prevent conflicts.

Goals

  • Prevent users from retaining attributes related to both general and selective resource-sharing policies.
  • Improve consistency when re-sharing users across organizations.

Approach

  • Implement a check to remove the previous resource-sharing policy when switching between general and selective policies.
  • Modify the re-sharing logic to enforce the replacement of existing policies instead of appending a new one.

Related Issue

to be created

…Switching Between General and Selective Policies
@BimsaraBodaragama BimsaraBodaragama self-assigned this Feb 23, 2025
Copy link

codecov bot commented Feb 23, 2025

Codecov Report

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

Project coverage is 51.43%. Comparing base (c05299d) to head (4aa2a93).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...r/sharing/UserSharingPolicyHandlerServiceImpl.java 0.00% 13 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) 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              @@
##               main     #482      +/-   ##
============================================
+ Coverage     51.31%   51.43%   +0.12%     
- Complexity     1573     1574       +1     
============================================
  Files           175      175              
  Lines          9582     9577       -5     
  Branches       1291     1291              
============================================
+ Hits           4917     4926       +9     
+ Misses         4240     4224      -16     
- Partials        425      427       +2     
Flag Coverage Δ
unit 33.23% <0.00%> (+0.28%) ⬆️

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.

@BimsaraBodaragama
Copy link
Contributor Author

BimsaraBodaragama commented Feb 23, 2025

Integration Test Runner For this PR can be found here.
Status: Successful ✅

… for better readability and maintainability.
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/13495936557

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/13495936557
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/13495936557

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.

3 participants