feat: refactored billing plan endpoints to include restrictions to authorized users (super-admin, billing and org_owner) #1226
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.
Topic - Feat: Restrict Billing Information Modification to Authorized Users
Description
This PR implements access control measures to ensure that only authorized users can modify billing information. Unauthorized users attempting to modify billing details will be restricted, enhancing security and data integrity.
Related Issue
Issue #995
Motivation and Context
This change is necessary to prevent unauthorized modifications to billing information, which could lead to security risks and financial inconsistencies. By enforcing role-based access control (RBAC), we ensure that only users with the correct permissions can update billing details.
How Has This Been Tested?
Screenshots
Authorization function implementation:
Usage in endpoints:
403 Forbidden response in Postman:

Types of changes
Checklist