Merge pull request #2446 from mslourens/disable_managing_users_with_client
Filter users table out of DataSource component and NewScreenModal
This commit is contained in:
commit
f0b8f0575e
|
@ -1,7 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { store, allScreens, selectedAccessRole } from "builderStore"
|
import { store, allScreens, selectedAccessRole } from "builderStore"
|
||||||
import { tables } from "stores/backend"
|
import { tables, roles } from "stores/backend"
|
||||||
import { roles } from "stores/backend"
|
|
||||||
import { Input, Select, ModalContent, Toggle } from "@budibase/bbui"
|
import { Input, Select, ModalContent, Toggle } from "@budibase/bbui"
|
||||||
import getTemplates from "builderStore/store/screenTemplates"
|
import getTemplates from "builderStore/store/screenTemplates"
|
||||||
import analytics from "analytics"
|
import analytics from "analytics"
|
||||||
|
@ -16,7 +15,7 @@
|
||||||
let createLink = true
|
let createLink = true
|
||||||
let roleId = $selectedAccessRole || "BASIC"
|
let roleId = $selectedAccessRole || "BASIC"
|
||||||
|
|
||||||
$: templates = getTemplates($store, $tables.list)
|
$: templates = getTemplates($store, tables.getDataSources())
|
||||||
$: route = !route && $allScreens.length === 0 ? "*" : route
|
$: route = !route && $allScreens.length === 0 ? "*" : route
|
||||||
$: {
|
$: {
|
||||||
if (templates && templateIndex === undefined) {
|
if (templates && templateIndex === undefined) {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
export let bindings = []
|
export let bindings = []
|
||||||
|
|
||||||
$: text = value?.label ?? "Choose an option"
|
$: text = value?.label ?? "Choose an option"
|
||||||
$: tables = $tablesStore.list.map(m => ({
|
$: tables = tablesStore.getDataSources().map(m => ({
|
||||||
label: m.name,
|
label: m.name,
|
||||||
tableId: m._id,
|
tableId: m._id,
|
||||||
type: "table",
|
type: "table",
|
||||||
|
|
|
@ -87,6 +87,7 @@ export function createTablesStore() {
|
||||||
draft: {},
|
draft: {},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getDataSources: () => get(store).list.filter(t => t.name !== "Users"),
|
||||||
delete: async table => {
|
delete: async table => {
|
||||||
await api.delete(`/api/tables/${table._id}/${table._rev}`)
|
await api.delete(`/api/tables/${table._id}/${table._rev}`)
|
||||||
update(state => ({
|
update(state => ({
|
||||||
|
|
Loading…
Reference in New Issue