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/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, 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/server/src/api/routes/webhook.js b/packages/server/src/api/routes/webhook.js index fdcf14e490..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() @@ -40,10 +36,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 diff --git a/packages/server/src/utilities/security/permissions.js b/packages/server/src/utilities/security/permissions.js index 083de730b5..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) { @@ -156,7 +156,7 @@ exports.doesHaveResourcePermission = ( break } } - return foundMain && foundSub + return foundMain || foundSub } exports.doesHaveBasePermission = (permType, permLevel, permissionIds) => { 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": { 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"),