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

feat: refactored billing plan endpoints to include restrictions to authorized users (super-admin, billing and org_owner) #1226

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

Conversation

Celnet-hub
Copy link

@Celnet-hub Celnet-hub commented Mar 2, 2025

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?

  • Manual testing was conducted using Postman to confirm that unauthorized users receive appropriate error messages.
  • Existing test cases were run to ensure no regressions.

Screenshots

  1. Authorization function implementation:

    image

  2. Usage in endpoints:

    image

  3. 403 Forbidden response in Postman:
    image

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…thorized users (super-admin, billing and org_owner)
@Celnet-hub Celnet-hub changed the title Feat: Refactored billing plan endpoints to include restrictions to authorized users (super-admin, billing and org_owner) feat: refactored billing plan endpoints to include restrictions to authorized users (super-admin, billing and org_owner) Mar 2, 2025
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.

2 participants