Skip to content

Solve issues #590-#593: Add RBAC docs, email templates, fraud alerts,…#655

Merged
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
sandrawillow001-afk:feature/issues-590-593
Jun 1, 2026
Merged

Solve issues #590-#593: Add RBAC docs, email templates, fraud alerts,…#655
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
sandrawillow001-afk:feature/issues-590-593

Conversation

@sandrawillow001-afk
Copy link
Copy Markdown
Contributor

… 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

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@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! 🚀

Learn more about application limits

Copy link
Copy Markdown
Contributor

@nanaf6203-bit nanaf6203-bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nanaf6203-bit nanaf6203-bit merged commit 09bcacb into MettaChain:main Jun 1, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants