Type alias DAOSecurityPolicy<T, Permissions, SecurityDomain>
DAOSecurity
Policy
<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
-
-
Permissions extends string
-
SecurityDomain extends Record<string, unknown>