Fix group edition display for builders

This commit is contained in:
Adria Navarro 2024-03-12 08:40:16 +01:00
parent 6f2f5fd5ce
commit 75df04fbda
1 changed files with 8 additions and 3 deletions

View File

@ -49,7 +49,8 @@
$: group = $groups.find(x => x._id === groupId)
$: isScimGroup = group?.scimInfo?.isSync
$: readonly = !sdk.users.isAdmin($auth.user) || isScimGroup
$: isAdmin = sdk.users.isAdmin($auth.user)
$: readonly = !isAdmin || isScimGroup
$: groupApps = $apps
.filter(app =>
groups.actions
@ -123,14 +124,18 @@
<span slot="control">
<Icon hoverable name="More" />
</span>
<MenuItem icon="Refresh" on:click={() => editModal.show()}>
<MenuItem
icon="Refresh"
on:click={() => editModal.show()}
disabled={!isAdmin}
>
Edit
</MenuItem>
<div title={isScimGroup && "Group synced from your AD"}>
<MenuItem
icon="Delete"
on:click={() => deleteModal.show()}
disabled={isScimGroup}
disabled={readonly}
>
Delete
</MenuItem>