Fix readonly fields

This commit is contained in:
Adria Navarro 2024-02-27 16:04:46 +01:00
parent ce998c456e
commit e8200570ec
2 changed files with 3 additions and 5 deletions

View File

@ -48,7 +48,7 @@
let editModal, deleteModal let editModal, deleteModal
$: group = $groups.find(x => x._id === groupId) $: group = $groups.find(x => x._id === groupId)
$: readonly = !sdk.users.isAdmin($auth.user) $: readonly = !sdk.users.isAdmin($auth.user) || group?.scimInfo?.isSync
$: groupApps = $apps $: groupApps = $apps
.filter(app => .filter(app =>
groups.actions groups.actions

View File

@ -2,8 +2,7 @@
import { Button, Popover, notifications } from "@budibase/bbui" import { Button, Popover, notifications } from "@budibase/bbui"
import UserGroupPicker from "components/settings/UserGroupPicker.svelte" import UserGroupPicker from "components/settings/UserGroupPicker.svelte"
import { createPaginationStore } from "helpers/pagination" import { createPaginationStore } from "helpers/pagination"
import { auth, groups, users } from "stores/portal" import { groups, users } from "stores/portal"
import { sdk } from "@budibase/shared-core"
export let groupId export let groupId
export let onUsersUpdated export let onUsersUpdated
@ -14,7 +13,6 @@
let prevSearch = undefined let prevSearch = undefined
let pageInfo = createPaginationStore() let pageInfo = createPaginationStore()
$: readonly = !sdk.users.isAdmin($auth.user)
$: page = $pageInfo.page $: page = $pageInfo.page
$: searchUsers(page, searchTerm) $: searchUsers(page, searchTerm)
$: group = $groups.find(x => x._id === groupId) $: group = $groups.find(x => x._id === groupId)
@ -43,7 +41,7 @@
</script> </script>
<div bind:this={popoverAnchor}> <div bind:this={popoverAnchor}>
<Button disabled={readonly} on:click={popover.show()} cta>Add user</Button> <Button on:click={popover.show()} cta>Add user</Button>
</div> </div>
<Popover align="right" bind:this={popover} anchor={popoverAnchor}> <Popover align="right" bind:this={popover} anchor={popoverAnchor}>
<UserGroupPicker <UserGroupPicker