{"record":{"id":"8be7967c622fc345","repo":"RocketChat/Rocket.Chat","slug":"the-default-value-of-the-setting-login-terms-has","errorCode":null,"errorMessage":"The default value of the setting 'Login Terms' has changed to an empty string. Please review your settings.","messagePattern":"The default value of the setting 'Login Terms' has changed to an empty string\\. Please review your settings\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/startup/migrations/v296.ts","lineNumber":19,"sourceCode":"import { Settings } from '@rocket.chat/models';\n\nimport { SystemLogger } from '../../lib/logger/system';\nimport { addMigration } from '../../lib/migrations';\nimport { settings } from '../../settings';\n\naddMigration({\n\tversion: 296,\n\tname: 'Reset the default value of Login Terms setting and replace by empty string',\n\tasync up() {\n\t\tconst oldLoginTermsValue =\n\t\t\t'By proceeding you are agreeing to our <a href=\"terms-of-service\">Terms of Service</a>, <a href=\"privacy-policy\">Privacy Policy</a> and <a href=\"legal-notice\">Legal Notice</a>.';\n\n\t\tconst loginTermsValue = settings.get('Layout_Login_Terms');\n\n\t\tif (loginTermsValue === oldLoginTermsValue) {\n\t\t\t// TODO: audit\n\t\t\tawait Settings.updateOne({ _id: 'Layout_Login_Terms' }, { $set: { value: '', packageValue: '' } });\n\t\t\tSystemLogger.warn(`The default value of the setting 'Login Terms' has changed to an empty string. Please review your settings.`);\n\t\t}\n\t},\n});\n","sourceCodeStart":1,"sourceCodeEnd":23,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/startup/migrations/v296.ts#L1-L23","documentation":"Logged by migration 296 ('Reset the default value of Login Terms setting and replace by empty string'). The old default of Layout_Login_Terms was a hard-coded English terms-of-service/privacy-policy/legal-notice HTML snippet with links to 'terms-of-service', 'privacy-policy' and 'legal-notice'. If the workspace still had exactly that default value, the migration sets both value and packageValue to '' (empty) and warns the admin to review — the login page will no longer show any terms text until new content is provided.","triggerScenarios":"Migration 296 runs during startup after upgrade, and settings.get('Layout_Login_Terms') equals the byte-for-byte old default HTML ('By proceeding you are agreeing to our <a href=\"terms-of-service\">Terms of Service</a>, ...'). Only that exact match triggers the reset; any customized value is left untouched and no warning is logged.","commonSituations":"Upgrading any workspace that never customized the login terms and relied on the built-in English default — common in fresh/low-touch installs. Post-upgrade the login screen silently loses the terms block, which matters for legal/compliance reasons in organizations that treated the default text as their agreement notice.","solutions":["If you need login terms, set Layout_Login_Terms (Admin -> Layout -> Login Terms) to your own HTML immediately after upgrading.","Use proper hrefs for your actual pages (e.g. /terms-of-service route or external URLs) instead of the old relative defaults.","If you intended to show no terms, no action is needed — the migration did what you want.","Pre-upgrade: if the current value is the old default and you depend on it, copy it out before upgrading so you can re-add it afterwards."],"exampleFix":"// before (pre-upgrade default that migration 296 wipes)\n// Layout_Login_Terms = 'By proceeding you are agreeing to our <a href=\"terms-of-service\">Terms of Service</a> ...'\n\n// after: set your own terms post-migration\nawait Settings.updateValueById(\n  'Layout_Login_Terms',\n  'By proceeding you agree to our <a href=\"https://example.com/terms\">Terms</a> and <a href=\"https://example.com/privacy\">Privacy Policy</a>.',\n);","handlingStrategy":"validation","validationCode":"// Pre-upgrade: detect the exact old default that migration 296 blanks out\nconst OLD_DEFAULT = 'By proceeding you are agreeing to our <a href=\"terms-of-service\">Terms of Service</a>, <a href=\"privacy-policy\">Privacy Policy</a> and <a href=\"legal-notice\">Legal Notice</a>.';\nconst terms = await Settings.getValueById('Layout_Login_Terms');\nif (terms === OLD_DEFAULT) {\n  console.log('Login Terms still at old default — it will be wiped to empty by migration 296. Save your replacement text now.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["If your organization needs login terms, set an explicit custom Layout_Login_Terms value; migrations only reset the exact old default.","Point terms links at real URLs (your /terms-of-service route or external site) instead of the legacy relative defaults.","Re-check the login page layout after every upgrade that touches Layout_* settings."],"tags":["migration","layout","settings","login-page","legal","upgrade"],"backgroundTag":"migration-overwrote-setting","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}