The middleware should check if the user is authorized, and if so, check if the user has the required access rights to the page. The best option would be if there is a way to use middleware elegantly and with a small amount of code in all API functions.
The middleware should check if the user is authorized, and if so, check if the user has the required access rights to the page. The best option would be if there is a way to use middleware elegantly and with a small amount of code in all API functions.