Logo Executive is your partner in logo exploration. Our platform boasts a collection of APIs designed to simplify the process of obtaining company logos.
closes #311
Implemented Admin dashboard only accessible to userType: ADMIN.
Description
Modified the ProtectedRoute utility component to accept an adminOnly prop. When set to true, the component will check if the authenticated user's userType is 'ADMIN'.
If the user is an admin, they will be granted access to the protected route.
If the user is not an admin, they will be redirected to the /welcome route.
If the user is not authenticated, they will be redirected to Signin page.
How to Test the Changes
Sign in as a non-admin user.
Attempt to navigate to the /admin route. You should be redirected to the /welcome route.
Sign in as an admin user.
Navigate to the /admin route. You should be able to access the Admin Dashboard.
Summary
closes #311 Implemented Admin dashboard only accessible to userType: ADMIN.
Description
Modified the ProtectedRoute utility component to accept an
adminOnly
prop. When set totrue
, the component will check if the authenticated user'suserType
is'ADMIN'
. If the user is an admin, they will be granted access to the protected route. If the user is not an admin, they will be redirected to the/welcome
route. If the user is not authenticated, they will be redirected to Signin page.How to Test the Changes
/admin
route. You should be redirected to the/welcome
route./admin
route. You should be able to access the Admin Dashboard.Context (Optional)
Screenshots or Recordings (Optional)
https://github.com/TeamShiksha/logoexecutive/assets/88454618/75998e5b-2fcc-4372-9f49-a392ca6f645a
Checklist