-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Login Terms custom content (#28999)
- Loading branch information
1 parent
9959bc6
commit ebbb608
Showing
7 changed files
with
46 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,5 @@ import './v292'; | |
import './v293'; | ||
import './v294'; | ||
import './v295'; | ||
import './v296'; | ||
import './xrun'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.`); | ||
} | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters