{#each fields as field, idx}
{#if options}
diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte
index 64e2e49526..aed3c4730d 100644
--- a/packages/builder/src/components/integration/QueryViewer.svelte
+++ b/packages/builder/src/components/integration/QueryViewer.svelte
@@ -18,17 +18,11 @@
import IntegrationQueryEditor from "components/integration/index.svelte"
import ExternalDataSourceTable from "components/backend/DataTable/ExternalDataSourceTable.svelte"
import ParameterBuilder from "components/integration/QueryParameterBuilder.svelte"
- import {
- datasources,
- integrations,
- queries,
- permissions,
- } from "stores/backend"
+ import { datasources, integrations, queries } from "stores/backend"
import { capitalise } from "../../helpers"
import CodeMirrorEditor from "components/common/CodeMirrorEditor.svelte"
import JSONPreview from "./JSONPreview.svelte"
- import { Roles, SchemaTypeOptions } from "constants/backend"
- import { onMount } from "svelte"
+ import { SchemaTypeOptions } from "constants/backend"
import KeyValueBuilder from "./KeyValueBuilder.svelte"
import { fieldsToSchema, schemaToFields } from "helpers/data/utils"
import AccessLevelSelect from "./AccessLevelSelect.svelte"
@@ -38,7 +32,6 @@
let fields = query?.schema ? schemaToFields(query.schema) : []
let parameters
let data = []
- let roleId
let saveId
const transformerDocs =
"https://docs.budibase.com/building-apps/data/transformers"
@@ -95,18 +88,6 @@
notifications.error(`Error creating query. ${err.message}`)
}
}
-
- onMount(async () => {
- if (!query || !query._id) {
- roleId = Roles.BASIC
- return
- }
- try {
- roleId = (await permissions.forResource(query._id))["read"]
- } catch (err) {
- roleId = Roles.BASIC
- }
- })
diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte
index c2d7c25b23..61e2ae5f19 100644
--- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte
@@ -1,8 +1,10 @@
diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte
index 1b9ac22498..7d30b8a0a0 100644
--- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte
@@ -36,6 +36,7 @@
SchemaTypeOptions,
} from "constants/backend"
import JSONPreview from "components/integration/JSONPreview.svelte"
+ import AccessLevelSelect from "components/integration/AccessLevelSelect.svelte"
let query, datasource
let breakQs = {}
@@ -144,12 +145,18 @@
- (query.flags.urlName = false)}
- />
+
+
(query.flags.urlName = false)}
+ />
+
+