Solve issues #590-#593: Add RBAC docs, email templates, fraud alerts,…#655
Merged
nanaf6203-bit merged 2 commits intoJun 1, 2026
Merged
Conversation
…lates, fraud alerts, transaction notifications, and CI pipeline
|
@sandrawillow001-afk 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! 🚀 |
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.
… transaction notifications, and CI pipeline
#593: Add RBAC endpoint permission matrix documentation
Created comprehensive RBAC permission matrix documentation in docs/RBAC_Permission_Matrix.md
Documented all protected endpoints across auth, users, properties, transactions, documents, admin, neighborhoods, verification documents, user preferences, activity logs, and webhooks
Clearly listed role access rights for USER, AGENT, and ADMIN roles
Added implementation details, security best practices, and testing guidelines
#592: Add email template preview support in documentation
Created detailed email templates documentation in docs/Email_Templates.md
Documented all existing email templates with sample payloads and variable references
Added preview examples for password-reset, account-locked, fraud-alert templates
Created new transaction status email templates (pending, completed, cancelled)
Added admin preview endpoint at GET /admin/email/preview/:templateName in admin controller
Included testing guidelines, API documentation, and best practices
#591: Add admin notification on suspicious fraud alerts
Enhanced fraud alert notification system with duplicate suppression
Added logic to send notifications only when severity increases or every 5th occurrence
Updated notifySecurityTeam method to distinguish between new and updated alerts
Added occurrence count tracking to prevent admin notification spam
Fraud alerts now include metadata and reason in notifications
#590: Add transaction status change notification templates
Created three new email templates for transaction status changes:
transaction-status-pending.ejs - for new transactions
transaction-status-completed.ejs - for completed transactions
transaction-status-cancelled.ejs - for cancelled transactions
Added sendTransactionStatusEmail method to EmailService
Updated NotificationsService to use new transaction status templates
Templates include all relevant transaction details (property, parties, amount, dates, blockchain hash)
CI/CD Pipeline
Created GitHub Actions workflow in .github/workflows/ci.yml
Added lint, test, and build jobs
Configured deployment jobs for staging (develop branch) and production (main branch)
Set up Node.js 18 with npm caching
Testing
All changes follow existing code patterns and conventions
Email templates use EJS syntax consistent with existing templates
RBAC documentation covers all current endpoints
Fraud alert suppression prevents notification spam while ensuring critical alerts are sent
closes #593
closes #592
closes #591
closes #590