Skip to content
Snippets Groups Projects
Unverified Commit ca50f0fb authored by Hugo Costa's avatar Hugo Costa Committed by GitHub
Browse files

Regression: Remove 4.0 version banner (#26251)


Co-authored-by: default avatarDiego Sampaio <chinello@gmail.com>
parent 35b9384a
No related branches found
No related tags found
Loading
......@@ -36,4 +36,5 @@ import './v274';
import './v275';
import './v276';
import './v277';
import './v278';
import './xrun';
import { Banners, Settings } from '@rocket.chat/models';
import { addMigration } from '../../lib/migrations';
import { isEnterprise } from '../../../ee/app/license/server';
import { settings } from '../../../app/settings/server';
addMigration({
version: 278,
async up() {
const query = {
_id: { $in: [/^Accounts_OAuth_Custom-?([^-_]+)$/] },
value: true,
};
const isCustomOAuthEnabled = !!(await Settings.findOne(query));
const LDAPEnabled = settings.get('LDAP_Enable');
const SAMLEnabled = settings.get('SAML_Custom_Default');
const isEE = isEnterprise();
if (!isEE && (isCustomOAuthEnabled || LDAPEnabled || SAMLEnabled)) {
return;
}
await Banners.updateOne(
{
'view.blocks.0.text.text': /authentication\-changes/,
'active': { $ne: false },
},
{
$set: {
active: false,
inactivedAt: new Date(),
},
},
);
},
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment