-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Use exception class Forbidden
to raise 403 errors.
#6038
Open
Aadesh-Baral
wants to merge
10
commits into
develop
Choose a base branch
from
enhance/5912-403-error
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Aadesh-Baral
force-pushed
the
enhance/5912-403-error
branch
from
August 28, 2023 08:52
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.
Aadesh-Baral
force-pushed
the
enhance/5912-403-error
branch
2 times, most recently
from
August 29, 2023 08:17
2cf4b32
to
0a8cb8f
Compare
…s this is already checked in resource function
Aadesh-Baral
force-pushed
the
enhance/5912-403-error
branch
from
August 30, 2023 05:44
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.
Aadesh-Baral
force-pushed
the
enhance/5912-403-error
branch
from
August 30, 2023 10:41
a314b91
to
a7d9034
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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