Repository navigation
fix: role-based access control separation for payment router admin - #981
Open
emmixeryng wants to merge 6 commits into
Open
emmixeryng wants to merge 6 commits into
emmixeryng wants to merge 6 commits into
Conversation
|
@emmixeryng is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
Kindly resolve conflicts |
|
@emmixeryng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Author
|
@Abdulazeem-code — this PR is ready for another review. I fixed the failing CI checks on this PR (pushed 7b066c8). |
emmixeryng
force-pushed
the
security/issue-892-contract-role-based-access-control-rbac
branch
from
October 22, 2026 06:59
5f348d0 to
d58e301
Compare
Strips the payload this branch picked up (deleted api.js, truncated payment-dashboard/vite.config.js, unhooked package.json). No functional change to the branch's own work.
This branch has not been deployed
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.
Overview
This PR introduces granular Role-Based Access Control (RBAC) to the
payment_routercontract, replacing the single shared admin/multi-sig authority with three distinct roles:FeeManager,SecurityOfficer, andUpgradeManager. Each administrative method is now gated to its designated role, enforcing the principle of least privilege across fee, security, and upgrade operations.Related Issue
Changes
🔐 RBAC Separation
[MODIFY]
payment_router/src/access.rsRoleenum withFeeManager,SecurityOfficer, andUpgradeManagervariants.DataKey::Role(Role, Address)storage key holding a boolean role assignment.require_roleguard used by administrative entrypoints.FeeManager; pause/unpause →SecurityOfficer; contract upgrade →UpgradeManager.[MODIFY]
payment_router/src/lib.rs[MODIFY]
payment_router/src/errors.rsVerification Results
DataKey::Role(Role, Address)stores boolean role assignmentsaccess.rsCloses #892