Type alias DAOSecurityPolicy<T, Permissions, SecurityDomain>

DAOSecurityPolicy<T, Permissions, SecurityDomain>: {
    defaultPermissions?: CRUDPermission<T>;
    permissions?: { [ Key in Permissions]?: CRUDPermission<T> };
} & ([SecurityDomain] extends [never] ? {
    domain?: never;
} : keyof Required<SecurityDomain> extends keyof T["plainModel"] ? {
    domain?: { [ K in keyof Required<SecurityDomain>]: keyof T["plainModel"] | null | {
        or: (keyof T["plainModel"])[];
    } | {
        and: (keyof T["plainModel"])[];
    } };
} : {
    domain: { [ K in keyof Required<SecurityDomain>]?: keyof T["plainModel"] | null | {
        or: (keyof T["plainModel"])[];
    } | {
        and: (keyof T["plainModel"])[];
    } };
})

Type Parameters

  • T extends DAOGenerics

  • Permissions extends string

  • SecurityDomain extends Record<string, unknown>

Generated using TypeDoc