Check if Role is ADMIN
Hey guys I have a private procedure in
T3 Stack
. I need to check if the user thats doing the action is indeed admin.
How can i implement that in this privateProcedure
?
1 Reply
Authorization | tRPC
The createContext function is called for each incoming request, so here you can add contextual information about the calling user from the request object.