I am building an app where users can belong to different organizations. I want each organization to be it's own tenant ( https://hexdocs.pm/ash/multitenancy.html). When the user is logged in, they select a tenant, and can only have access to data from that tenant.
Is there a way call set_tenant in a router plug ( similar to Ash.PlugHelpers.set_actor(user) ) so that I can globally set the current tenant, without for any queries that might need it?
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.