busify icon indicating copy to clipboard operation
busify copied to clipboard

Create a AdminProtectedRoute component

Open prajjwalkapoor opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

Some routes like /admin/dashboard should be protected if the user is not an admin. Design a component that will act as a wrapper to a page and redirects users to the home page if they don't have an admin role.

For Example:

<AdminProtectedRoute>
    <AdminDashboard />
</AdminProtectedRoute>

Describe the solution you'd like

NA

Describe alternatives you've considered

No response

Developer Help

No response

prajjwalkapoor avatar Jul 01 '23 23:07 prajjwalkapoor

I would like to work on this issue. I will simply create a AdminProtectedRoute component which will redirect the user to home page if they are not admin otherwise rendered the wrapped Component .

parthksingh1 avatar Jul 02 '23 09:07 parthksingh1

@parthksingh1 sure

prajjwalkapoor avatar Jul 02 '23 10:07 prajjwalkapoor

@Pratik2026 I would like to work on this issue. I will create Admin Protected Route Component and will make sure to navigate it to home page if user is not admin

bravichandra12 avatar Jun 08 '24 17:06 bravichandra12

Sure @bravichandra12, you can start working on it.

Pratik2026 avatar Jun 09 '24 07:06 Pratik2026