This commit is contained in:
Timothy Jaeryang Baek
2026-07-14 00:48:40 -04:00
parent 84e4d6ef82
commit f1584b5a37
46 changed files with 335 additions and 378 deletions
@@ -8,6 +8,8 @@
export let show = false;
export let shareUsers = true;
export let allowGroups = true;
export let accessGrants: { principal_type: string; principal_id: string }[] = [];
export let onAdd = (payload: { userIds: string[]; groupIds: string[] }) => {};
let userIds: string[] = [];
@@ -55,9 +57,10 @@
<MemberSelector
bind:userIds
bind:groupIds
includeGroups={true}
includeGroups={allowGroups}
includeUsers={shareUsers}
includeSessionUser={true}
includeSessionUser={false}
{accessGrants}
/>
</div>
@@ -22,6 +22,7 @@
export let includeUsers = true;
export let pagination = false;
export let includeSessionUser = false;
export let accessGrants: { principal_type: string; principal_id: string }[] = [];
export let groupIds = [];
export let userIds = [];
@@ -247,7 +248,7 @@
<div>
{#each users as user, userIdx (user.id)}
{#if includeSessionUser || user?.id !== $_user?.id}
{#if !accessGrants.some((grant) => grant.principal_type === 'user' && grant.principal_id === user.id) && (includeSessionUser || user?.id !== $_user?.id)}
<button
class=" dark:border-gray-850 text-xs flex items-center justify-between w-full"
type="button"