@payloadcms/plugin-multi-tenant
Version:
Multi Tenant plugin for Payload
17 lines • 776 B
TypeScript
import type { CollectionConfig } from 'payload';
import type { MultiTenantPluginConfig } from '../types.js';
type Args<ConfigType> = {
adminUsersSlug: string;
collection: CollectionConfig;
fieldName: string;
tenantsArrayFieldName?: string;
tenantsArrayTenantFieldName?: string;
userHasAccessToAllTenants: Required<MultiTenantPluginConfig<ConfigType>>['userHasAccessToAllTenants'];
};
/**
* Adds tenant access constraint to collection
* - constrains access a users assigned tenants
*/
export declare const addCollectionAccess: <ConfigType>({ adminUsersSlug, collection, fieldName, tenantsArrayFieldName, tenantsArrayTenantFieldName, userHasAccessToAllTenants, }: Args<ConfigType>) => void;
export {};
//# sourceMappingURL=addCollectionAccess.d.ts.map