I am building an app with the T3 stack, so I have all the bells and whistles that it provides, including NextAuth
I am getting ready to open the application for beta users, but I would like to limit their actions. I've already implemented a
role
role
that I leverage to display admin-only components on the UI.
The thing is that I would like to limit the amount of information the user is able to save into the database. I was checking out shadcn Taxonomy demo project (https://github.com/shadcn-ui/taxonomy/blob/main/app/api/posts/route.ts) and it seems to me that I should add a check for every route that I want to limit the user.
Is this the best approach or there is something more "centralized" that will allow us to implement such feature?