Feat/311 sensitive action stepup confirmation - #409
Conversation
|
@Stanley471 is attempting to deploy a commit to the Deen Bridge Team on Vercel. A member of the Team first needs to authorize it. |
|
@Stanley471 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! 🚀 |
|
Warning Review limit reachedNext included review available in 55 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Strict review blocker: this branch conflicts with the base branch, and |
|
Strict review blocker: this branch has merge conflicts with the base branch and/or failing deployment checks. Please rebase, resolve conflicts, and restore checks before requesting merge. |
|
conflicts resolved |
|
Strict review blocker: this branch conflicts with the base branch, and , , and are failing. Please rebase, resolve conflicts, and restore checks. |
|
@Stanley471 this PR has merge conflicts with the |
Title
feat(admin): Sensitive-action step-up confirmation pattern (#311)
Summary
Creates a reusable step-up confirmation modal (
StepUpConfirmModal) for destructive admin operations requiring exact target-derived typed phrases and client-side rate-limiting cooldown protection. Applies this pattern across three core reference flows: Bans, Refunds, and Role Grants.Key Changes
lib/utils/rateLimiter.js):components/admin/StepUpConfirmModal.jsx):BAN user@example.com,REFUND PLT-10042,GRANT SUPER_ADMIN bilal@deenbridge.org).app/[locale]/admin/users/page.jsx): Banning a user requires typingBAN <user.email>.app/[locale]/admin/users/page.jsx): Elevating privileges / granting roles requires typingGRANT <ROLE> <user.email>.app/[locale]/admin/payments/disputes/page.jsx): Authorizing dispute refunds requires typingREFUND <dispute.transactionId>.__tests__/admin/StepUpConfirmModal.test.jsx):How to Test
/admin/users, select Ban User Account from the user dropdown. Verify phraseBAN <user.email>is required; verify submit button stays disabled until typed phrase matches exactly./admin/users, select Grant Super Admin Role from the user dropdown. Verify phraseGRANT SUPER_ADMIN <user.email>is required./admin/payments/disputes, click Resolve with Refund (Step-Up). Verify phraseREFUND <transactionId>is required.Closes #311