From 8d57ae93b314683e99341357867639d566aa19a7 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 15 Dec 2021 14:32:26 +0000 Subject: [PATCH 1/2] fixing issue 3489 where default role wasn't saving correctly --- .../src/components/backend/DataTable/modals/EditRoles.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte index 588a3a8486..7fa9482fbe 100644 --- a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte @@ -6,7 +6,7 @@ import ErrorsBox from "components/common/ErrorsBox.svelte" import { roles } from "stores/backend" - const BASE_ROLE = { _id: "", inherits: "BASIC", permissionId: "Read/Write" } + const BASE_ROLE = { _id: "", inherits: "BASIC", permissionId: "write" } let basePermissions = [] let selectedRole = BASE_ROLE From 3327c4dc6fb904290176155c104d54c0ef0f3efa Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 15 Dec 2021 16:32:04 +0000 Subject: [PATCH 2/2] fix issue with 0 evaluating to false in query builder --- packages/server/src/api/controllers/row/internalSearch.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/row/internalSearch.js b/packages/server/src/api/controllers/row/internalSearch.js index 793454e601..d8ae77156a 100644 --- a/packages/server/src/api/controllers/row/internalSearch.js +++ b/packages/server/src/api/controllers/row/internalSearch.js @@ -191,7 +191,8 @@ class QueryBuilder { } if (this.query.equal) { build(this.query.equal, (key, value) => { - if (!value) { + // 0 evaluates to false, which means we would return all rows if we don't check it + if (!value && value !== 0) { return null } return `${key}:${builder.preprocess(value, allPreProcessingOpts)}`