Merge branch 'master' of github.com:Budibase/budibase into budi-day/cli

This commit is contained in:
mike12345567 2021-03-01 18:04:46 +00:00
commit c9203dffd0
11 changed files with 19 additions and 30 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "0.8.2", "version": "0.8.3",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "0.8.2", "version": "0.8.3",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -64,9 +64,9 @@
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.58.13", "@budibase/bbui": "^1.58.13",
"@budibase/client": "^0.8.2", "@budibase/client": "^0.8.3",
"@budibase/colorpicker": "1.0.1", "@budibase/colorpicker": "1.0.1",
"@budibase/string-templates": "^0.8.2", "@budibase/string-templates": "^0.8.3",
"@budibase/svelte-ag-grid": "^1.0.4", "@budibase/svelte-ag-grid": "^1.0.4",
"@sentry/browser": "5.19.1", "@sentry/browser": "5.19.1",
"@svelteschool/svelte-forms": "0.7.0", "@svelteschool/svelte-forms": "0.7.0",

View File

@ -3,7 +3,7 @@ import { localStorageStore } from "./localStorage"
export const getThemeStore = () => { export const getThemeStore = () => {
const themeElement = document.documentElement const themeElement = document.documentElement
const initialValue = { const initialValue = {
darkMode: false, darkMode: true,
hue: 208, hue: 208,
saturation: 9, saturation: 9,
lightness: 16, lightness: 16,

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "0.8.2", "version": "0.8.3",
"license": "MPL-2.0", "license": "MPL-2.0",
"main": "dist/budibase-client.js", "main": "dist/budibase-client.js",
"module": "dist/budibase-client.js", "module": "dist/budibase-client.js",
@ -9,14 +9,14 @@
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"
}, },
"dependencies": { "dependencies": {
"@budibase/string-templates": "^0.8.2", "@budibase/string-templates": "^0.8.3",
"deep-equal": "^2.0.1", "deep-equal": "^2.0.1",
"regexparam": "^1.3.0", "regexparam": "^1.3.0",
"shortid": "^2.2.15", "shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5" "svelte-spa-router": "^3.0.5"
}, },
"devDependencies": { "devDependencies": {
"@budibase/standard-components": "^0.8.2", "@budibase/standard-components": "^0.8.3",
"@rollup/plugin-commonjs": "^16.0.0", "@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0", "@rollup/plugin-node-resolve": "^10.0.0",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "0.8.2", "version": "0.8.3",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/electron.js", "main": "src/electron.js",
"repository": { "repository": {
@ -50,8 +50,8 @@
"author": "Budibase", "author": "Budibase",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@budibase/client": "^0.8.2", "@budibase/client": "^0.8.3",
"@budibase/string-templates": "^0.8.2", "@budibase/string-templates": "^0.8.3",
"@elastic/elasticsearch": "7.10.0", "@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0", "@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1", "@sendgrid/mail": "7.1.1",

View File

@ -2,11 +2,7 @@ const Router = require("@koa/router")
const controller = require("../controllers/webhook") const controller = require("../controllers/webhook")
const authorized = require("../../middleware/authorized") const authorized = require("../../middleware/authorized")
const joiValidator = require("../../middleware/joi-validator") const joiValidator = require("../../middleware/joi-validator")
const { const { BUILDER } = require("../../utilities/security/permissions")
BUILDER,
PermissionTypes,
PermissionLevels,
} = require("../../utilities/security/permissions")
const Joi = require("joi") const Joi = require("joi")
const router = Router() const router = Router()
@ -40,10 +36,7 @@ router
authorized(BUILDER), authorized(BUILDER),
controller.buildSchema controller.buildSchema
) )
.post( // this shouldn't have authorisation, right now its always public
"/api/webhooks/trigger/:instance/:id", .post("/api/webhooks/trigger/:instance/:id", controller.trigger)
authorized(PermissionTypes.WEBHOOK, PermissionLevels.EXECUTE),
controller.trigger
)
module.exports = router module.exports = router

View File

@ -138,7 +138,7 @@ exports.doesHaveResourcePermission = (
) => { ) => {
// set foundSub to not subResourceId, incase there is no subResource // set foundSub to not subResourceId, incase there is no subResource
let foundMain = false, let foundMain = false,
foundSub = !subResourceId foundSub = false
for (let [resource, level] of Object.entries(permissions)) { for (let [resource, level] of Object.entries(permissions)) {
const levels = getAllowedLevels(level) const levels = getAllowedLevels(level)
if (resource === resourceId && levels.indexOf(permLevel) !== -1) { if (resource === resourceId && levels.indexOf(permLevel) !== -1) {
@ -156,7 +156,7 @@ exports.doesHaveResourcePermission = (
break break
} }
} }
return foundMain && foundSub return foundMain || foundSub
} }
exports.doesHaveBasePermission = (permType, permLevel, permissionIds) => { exports.doesHaveBasePermission = (permType, permLevel, permissionIds) => {

View File

@ -35,7 +35,7 @@
"keywords": [ "keywords": [
"svelte" "svelte"
], ],
"version": "0.8.2", "version": "0.8.3",
"license": "MIT", "license": "MIT",
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd", "gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd",
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/string-templates", "name": "@budibase/string-templates",
"version": "0.8.2", "version": "0.8.3",
"description": "Handlebars wrapper for Budibase templating.", "description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.js", "main": "src/index.js",
"module": "src/index.js", "module": "src/index.js",

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/deployment", "name": "@budibase/deployment",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "0.8.2", "version": "0.8.3",
"description": "Budibase Deployment Server", "description": "Budibase Deployment Server",
"main": "src/index.js", "main": "src/index.js",
"repository": { "repository": {

View File

@ -19,10 +19,6 @@ rimraf.sync(devDir)
fs.mkdirSync(`${devDir}/@budibase`, { recursive: true }) fs.mkdirSync(`${devDir}/@budibase`, { recursive: true })
const SYMLINK_PATHS = [ const SYMLINK_PATHS = [
{
symlink: `${devDir}/@budibase/materialdesign-components`,
destination: resolve("packages/materialdesign-components"),
},
{ {
symlink: `${devDir}/@budibase/standard-components`, symlink: `${devDir}/@budibase/standard-components`,
destination: resolve("packages/standard-components"), destination: resolve("packages/standard-components"),