Skip to content

Commit 6eefa43

Browse files
committed
docs: regenerate resource DSL cheat sheet
1 parent a43d2c5 commit 6eefa43

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

documentation/dsls/DSL-Ash.Resource.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4333,6 +4333,7 @@ end
43334333
|------|------|---------|------|
43344334
| [`strategy`](#multitenancy-strategy){: #multitenancy-strategy } | `:context \| :attribute` | `:context` | Determine if multitenancy is performed with attribute filters or using data layer features. |
43354335
| [`attribute`](#multitenancy-attribute){: #multitenancy-attribute } | `atom` | | If using the `attribute` strategy, the attribute to use, e.g `org_id` |
4336+
| [`ancestor_attributes`](#multitenancy-ancestor_attributes){: #multitenancy-ancestor_attributes } | `list(atom)` | `[]` | If using the `attribute` strategy with hierarchical tenants, the attributes identifying the tenant's ancestors, from broadest to narrowest, e.g `[:organization_id]` when `attribute` is `department_id` (or `[:organization_id, :department_id]` when `attribute` is `team_id`). Ancestor values are derived from the tenant via the `Ash.ToAncestorTenants` protocol, are applied to all tenant filters and creates, and data layers prefix indexes with them. |
43364337
| [`global?`](#multitenancy-global?){: #multitenancy-global? } | `boolean` | `false` | Whether or not the data may be accessed without setting a tenant. For example, with attribute multitenancy, this allows accessing without filtering by the tenant attribute. |
43374338
| [`parse_attribute`](#multitenancy-parse_attribute){: #multitenancy-parse_attribute } | `mfa` | `{Ash.Resource.Dsl, :identity, []}` | An mfa ({module, function, args}) pointing to a function that takes a tenant and returns the attribute value |
43384339
| [`tenant_from_attribute`](#multitenancy-tenant_from_attribute){: #multitenancy-tenant_from_attribute } | `mfa` | `{Ash.Resource.Dsl, :identity, []}` | An mfa ({module, function, args}) pointing to a function that takes an attribute value and returns the tenant. This is the inverse of `parse_attribute`. |

0 commit comments

Comments
 (0)