Skip to content

Conversation

@asha15
Copy link
Contributor

@asha15 asha15 commented Jun 5, 2025

Purpose

Add ForbiddenException to method signatures in interfaces and default implementations to handle cases where operations are forbidden. . This is needed as part of fine-grained scope validation. In the SCIM layer, fine-grained scope validation checks will be performed; if the scope is not available, the ForbiddenException will be thrown.

Similar PR:

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 30.48%. Comparing base (c115afa) to head (67e404e).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
.../core/protocol/endpoints/GroupResourceManager.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #437      +/-   ##
============================================
+ Coverage     30.47%   30.48%   +0.01%     
  Complexity     1020     1020              
============================================
  Files           134      134              
  Lines         13315    13320       +5     
  Branches       2566     2567       +1     
============================================
+ Hits           4058     4061       +3     
- Misses         8753     8754       +1     
- Partials        504      505       +1     
Flag Coverage Δ
unit 29.79% <0.00%> (+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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

*/
Role createRole(Role role) throws CharonException, ConflictException, NotImplementedException, BadRequestException;
Role createRole(Role role) throws CharonException, ConflictException, NotImplementedException,
BadRequestException, ForbiddenException;
Copy link
Contributor

Choose a reason for hiding this comment

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

won't this introduce any behavioural change? Then we have to do a version bump

Copy link
Contributor

Choose a reason for hiding this comment

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

So far ForbiddenException was not thrown.

Now also throwing for the cases introduced in this effort.

Do we still need to consider this as a behavioural change?

@asha15 asha15 marked this pull request as draft July 9, 2025 06:04
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