From 11e64b0ffea7f9c4f716f0f888869a2b2770b876 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 12 Oct 2021 20:19:32 +0100 Subject: [PATCH] tidy up --- packages/auth/src/utils.js | 7 ++----- .../backend/DataTable/modals/CreateEditColumn.svelte | 4 ++-- packages/server/src/integrations/postgres.ts | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/auth/src/utils.js b/packages/auth/src/utils.js index 328b8047b3..2f24657ed3 100644 --- a/packages/auth/src/utils.js +++ b/packages/auth/src/utils.js @@ -19,10 +19,7 @@ const accounts = require("./cloud/accounts") const { hash } = require("./hashing") const userCache = require("./cache/user") const env = require("./environment") -const { - getSessionsForUser, - invalidateSessions, -} = require("./security/sessions") +const { getUserSessions, invalidateSessions } = require("./security/sessions") const APP_PREFIX = DocumentTypes.APP + SEPARATOR @@ -249,7 +246,7 @@ exports.platformLogout = async ({ sessionId, keepActiveSession, }) => { - let sessions = await getSessionsForUser(userId) + let sessions = await getUserSessions(userId) if (keepActiveSession) { sessions = sessions.filter(session => session.sessionId !== sessionId) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index c2c872fe9c..cd437bcad2 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -32,7 +32,7 @@ const FORMULA_TYPE = FIELDS.FORMULA.type const LINK_TYPE = FIELDS.LINK.type const dispatch = createEventDispatcher() - const PROHIBITED_COLUMN_NAMES = ["type", "_id", "_rev"] + const PROHIBITED_COLUMN_NAMES = ["type", "_id", "_rev", "tableId"] const { hide } = getContext(Context.Modal) let fieldDefinitions = cloneDeep(FIELDS) @@ -206,7 +206,7 @@ bind:value={field.name} disabled={uneditable || (linkEditDisabled && field.type === LINK_TYPE)} error={columnNameInvalid - ? "type, _id and _rev are disallowed as column names" + ? `${PROHIBITED_COLUMN_NAMES.join(", ")} are not allowed as column names` : ""} /> diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index 64344773e8..abd1fa9286 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -156,7 +156,6 @@ module PostgresModule { let newConfig = { ...this.config, - // ssl: this.config.ssl ? { rejectUnauthorized: true } : undefined, ssl: this.config.ssl ? { rejectUnauthorized: this.config.rejectUnauthorized,