Skip to content

Commit

Permalink
Match the tenantsArrayField config as defined in the MultiTenantPlugi…
Browse files Browse the repository at this point in the history
…nConfig type
  • Loading branch information
bratvanov committed Feb 7, 2025
1 parent 13fa42b commit 810efda
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions docs/plugins/multi-tenant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ type MultiTenantPluginConfig<ConfigTypes = unknown> = {
* Access configuration for the array field
*/
arrayFieldAccess?: ArrayField['access']
/**
* Name of the array field
*
* @default 'tenants'
*/
arrayFieldName?: string
/**
* Name of the tenant field
*
* @default 'tenant'
*/
arrayTenantFieldName?: string
/**
* When `includeDefaultField` is `true`, the field will be added to the users collection automatically
*/
Expand All @@ -134,24 +146,11 @@ type MultiTenantPluginConfig<ConfigTypes = unknown> = {
* Access configuration for the tenant field
*/
tenantFieldAccess?: RelationshipField['access']
/**
* Name of the array field that stores tenant relationships
* @default 'tenants'
*/
tenantsArrayFieldName?: string
/**
* Name of the field within the array that stores the tenant relationship
* @default 'tenant'
*/
tenantsArrayTenantFieldName?: string
/**
* Collection slug where tenants are stored
* @default 'tenants'
*/
tenantsCollectionSlug?: string
}
| {
arrayFieldAccess?: never
arrayFieldName?: string
arrayTenantFieldName?: string
/**
* When `includeDefaultField` is `false`, you must include the field on your users collection manually
*/
Expand Down

0 comments on commit 810efda

Please sign in to comment.