From e8200570ecf4d0dc5ed1812cac31a448169e2bf7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 27 Feb 2024 16:04:46 +0100 Subject: [PATCH] Fix readonly fields --- .../src/pages/builder/portal/users/groups/[groupId].svelte | 2 +- .../portal/users/groups/_components/EditUserPicker.svelte | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte b/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte index 1d2fed6ee1..c7ecaf1d34 100644 --- a/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte +++ b/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte @@ -48,7 +48,7 @@ let editModal, deleteModal $: group = $groups.find(x => x._id === groupId) - $: readonly = !sdk.users.isAdmin($auth.user) + $: readonly = !sdk.users.isAdmin($auth.user) || group?.scimInfo?.isSync $: groupApps = $apps .filter(app => groups.actions diff --git a/packages/builder/src/pages/builder/portal/users/groups/_components/EditUserPicker.svelte b/packages/builder/src/pages/builder/portal/users/groups/_components/EditUserPicker.svelte index cc524f1acf..8cec28a0ef 100644 --- a/packages/builder/src/pages/builder/portal/users/groups/_components/EditUserPicker.svelte +++ b/packages/builder/src/pages/builder/portal/users/groups/_components/EditUserPicker.svelte @@ -2,8 +2,7 @@ import { Button, Popover, notifications } from "@budibase/bbui" import UserGroupPicker from "components/settings/UserGroupPicker.svelte" import { createPaginationStore } from "helpers/pagination" - import { auth, groups, users } from "stores/portal" - import { sdk } from "@budibase/shared-core" + import { groups, users } from "stores/portal" export let groupId export let onUsersUpdated @@ -14,7 +13,6 @@ let prevSearch = undefined let pageInfo = createPaginationStore() - $: readonly = !sdk.users.isAdmin($auth.user) $: page = $pageInfo.page $: searchUsers(page, searchTerm) $: group = $groups.find(x => x._id === groupId) @@ -43,7 +41,7 @@
- +