Closed Anshul-Sharma01 closed 1 month ago
Hey, this is a great idea! However, we don't plan to implement role-based features in the project for now. We already have protected routing in place using context, so if you're interested in improving that, feel free to propose your workflow again with those adjustments. Let me know what you think!
Okk then for now can I just make a denied page for inaccessible routes for a particular user and would see if i can improve your current implementation of the route protection.
Okk then for now can I just make a denied page for inaccessible routes for a particular user and would see if i can improve your current implementation of the route protection.
Absolutely, feel free to create a new issue along with your proposed workflow. I recommend focusing on one specific task at a time, as multiple changes will still count as a single pull request. By concentrating on smaller features and documenting each as a separate issue, you can effectively streamline your contributions.
I would like to propose refactoring of the current route access logic by implementing a centralized RequireAuth component. This component will allow us to define role-based restrictions for specific routes and redirect unauthorized users to a denied page. Here’s what I plan to do:
This enhancement will improve maintainability and provide a cleaner approach to route access control.
I want to work under this issue for hacktoberfest, please assign this issue to me.