-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] CAS users can take control of Rocket.Chat accounts (#15346)
* Added new setting to determine if Rocket.Chat should trust CAS usernames by default * Change new setting to true by default if CAS was already being used.
- Loading branch information
1 parent
bd90981
commit 078d13e
Showing
5 changed files
with
38 additions
and
5 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
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 |
---|---|---|
|
@@ -155,4 +155,5 @@ import './v154'; | |
import './v155'; | ||
import './v156'; | ||
import './v157'; | ||
import './v158'; | ||
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,26 @@ | ||
import { Migrations } from '../../../app/migrations/server'; | ||
import { Settings } from '../../../app/models/server'; | ||
import { settings } from '../../../app/settings/server'; | ||
|
||
Migrations.add({ | ||
version: 158, | ||
up() { | ||
if (!settings.get('CAS_enabled')) { | ||
return; | ||
} | ||
|
||
Settings.upsert({ | ||
_id: 'CAS_trust_username', | ||
}, | ||
{ | ||
_id: 'CAS_trust_username', | ||
value: true, | ||
type: 'boolean', | ||
group: 'CAS', | ||
i18nDescription: 'CAS_trust_username_description', | ||
}); | ||
}, | ||
down() { | ||
// Down migration does not apply in this case | ||
}, | ||
}); |