Use exception class Forbidden to raise 403 errors.#6038
Open
Aadesh-Baral wants to merge 10 commits intodevelopfrom
Open
Use exception class Forbidden to raise 403 errors.#6038Aadesh-Baral wants to merge 10 commits intodevelopfrom
Forbidden to raise 403 errors.#6038Aadesh-Baral wants to merge 10 commits intodevelopfrom
Conversation
2eb2f3f to
c7f9972
Compare
----------------------------------- The current setup for deleting a project involves conflicting permission checks. In the resource class function, users with a Project Manager (PM) role are allowed to delete projects. However, in the service function responsible for project deletion, the check only permits organization managers or system administrators to perform this action. To address this inconsistency in permission checks, this commit streamlines the process. It eliminates the permission check within the service function, thereby enabling users with PM roles within a project to successfully initiate project deletions.
… correct error response can be returned
-------------------------------------------------------------------- Previously, we utilized the same error reason, namely "USER_NOT_ON_ALLOWED_LIST," for two distinct situations: 1. When a user, who is blocked, attempts to map/validate a task. 2. When a user lacks the necessary permissions to map/validate. To enhance clarity and precision in error reporting, we have introduced a distinct error reason for the scenario where a user is blocked. This modification allows us to deliver more accurate and contextually relevant error messages, ultimately improving the user experience and troubleshooting process.
2cf4b32 to
0a8cb8f
Compare
…s this is already checked in resource function
0a8cb8f to
a314b91
Compare
----------------------- After the introduction of new exception classes on backend the error response format is changed. As in new error response error subcode should be accessed on error.sub_code this commit handles this case. Also change in subcode to identify project is private and cannot be accessed by user has been addressed.
a314b91 to
a7d9034
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Part of #5911, #5912