You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, only some routes are being protected and can be used only by admins. The plan is to add such protection for all other user types.
For example -
Only extractors should be able to access extraction routes
Only management should be able to access case routes
Also currently, for all admin routes, we're manually checking in every single route, which creates a lot of repeated code, and it will also be a hassle to change it in the future.
Describe the solution you'd like
We can create decorator functions for each access level.
For example - I can create a decorator called 'extractor_only;
And if I just add that decorator to a route, then that route would be accessible to only extractors. I wouldn't have to manually write the logic in each route.
Describe alternatives you've considered
N/A
Additional context
I'll soon submit a PR for it.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, only some routes are being protected and can be used only by admins. The plan is to add such protection for all other user types.
For example -
Also currently, for all admin routes, we're manually checking in every single route, which creates a lot of repeated code, and it will also be a hassle to change it in the future.
Describe the solution you'd like
We can create decorator functions for each access level.
For example - I can create a decorator called 'extractor_only;
And if I just add that decorator to a route, then that route would be accessible to only extractors. I wouldn't have to manually write the logic in each route.
Describe alternatives you've considered
N/A
Additional context
I'll soon submit a PR for it.
The text was updated successfully, but these errors were encountered: