diff --git a/hosting/docker-compose.dev.yaml b/hosting/docker-compose.dev.yaml
index 3b99ef796c..eaced64e06 100644
--- a/hosting/docker-compose.dev.yaml
+++ b/hosting/docker-compose.dev.yaml
@@ -14,7 +14,6 @@ services:
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
- MINIO_BROWSER: "off"
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
diff --git a/lerna.json b/lerna.json
index 137e5a8602..08d06c5808 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "0.9.41",
+ "version": "0.9.43",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/auth/package.json b/packages/auth/package.json
index 008e261302..96b2a476ff 100644
--- a/packages/auth/package.json
+++ b/packages/auth/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
- "version": "0.9.41",
+ "version": "0.9.43",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index 14f2f6970f..4665aa3fa7 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
- "version": "0.9.41",
+ "version": "0.9.43",
"license": "AGPL-3.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
diff --git a/packages/builder/package.json b/packages/builder/package.json
index 5e366a02ae..92fcb8537e 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "0.9.41",
+ "version": "0.9.43",
"license": "AGPL-3.0",
"private": true,
"scripts": {
@@ -65,10 +65,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "^0.9.41",
- "@budibase/client": "^0.9.41",
+ "@budibase/bbui": "^0.9.43",
+ "@budibase/client": "^0.9.43",
"@budibase/colorpicker": "1.1.2",
- "@budibase/string-templates": "^0.9.41",
+ "@budibase/string-templates": "^0.9.43",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/pages/builder/portal/manage/email/index.svelte b/packages/builder/src/pages/builder/portal/manage/email/index.svelte
index 46af44ec93..681a9e3a79 100644
--- a/packages/builder/src/pages/builder/portal/manage/email/index.svelte
+++ b/packages/builder/src/pages/builder/portal/manage/email/index.svelte
@@ -5,16 +5,18 @@
Heading,
Divider,
Label,
- Page,
notifications,
Layout,
Input,
+ Select,
Body,
Table,
+ Checkbox,
} from "@budibase/bbui"
import { email } from "stores/portal"
import TemplateLink from "./_components/TemplateLink.svelte"
import api from "builderStore/api"
+ import { cloneDeep } from "lodash/fp"
const ConfigTypes = {
SMTP: "smtp",
@@ -36,10 +38,16 @@
let smtpConfig
let loading
+ let requireAuth = false
async function saveSmtp() {
+ // clone it so we can remove stuff if required
+ const smtp = cloneDeep(smtpConfig)
+ if (!requireAuth) {
+ delete smtp.config.auth
+ }
// Save your SMTP config
- const response = await api.post(`/api/admin/configs`, smtpConfig)
+ const response = await api.post(`/api/admin/configs`, smtp)
if (response.status !== 200) {
const error = await response.text()
@@ -66,15 +74,19 @@
smtpConfig = {
type: ConfigTypes.SMTP,
config: {
- auth: {
- type: "login",
- },
+ secure: true,
},
}
} else {
smtpConfig = smtpDoc
}
loading = false
+ requireAuth = smtpConfig.config.auth != null
+ // always attach the auth for the forms purpose -
+ // this will be removed later if required
+ smtpConfig.config.auth = {
+ type: "login",
+ }
}
fetchSmtp()
@@ -103,22 +115,35 @@
+
+
+
+
-
-
-
-
-
-
-
-
+
+ {#if requireAuth}
+
+
+
+
+
+
+
+
+ {/if}
diff --git a/packages/cli/package.json b/packages/cli/package.json
index d886de7e68..5ecc06c31d 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
- "version": "0.9.41",
+ "version": "0.9.43",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
diff --git a/packages/client/package.json b/packages/client/package.json
index 1398440209..488de25711 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/client",
- "version": "0.9.41",
+ "version": "0.9.43",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@@ -18,13 +18,13 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
- "@budibase/string-templates": "^0.9.41",
+ "@budibase/string-templates": "^0.9.43",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"
},
"devDependencies": {
- "@budibase/standard-components": "^0.9.41",
+ "@budibase/standard-components": "^0.9.43",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"fs-extra": "^8.1.0",
diff --git a/packages/server/package.json b/packages/server/package.json
index d437ec3ec9..801ae275a1 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
- "version": "0.9.41",
+ "version": "0.9.43",
"description": "Budibase Web Server",
"main": "src/electron.js",
"repository": {
@@ -55,9 +55,9 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@budibase/auth": "^0.9.41",
- "@budibase/client": "^0.9.41",
- "@budibase/string-templates": "^0.9.41",
+ "@budibase/auth": "^0.9.43",
+ "@budibase/client": "^0.9.43",
+ "@budibase/string-templates": "^0.9.43",
"@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1",
@@ -109,7 +109,7 @@
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.4",
- "@budibase/standard-components": "^0.9.41",
+ "@budibase/standard-components": "^0.9.43",
"@jest/test-sequencer": "^24.8.0",
"babel-jest": "^27.0.2",
"docker-compose": "^0.23.6",
diff --git a/packages/server/src/api/controllers/static/index.js b/packages/server/src/api/controllers/static/index.js
index 64cfb122f7..92306259b6 100644
--- a/packages/server/src/api/controllers/static/index.js
+++ b/packages/server/src/api/controllers/static/index.js
@@ -71,7 +71,7 @@ exports.uploadFile = async function (ctx) {
return prepareUpload({
file,
- s3Key: `assets/${ctx.appId}/attachments/${processedFileName}`,
+ s3Key: `${ctx.appId}/attachments/${processedFileName}`,
bucket: ObjectStoreBuckets.APPS,
})
})
diff --git a/packages/server/src/api/routes/tests/row.spec.js b/packages/server/src/api/routes/tests/row.spec.js
index ce7d76100b..60796e56f1 100644
--- a/packages/server/src/api/routes/tests/row.spec.js
+++ b/packages/server/src/api/routes/tests/row.spec.js
@@ -385,7 +385,7 @@ describe("/rows", () => {
name: "test",
description: "test",
attachment: [{
- key: `${config.getAppId()}/attachment/test/thing.csv`,
+ key: `${config.getAppId()}/attachments/test/thing.csv`,
}],
tableId: table._id,
})
@@ -393,7 +393,7 @@ describe("/rows", () => {
await setup.switchToSelfHosted(async () => {
const enriched = await outputProcessing(config.getAppId(), table, [row])
expect(enriched[0].attachment[0].url).toBe(
- `/prod-budi-app-assets/${config.getAppId()}/attachment/test/thing.csv`
+ `/prod-budi-app-assets/${config.getAppId()}/attachments/test/thing.csv`
)
})
})
diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json
index 269293fd6d..df79218aeb 100644
--- a/packages/standard-components/package.json
+++ b/packages/standard-components/package.json
@@ -29,11 +29,11 @@
"keywords": [
"svelte"
],
- "version": "0.9.41",
+ "version": "0.9.43",
"license": "MIT",
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
"dependencies": {
- "@budibase/bbui": "^0.9.41",
+ "@budibase/bbui": "^0.9.43",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1",
diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json
index e7c6681110..a5aa55a904 100644
--- a/packages/string-templates/package.json
+++ b/packages/string-templates/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
- "version": "0.9.41",
+ "version": "0.9.43",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",
diff --git a/packages/worker/package.json b/packages/worker/package.json
index 1d628d3054..9388ff7659 100644
--- a/packages/worker/package.json
+++ b/packages/worker/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
- "version": "0.9.41",
+ "version": "0.9.43",
"description": "Budibase background service",
"main": "src/index.js",
"repository": {
@@ -21,8 +21,8 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@budibase/auth": "^0.9.41",
- "@budibase/string-templates": "^0.9.41",
+ "@budibase/auth": "^0.9.43",
+ "@budibase/string-templates": "^0.9.43",
"@koa/router": "^8.0.0",
"aws-sdk": "^2.811.0",
"bcryptjs": "^2.4.3",
diff --git a/packages/worker/src/utilities/email.js b/packages/worker/src/utilities/email.js
index 4e48844843..534456fe15 100644
--- a/packages/worker/src/utilities/email.js
+++ b/packages/worker/src/utilities/email.js
@@ -20,11 +20,16 @@ const FULL_EMAIL_PURPOSES = [
function createSMTPTransport(config) {
let options
+ let secure = config.secure
+ // default it if not specified
+ if (secure == null) {
+ secure = config.port === 465
+ }
if (!TEST_MODE) {
options = {
port: config.port,
host: config.host,
- secure: config.secure || false,
+ secure: secure,
auth: config.auth,
}
options.tls = {