This commit is contained in:
Timothy Jaeryang Baek
2026-02-09 13:28:21 -06:00
parent f7406ff576
commit 3c7f9aa6a4
27 changed files with 789 additions and 253 deletions
@@ -1,4 +1,4 @@
<script>
<script lang="ts">
import { getContext } from 'svelte';
const i18n = getContext('i18n');
@@ -6,8 +6,16 @@
import AccessControl from './AccessControl.svelte';
import XMark from '$lib/components/icons/XMark.svelte';
type AccessGrant = {
id?: string;
principal_type: 'user' | 'group';
principal_id: string;
permission: 'read' | 'write';
};
export let show = false;
export let accessControl = {};
export let accessGrants: AccessGrant[] = [];
export let accessControl: any = undefined;
export let accessRoles = ['read'];
export let share = true;
@@ -33,7 +41,14 @@
</div>
<div class="w-full px-5 pb-4 dark:text-white">
<AccessControl bind:accessControl {onChange} {accessRoles} {share} {sharePublic} />
<AccessControl
bind:accessGrants
bind:accessControl
{onChange}
{accessRoles}
{share}
{sharePublic}
/>
</div>
</div>
</Modal>