From 88fa3d18ea605f0b832dfcc9da58d1a829ff9dc7 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 25 Feb 2021 17:18:36 +0000 Subject: [PATCH 1/7] v0.8.3 --- lerna.json | 2 +- packages/builder/package.json | 6 +++--- packages/client/package.json | 6 +++--- packages/server/package.json | 6 +++--- packages/standard-components/package.json | 2 +- packages/string-templates/package.json | 2 +- packages/worker/package.json | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lerna.json b/lerna.json index d038f65da6..367a66a926 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.8.2", + "version": "0.8.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index 284e9fa66d..d308c1e5ec 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.8.2", + "version": "0.8.3", "license": "AGPL-3.0", "private": true, "scripts": { @@ -64,9 +64,9 @@ }, "dependencies": { "@budibase/bbui": "^1.58.13", - "@budibase/client": "^0.8.2", + "@budibase/client": "^0.8.3", "@budibase/colorpicker": "1.0.1", - "@budibase/string-templates": "^0.8.2", + "@budibase/string-templates": "^0.8.3", "@budibase/svelte-ag-grid": "^1.0.4", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "0.7.0", diff --git a/packages/client/package.json b/packages/client/package.json index a400831c2a..8eb481c1fe 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.8.2", + "version": "0.8.3", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.js", @@ -9,14 +9,14 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/string-templates": "^0.8.2", + "@budibase/string-templates": "^0.8.3", "deep-equal": "^2.0.1", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.2", + "@budibase/standard-components": "^0.8.3", "@rollup/plugin-commonjs": "^16.0.0", "@rollup/plugin-node-resolve": "^10.0.0", "fs-extra": "^8.1.0", diff --git a/packages/server/package.json b/packages/server/package.json index a8a67717a2..4bf0cfa6cc 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.8.2", + "version": "0.8.3", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -50,8 +50,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.8.2", - "@budibase/string-templates": "^0.8.2", + "@budibase/client": "^0.8.3", + "@budibase/string-templates": "^0.8.3", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index d5e00753a0..1e6cf6b595 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -35,7 +35,7 @@ "keywords": [ "svelte" ], - "version": "0.8.2", + "version": "0.8.3", "license": "MIT", "gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd", "dependencies": { diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 6b7c29d4c7..b703bbd300 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.8.2", + "version": "0.8.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.js", "module": "src/index.js", diff --git a/packages/worker/package.json b/packages/worker/package.json index faa6ce294c..baf4890d94 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/deployment", "email": "hi@budibase.com", - "version": "0.8.2", + "version": "0.8.3", "description": "Budibase Deployment Server", "main": "src/index.js", "repository": { From 9c8c3bd5fe08f51f20aa244795ed9b11584ef080 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 25 Feb 2021 20:44:16 +0000 Subject: [PATCH 2/7] default to dark mode --- packages/builder/src/builderStore/store/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/store/theme.js b/packages/builder/src/builderStore/store/theme.js index df94a4c3d5..1ff326e173 100644 --- a/packages/builder/src/builderStore/store/theme.js +++ b/packages/builder/src/builderStore/store/theme.js @@ -3,7 +3,7 @@ import { localStorageStore } from "./localStorage" export const getThemeStore = () => { const themeElement = document.documentElement const initialValue = { - darkMode: false, + darkMode: true, hue: 208, saturation: 9, lightness: 16, From 74dfeb7c7b67f1ddc2bdce79f5655e4b973da09d Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 26 Feb 2021 10:06:02 +0000 Subject: [PATCH 3/7] Two character change, some API calls with sub resources and primary resources weren't working, should allow either the sub resource or the main resource to trigger allowance. --- packages/server/src/utilities/security/permissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utilities/security/permissions.js b/packages/server/src/utilities/security/permissions.js index 083de730b5..e6028ac2da 100644 --- a/packages/server/src/utilities/security/permissions.js +++ b/packages/server/src/utilities/security/permissions.js @@ -156,7 +156,7 @@ exports.doesHaveResourcePermission = ( break } } - return foundMain && foundSub + return foundMain || foundSub } exports.doesHaveBasePermission = (permType, permLevel, permissionIds) => { From 491eb00ea1243f4ede99bceb1fbd5a81b264c0a6 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 26 Feb 2021 10:19:06 +0000 Subject: [PATCH 4/7] Fixing an issue discovered by test case. --- packages/server/src/utilities/security/permissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utilities/security/permissions.js b/packages/server/src/utilities/security/permissions.js index e6028ac2da..03fa5fa562 100644 --- a/packages/server/src/utilities/security/permissions.js +++ b/packages/server/src/utilities/security/permissions.js @@ -138,7 +138,7 @@ exports.doesHaveResourcePermission = ( ) => { // set foundSub to not subResourceId, incase there is no subResource let foundMain = false, - foundSub = !subResourceId + foundSub = false for (let [resource, level] of Object.entries(permissions)) { const levels = getAllowedLevels(level) if (resource === resourceId && levels.indexOf(permLevel) !== -1) { From 0c3e287fa8acca29cbf041d5e3200a4e4b1e316e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Sat, 27 Feb 2021 10:15:05 +0000 Subject: [PATCH 5/7] Very minor change due to issue #1204 - wasn't allowing unauthenticated requests through. --- packages/server/src/api/routes/webhook.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/server/src/api/routes/webhook.js b/packages/server/src/api/routes/webhook.js index fdcf14e490..cb65ac66cb 100644 --- a/packages/server/src/api/routes/webhook.js +++ b/packages/server/src/api/routes/webhook.js @@ -40,10 +40,7 @@ router authorized(BUILDER), controller.buildSchema ) - .post( - "/api/webhooks/trigger/:instance/:id", - authorized(PermissionTypes.WEBHOOK, PermissionLevels.EXECUTE), - controller.trigger - ) + // this shouldn't have authorisation, right now its always public + .post("/api/webhooks/trigger/:instance/:id", controller.trigger) module.exports = router From 554b5a27c6a521c0b4739db5e5a75b1e6b4aff03 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Sat, 27 Feb 2021 10:45:01 +0000 Subject: [PATCH 6/7] Linting. --- packages/server/src/api/routes/webhook.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/server/src/api/routes/webhook.js b/packages/server/src/api/routes/webhook.js index cb65ac66cb..7a5577c564 100644 --- a/packages/server/src/api/routes/webhook.js +++ b/packages/server/src/api/routes/webhook.js @@ -2,11 +2,7 @@ const Router = require("@koa/router") const controller = require("../controllers/webhook") const authorized = require("../../middleware/authorized") const joiValidator = require("../../middleware/joi-validator") -const { - BUILDER, - PermissionTypes, - PermissionLevels, -} = require("../../utilities/security/permissions") +const { BUILDER } = require("../../utilities/security/permissions") const Joi = require("joi") const router = Router() From 98246ade8d9419f1b6a5c8c1da76ebdee765e03e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sat, 27 Feb 2021 20:42:09 +0000 Subject: [PATCH 7/7] remove materialdesign from setup script --- scripts/symlinkDev.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/symlinkDev.js b/scripts/symlinkDev.js index b2b546a8c4..ec76d28ae3 100755 --- a/scripts/symlinkDev.js +++ b/scripts/symlinkDev.js @@ -19,10 +19,6 @@ rimraf.sync(devDir) fs.mkdirSync(`${devDir}/@budibase`, { recursive: true }) const SYMLINK_PATHS = [ - { - symlink: `${devDir}/@budibase/materialdesign-components`, - destination: resolve("packages/materialdesign-components"), - }, { symlink: `${devDir}/@budibase/standard-components`, destination: resolve("packages/standard-components"),