UNPKG

@payloadcms/plugin-multi-tenant

Version:
15 lines 830 B
import type { Access, AccessArgs, AccessResult, AllOperations, CollectionConfig } from 'payload'; import type { MultiTenantPluginConfig } from '../types.js'; type Args<ConfigType> = { accessFunction?: Access; adminUsersSlug: string; collection: CollectionConfig; fieldName: string; operation: AllOperations; tenantsArrayFieldName?: string; tenantsArrayTenantFieldName?: string; userHasAccessToAllTenants: Required<MultiTenantPluginConfig<ConfigType>>['userHasAccessToAllTenants']; }; export declare const withTenantAccess: <ConfigType>({ accessFunction, adminUsersSlug, collection, fieldName, tenantsArrayFieldName, tenantsArrayTenantFieldName, userHasAccessToAllTenants, }: Args<ConfigType>) => (args: AccessArgs) => Promise<AccessResult>; export {}; //# sourceMappingURL=withTenantAccess.d.ts.map