-
first check login user role
-
then the
if(RoleUser === "SuperAdmin"){
-
and if RoleUser not equal to SuperAdmin rederect to login page
-
in this project the unauthorized access prevent using
-
- client/src/components/UnauthorizedAccess.jsx
-
and all routes are protected by using
-
- client/src/components/PrivateRoute.jsx
if any user try to access routes that user cannot access, the user will be suspended
exmaple:
if user type user try to access SuperAdmin dashboard the user's account will autometicaly suspended by the system
- this is same as all items in the system
- this is same as all items in the system
- this is same as all items in the system
-
When User login to the System,
-
The User try to access routes, that the user doesn't have any access, the System autometicaly suspend that user
-
As Example:
-
- if user type user try to access to the SuperAdmin Dashbaord the System autometicaly suspend that user's Account
- after this when user try to relogin to the system, but the system doesn't give persmision to do it because that user is suspended.
-
According to this, the SuperAdmin of the System only reactivate the Suspeded accouts
-
if are there any Suspended users in the System SuperAdmin can view it at the SuperAdmin Dashbord
- Account Reactivation