Allow editing non scim groups
This commit is contained in:
parent
39086fcd99
commit
7891e99cf7
|
@ -47,9 +47,8 @@
|
|||
let loaded = false
|
||||
let editModal, deleteModal
|
||||
|
||||
$: scimEnabled = $features.isScimEnabled
|
||||
$: readonly = !sdk.users.isAdmin($auth.user) || scimEnabled
|
||||
$: group = $groups.find(x => x._id === groupId)
|
||||
$: readonly = !sdk.users.isAdmin($auth.user) || group?.scimInfo?.isSync
|
||||
$: groupApps = $apps
|
||||
.filter(app =>
|
||||
groups.actions
|
||||
|
@ -135,7 +134,7 @@
|
|||
</div>
|
||||
|
||||
<Layout noPadding gap="S">
|
||||
<GroupUsers {groupId} {group} />
|
||||
<GroupUsers {groupId} {readonly} />
|
||||
</Layout>
|
||||
|
||||
<Layout noPadding gap="S">
|
||||
|
|
|
@ -5,14 +5,13 @@
|
|||
import { fetchData } from "@budibase/frontend-core"
|
||||
import { goto } from "@roxi/routify"
|
||||
import { API } from "api"
|
||||
import { auth, features, groups } from "stores/portal"
|
||||
import { groups } from "stores/portal"
|
||||
import { setContext } from "svelte"
|
||||
import ScimBanner from "../../_components/SCIMBanner.svelte"
|
||||
import RemoveUserTableRenderer from "../_components/RemoveUserTableRenderer.svelte"
|
||||
import { sdk } from "@budibase/shared-core"
|
||||
|
||||
export let groupId
|
||||
export let group
|
||||
export let readonly
|
||||
|
||||
let emailSearch
|
||||
let fetchGroupUsers
|
||||
|
@ -50,9 +49,6 @@
|
|||
},
|
||||
]
|
||||
|
||||
$: scimEnabled = $features.isScimEnabled && group.scimInfo?.isSync
|
||||
$: readonly = !sdk.users.isAdmin($auth.user) || scimEnabled
|
||||
|
||||
const removeUser = async id => {
|
||||
await groups.actions.removeUser(groupId, id)
|
||||
fetchGroupUsers.refresh()
|
||||
|
@ -64,7 +60,7 @@
|
|||
</script>
|
||||
|
||||
<div class="header">
|
||||
{#if !scimEnabled}
|
||||
{#if !readonly}
|
||||
<EditUserPicker {groupId} onUsersUpdated={fetchGroupUsers.getInitialData} />
|
||||
{:else}
|
||||
<ScimBanner />
|
||||
|
|
Loading…
Reference in New Issue