Feature Proposal
I propose adding ProtectedRoute.jsx as an advanced Higher-Order Component (HOC) implementing strict hierarchical Role-Based Access Control (RBAC) for React routes using bitmask or role-level permissions.
Why is it God-Level?
Standard route protection just checks if a user is logged in. This implements a scalable, enterprise-level permission guard that can distinguish between STUDENT, MENTOR, and ADMIN seamlessly across the frontend.
Feature Proposal
I propose adding
ProtectedRoute.jsxas an advanced Higher-Order Component (HOC) implementing strict hierarchical Role-Based Access Control (RBAC) for React routes using bitmask or role-level permissions.Why is it God-Level?
Standard route protection just checks if a user is logged in. This implements a scalable, enterprise-level permission guard that can distinguish between
STUDENT,MENTOR, andADMINseamlessly across the frontend.