diff --git a/apps/meteor/app/lib/server/startup/settings.ts b/apps/meteor/app/lib/server/startup/settings.ts index 112241a71f69..3e8eb8b581c3 100644 --- a/apps/meteor/app/lib/server/startup/settings.ts +++ b/apps/meteor/app/lib/server/startup/settings.ts @@ -1542,11 +1542,19 @@ settingsRegistry.addGroup('Layout', function () { type: 'boolean', public: true, }); + this.add('Layout_Custom_Body', false, { + type: 'boolean', + public: true, + }); this.add( 'Layout_Home_Body', '
Welcome to Rocket.Chat!
\nThe Rocket.Chat desktops apps for Windows, macOS and Linux are available to download here.
The native mobile app, Rocket.Chat,\n for Android and iOS is available from Google Play and the App Store.
\nFor further help, please consult the documentation.
\nIf you\'re an admin, feel free to change this content via Administration → Layout → Home Body. Or clicking here.
', { type: 'code', + enableQuery: { + _id: 'Layout_Custom_Body', + value: true, + }, code: 'text/html', multiline: true, public: true, diff --git a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json index 3a8be97ee912..8be213a2ea3b 100644 --- a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json @@ -2543,6 +2543,7 @@ "Layout_Login_Terms": "Login Terms", "Layout_Privacy_Policy": "Privacy Policy", "Layout_Show_Home_Button": "Show \"Home Button\"", + "Layout_Custom_Body": "Use custom homepage content", "Layout_Sidenav_Footer": "Side Navigation Footer", "Layout_Sidenav_Footer_description": "Footer size is 260 x 70px", "Layout_Terms_of_Service": "Terms of Service", diff --git a/apps/meteor/tests/e2e/14-setting-permissions.spec.ts b/apps/meteor/tests/e2e/14-setting-permissions.spec.ts index 94c621b6a00a..c3c9159b6942 100644 --- a/apps/meteor/tests/e2e/14-setting-permissions.spec.ts +++ b/apps/meteor/tests/e2e/14-setting-permissions.spec.ts @@ -47,10 +47,10 @@ test.describe('[Rocket.Chat Settings based permissions]', () => { await admin.rolesSettingsFindInput().fill('Layout'); await admin.getPage().locator('table tbody tr:first-child td:nth-child(1) >> text="Layout"').waitFor(); const isOptionChecked = await admin.getPage().isChecked('table tbody tr:first-child td:nth-child(6) label input'); - const changeHomeTitleSelected = await admin.getPage().isChecked('table tbody tr:nth-child(3) td:nth-child(6) label input'); + const changeHomeTitleSelected = await admin.getPage().isChecked('table tbody tr:nth-child(4) td:nth-child(6) label input'); if (!isOptionChecked && !changeHomeTitleSelected) { await admin.getPage().click('table tbody tr:first-child td:nth-child(6) label'); - await admin.getPage().click('table tbody tr:nth-child(3) td:nth-child(6) label'); + await admin.getPage().click('table tbody tr:nth-child(4) td:nth-child(6) label'); } }); }); @@ -110,7 +110,7 @@ test.describe('[Rocket.Chat Settings based permissions]', () => { await admin.rolesSettingsFindInput().fill('Layout'); await admin.getPage().locator('table tbody tr:first-child td:nth-child(1) >> text="Layout"').waitFor(); await admin.getPage().click('table tbody tr td:nth-child(6) label'); - await admin.getPage().click('table tbody tr:nth-child(3) td:nth-child(6) label'); + await admin.getPage().click('table tbody tr:nth-child(4) td:nth-child(6) label'); }); }); });