Use of current_tenant throughout app
I am trying to build a multi tenant app and currently have things working placing this
socket.assigns.current_tenant
in every place where I am about to do a query
I was wondering if there is a better way.. maybe a way to have all queries include socket.assigns.current_user
as the tenant instead of manually putting it everywhere. Not sure if I am making sense! :pSolution:Jump to solution
It makes sense but we don't do it that way on purpose. It can have strange side effects to do magical things like that.
1 Reply
Solution
It makes sense but we don't do it that way on purpose. It can have strange side effects to do magical things like that.