many_to_many :all_posts, MishkaBlog.BlogPost do description "All blog posts (bypass tenant) that belong to this collection" through MishkaBlog.PostCollection source_attribute_on_join_resource :collection_id destination_attribute_on_join_resource :post_id read_action :read_any # multitenancy :bypass # Only allow loading if actor has no tenant (master admin) filter expr(is_nil(^actor(:tenant_id))) end
many_to_many :all_posts, MishkaBlog.BlogPost do description "All blog posts (bypass tenant) that belong to this collection" through MishkaBlog.PostCollection source_attribute_on_join_resource :collection_id destination_attribute_on_join_resource :post_id read_action :read_any # multitenancy :bypass # Only allow loading if actor has no tenant (master admin) filter expr(is_nil(^actor(:tenant_id))) end
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.