Don't allow deleting users from group
This commit is contained in:
parent
76f6c86c0a
commit
4ba0cf6d55
|
@ -14,7 +14,7 @@
|
||||||
} from "@budibase/bbui"
|
} 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 { users, apps, groups, auth } from "stores/portal"
|
import { users, apps, groups, auth, licensing } from "stores/portal"
|
||||||
import { onMount, setContext } from "svelte"
|
import { onMount, setContext } from "svelte"
|
||||||
import { roles } from "stores/backend"
|
import { roles } from "stores/backend"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
|
@ -27,15 +27,19 @@
|
||||||
|
|
||||||
export let groupId
|
export let groupId
|
||||||
|
|
||||||
const userSchema = {
|
$: userSchema = {
|
||||||
email: {
|
email: {
|
||||||
width: "1fr",
|
width: "1fr",
|
||||||
},
|
},
|
||||||
_id: {
|
...(readonly
|
||||||
displayName: "",
|
? {}
|
||||||
width: "auto",
|
: {
|
||||||
borderLeft: true,
|
_id: {
|
||||||
},
|
displayName: "",
|
||||||
|
width: "auto",
|
||||||
|
borderLeft: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
const appSchema = {
|
const appSchema = {
|
||||||
name: {
|
name: {
|
||||||
|
@ -70,7 +74,9 @@
|
||||||
let loaded = false
|
let loaded = false
|
||||||
let editModal, deleteModal
|
let editModal, deleteModal
|
||||||
|
|
||||||
$: readonly = !$auth.isAdmin
|
const scimEnabled = $licensing.scimEnabled
|
||||||
|
|
||||||
|
$: readonly = !$auth.isAdmin || scimEnabled
|
||||||
$: page = $pageInfo.page
|
$: page = $pageInfo.page
|
||||||
$: fetchUsers(page, searchTerm)
|
$: fetchUsers(page, searchTerm)
|
||||||
$: group = $groups.find(x => x._id === groupId)
|
$: group = $groups.find(x => x._id === groupId)
|
||||||
|
|
Loading…
Reference in New Issue