Skip to content

feat: Add super-admin role protection for admin hub APIs [SPRW-3087]#955

Merged
LordNayan merged 1 commit intosparrowapp-dev:developmentfrom
mayankjha-eng:feat/SPRW-3087/simplifying-plan-changes
Mar 16, 2026
Merged

feat: Add super-admin role protection for admin hub APIs [SPRW-3087]#955
LordNayan merged 1 commit intosparrowapp-dev:developmentfrom
mayankjha-eng:feat/SPRW-3087/simplifying-plan-changes

Conversation

@mayankjha-eng
Copy link
Contributor

Description

Implemented role-based access control for admin hub management APIs by restricting them to super-admin users using the @roles("super-admin") guard.

This ensures that sensitive operations such as hub plan changes and other administrative actions can only be performed by users with super-admin privileges.

Additionally verified that plan update flows continue to work correctly with Stripe webhook processing without overriding admin-triggered changes.

Add Issue Number

SPRW-3087

Add Screenshots/GIFs

super-admin.role.protection.mp4

Add Known Issue

If applicable, add any known issues.

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • I have linked an issue to the pull request.
  • I have linked a PR type label to the pull request.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

@LordNayan LordNayan merged commit 8a0c8c6 into sparrowapp-dev:development Mar 16, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend pr-feature This PR adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants