defmodule MyAPP.Accounts.User do
use Ash.Resource,
domain: MyAPP.Accounts,
data_layer: AshPostgres.DataLayer,
authorizers: [Ash.Policy.Authorizer]
# Multitenancy Configuration
multitenancy do
strategy :attribute
attribute :organization_id
global? false # Tenant-specific scoping only
end
# Base Filter for Tenant Isolation
base_filter do
filter expr(organization_id == ^tenant(:organization_id))
end
end```
undefined function base_filter/1 (there is no such import)
https://hexdocs.pm/ash/dsl-ash-resource.html#resource-base_filter
A search for base_filter
in our documentation takes you to an example (scroll up slightly).
1 Like
Thanks @zachdaniel