Interface: CanProps
Defined in: packages/sveltekit/src/props.ts:15
Props of <Can>. Conditions are ANDed; without any condition nothing passes (deny by default).
svelte
<Can permission="articles.edit">...</Can>
<Can anyOf={['articles.edit', 'articles.delete']}>
...
{#snippet fallback()}No access{/snippet}
</Can>Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
allOf? | NameList | Passes with ALL of these permissions. | packages/sveltekit/src/props.ts:21 |
anyOf? | NameList | Passes with ANY of these permissions. | packages/sveltekit/src/props.ts:19 |
children? | Snippet<[]> | - | packages/sveltekit/src/props.ts:24 |
fallback? | Snippet<[]> | Rendered when the check fails. | packages/sveltekit/src/props.ts:26 |
not? | boolean | Invert the check (render children when the user does NOT have the permissions). | packages/sveltekit/src/props.ts:23 |
permission? | NameList | The permission, or a list of permissions that are ALL required. | packages/sveltekit/src/props.ts:17 |
