Best Generic Way to Check if user has permissions

I’m not quite sure what you are asking, do you just want to get a list of permissions the role the user is assigned to has? Or are you looking for more advanced control other than just “User has access to this controller”. If its the more advanced control you will want to handle this with policies, however socket.io may be bypassing permissions entirely depending on where it’s defined.