fix: Login Terms custom content (#28999)
parent
9959bc6784
commit
ebbb608166
@ -0,0 +1,7 @@ |
||||
--- |
||||
"@rocket.chat/meteor": patch |
||||
"@rocket.chat/web-ui-registration": patch |
||||
--- |
||||
|
||||
fix: Login Terms custom content |
||||
The custom layout Login Terms did not had any effect on the login screen, so it was changed to get the proper setting effect |
||||
@ -0,0 +1,21 @@ |
||||
import { Settings } from '@rocket.chat/models'; |
||||
|
||||
import { addMigration } from '../../lib/migrations'; |
||||
import { SystemLogger } from '../../lib/logger/system'; |
||||
import { settings } from '../../../app/settings/server'; |
||||
|
||||
addMigration({ |
||||
version: 296, |
||||
name: 'Reset the default value of Login Terms setting and replace by empty string', |
||||
async up() { |
||||
const oldLoginTermsValue = |
||||
'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>.'; |
||||
|
||||
const loginTermsValue = settings.get('Layout_Login_Terms'); |
||||
|
||||
if (loginTermsValue === oldLoginTermsValue) { |
||||
await Settings.updateOne({ _id: 'Layout_Login_Terms' }, { $set: { value: '', packageValue: '' } }); |
||||
SystemLogger.warn(`The default value of the setting 'Login Terms' has changed to an empty string. Please review your settings.`); |
||||
} |
||||
}, |
||||
}); |
||||
Loading…
Reference in new issue