From 98076064d55336ffd2d46f6f22d00a3131e0a90f Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 10 Jul 2023 12:38:49 +0200 Subject: [PATCH 1/9] fix typo in webapp locale --- webapp/locales/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/locales/de.json b/webapp/locales/de.json index febb8898c..21a5368da 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -580,7 +580,7 @@ "moreInfo": "Was ist {APPLICATION_NAME}?", "moreInfoHint": "zur Präsentationsseite", "no-account": "Du hast noch kein Nutzerkonto?", - "no-cookie": "Es kann kein Cookie angelegt werden. Du must Cookies akzeptieren.", + "no-cookie": "Es kann kein Cookie angelegt werden. Du musst Cookies akzeptieren.", "password": "Dein Passwort", "register": "Nutzerkonto erstellen", "success": "Du bist eingeloggt!" From 97d883b84599e39d5c411261b8af9e0e7df52a43 Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 10 Jul 2023 16:25:53 +0200 Subject: [PATCH 2/9] set new placeholder texts for venue and city inputs --- webapp/locales/de.json | 4 ++-- webapp/locales/en.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 21a5368da..d8bc537ff 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -759,9 +759,9 @@ "viewEvent": { "eventEnd": "Ende", "eventIsOnline": "Online", - "eventLocationName": "Stadt", + "eventLocationName": "Stadt - z.B. Musterstraße 1, 12345 Musterstadt", "eventStart": "Beginn", - "eventVenue": "Veranstaltungsort", + "eventVenue": "Veranstaltungsort - z.B. Hinterhof, 1. OG, ...", "title": "Veranstaltung" }, "viewPost": { diff --git a/webapp/locales/en.json b/webapp/locales/en.json index c0fb5c2f6..e6fe4a624 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -759,9 +759,9 @@ "viewEvent": { "eventEnd": "End", "eventIsOnline": "Online", - "eventLocationName": "City", + "eventLocationName": "City - e.g. Example street 1, 12345 City", "eventStart": "Start", - "eventVenue": "Venue", + "eventVenue": "Venue - e.g. Backyard, 1st Floor, ...", "title": "Event" }, "viewPost": { From 3d32f390888a214da8744087765d3696abddbd2c Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 10 Jul 2023 17:07:47 +0200 Subject: [PATCH 3/9] fix webapp github workflow conditions --- .github/workflows/test-webapp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index 9ca3023cc..e30132ba8 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -23,7 +23,7 @@ jobs: prepare: name: Prepare - if: needs.files-changed.outputs.webapp + if: needs.files-changed.outputs.webapp == 'true needs: files-changed runs-on: ubuntu-latest steps: @@ -37,7 +37,7 @@ jobs: build_test_webapp: name: Docker Build Test - Webapp - if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp + if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true needs: [files-changed, prepare] runs-on: ubuntu-latest steps: @@ -57,7 +57,7 @@ jobs: lint_webapp: name: Lint Webapp - if: needs.files-changed.outputs.webapp + if: needs.files-changed.outputs.webapp == 'true needs: files-changed runs-on: ubuntu-latest steps: @@ -69,7 +69,7 @@ jobs: unit_test_webapp: name: Unit Tests - Webapp - if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp + if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true needs: [files-changed, build_test_webapp] runs-on: ubuntu-latest permissions: From 728fd79579dc58102c6cb16ef18aa203a10a5760 Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 10 Jul 2023 18:42:06 +0200 Subject: [PATCH 4/9] set cypress test retries to 0 --- cypress/cypress.config.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cypress/cypress.config.js b/cypress/cypress.config.js index 2d2cefc47..b169c0ce0 100644 --- a/cypress/cypress.config.js +++ b/cypress/cypress.config.js @@ -42,10 +42,7 @@ module.exports = defineConfig({ baseUrl: "http://localhost:3000", specPattern: "cypress/e2e/**/*.feature", supportFile: "cypress/support/e2e.js", - retries: { - runMode: 2, - openMode: 0, - }, + retries: 0, video: false, setupNodeEvents, }, From 31da4c597b4ed005a96264e1f6cd97799102b349 Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 10 Jul 2023 19:14:20 +0200 Subject: [PATCH 5/9] fix webapp github workflow conditions --- .github/workflows/test-webapp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index e30132ba8..c1aee47cf 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -23,7 +23,7 @@ jobs: prepare: name: Prepare - if: needs.files-changed.outputs.webapp == 'true + if: needs.files-changed.outputs.webapp == 'true' needs: files-changed runs-on: ubuntu-latest steps: @@ -37,7 +37,7 @@ jobs: build_test_webapp: name: Docker Build Test - Webapp - if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true + if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true' needs: [files-changed, prepare] runs-on: ubuntu-latest steps: @@ -57,7 +57,7 @@ jobs: lint_webapp: name: Lint Webapp - if: needs.files-changed.outputs.webapp == 'true + if: needs.files-changed.outputs.webapp == 'true' needs: files-changed runs-on: ubuntu-latest steps: @@ -69,7 +69,7 @@ jobs: unit_test_webapp: name: Unit Tests - Webapp - if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true + if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.webapp == 'true' needs: [files-changed, build_test_webapp] runs-on: ubuntu-latest permissions: From 073adbe48c6f9093879f64b4b945fbc90fa7dfd2 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 11:19:01 +0200 Subject: [PATCH 6/9] do not allow to create room with self --- backend/src/schema/resolvers/rooms.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/schema/resolvers/rooms.ts b/backend/src/schema/resolvers/rooms.ts index 02309e172..293cd6e91 100644 --- a/backend/src/schema/resolvers/rooms.ts +++ b/backend/src/schema/resolvers/rooms.ts @@ -32,6 +32,9 @@ export default { const { user: { id: currentUserId }, } = context + if (userId === currentUserId) { + throw new Error('Cannot create a room with yourself') + } const session = context.driver.session() const writeTxResultPromise = session.writeTransaction(async (transaction) => { const createRoomCypher = ` From dd4e6bf2dca0debe9457bdf674aab7292e7701e9 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 12:13:46 +0200 Subject: [PATCH 7/9] fix open chat functionality after relog co-authored-by: Ogerly --- webapp/layouts/default.spec.js | 2 +- webapp/layouts/default.vue | 5 ++++- webapp/store/chat.js | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/webapp/layouts/default.spec.js b/webapp/layouts/default.spec.js index 1b83491d7..cce8c2eca 100644 --- a/webapp/layouts/default.spec.js +++ b/webapp/layouts/default.spec.js @@ -37,7 +37,7 @@ describe('default.vue', () => { getters: { 'auth/isLoggedIn': () => true, 'chat/showChat': () => { - return { showChat: false, roomID: 'u0' } + return { showChat: false, roomID: null } }, }, }) diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 8b6b80604..f14c4055f 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -16,7 +16,7 @@
RoomID: {{ $store.getters['chat/showChat'].roomID }} - + x @@ -41,6 +41,9 @@ export default { ChatModule, }, mixins: [seo, mobile()], + beforeCreate() { + this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: null }) + }, } diff --git a/webapp/store/chat.js b/webapp/store/chat.js index 2ee8a47ad..be4ddaec0 100644 --- a/webapp/store/chat.js +++ b/webapp/store/chat.js @@ -1,14 +1,14 @@ export const state = () => { return { showChat: false, - roomID: 'u0', + roomID: null, } } export const mutations = { SET_OPEN_CHAT(state, ctx) { state.showChat = ctx.showChat || false - state.roomID = ctx.roomID || 'u0' + state.roomID = ctx.roomID || null }, } From a4bb523cb4d1e50abc1f3c528dc01460fabf3a7d Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 12:57:37 +0200 Subject: [PATCH 8/9] unit test for error when creating room with self --- backend/src/schema/resolvers/rooms.spec.ts | 15 +++++++++++++++ backend/src/schema/resolvers/rooms.ts | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/backend/src/schema/resolvers/rooms.spec.ts b/backend/src/schema/resolvers/rooms.spec.ts index d27c64e57..03c3d4456 100644 --- a/backend/src/schema/resolvers/rooms.spec.ts +++ b/backend/src/schema/resolvers/rooms.spec.ts @@ -92,6 +92,21 @@ describe('Room', () => { }) }) + describe('user id is self', () => { + it('throws error', async () => { + await expect( + mutate({ + mutation: createRoomMutation(), + variables: { + userId: 'chatting-user', + }, + }), + ).resolves.toMatchObject({ + errors: [{ message: 'Cannot create a room with self' }], + }) + }) + }) + describe('user id exists', () => { it('returns the id of the room', async () => { const result = await mutate({ diff --git a/backend/src/schema/resolvers/rooms.ts b/backend/src/schema/resolvers/rooms.ts index 293cd6e91..d5015a03b 100644 --- a/backend/src/schema/resolvers/rooms.ts +++ b/backend/src/schema/resolvers/rooms.ts @@ -33,7 +33,7 @@ export default { user: { id: currentUserId }, } = context if (userId === currentUserId) { - throw new Error('Cannot create a room with yourself') + throw new Error('Cannot create a room with self') } const session = context.driver.session() const writeTxResultPromise = session.writeTransaction(async (transaction) => { From 40dea1736011662c1251c6f80c8b56e266771cd8 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 11 Jul 2023 13:05:01 +0200 Subject: [PATCH 9/9] update TODO-next-update.md for 2.7.0-470 --- deployment/TODO-next-update.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment/TODO-next-update.md b/deployment/TODO-next-update.md index 8630275b7..8e30d1f47 100644 --- a/deployment/TODO-next-update.md +++ b/deployment/TODO-next-update.md @@ -2,6 +2,10 @@ When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings: +## Version >= 2.7.0 with 'ocelotDockerVersionTag' 2.7.0-470 + +- You have to rename all `.js` files to `.ts` in `branding/constants` + ## Version >= 2.4.0 with 'ocelotDockerVersionTag' 2.4.0-298 - You have to set `SHOW_CONTENT_FILTER_HEADER_MENU` and `SHOW_CONTENT_FILTER_MASONRY_GRID` in `branding/constants/filter.js` originally in main code file `webapp/constants/filter.js` to your preferred value.