mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #9204, bypass groupname length check for system group in upgrade script
This commit is contained in:
@@ -13,6 +13,9 @@ module.exports = {
|
|||||||
timestamp: Date.UTC(2020, 9, 13),
|
timestamp: Date.UTC(2020, 9, 13),
|
||||||
method: async function () {
|
method: async function () {
|
||||||
const progress = this.progress;
|
const progress = this.progress;
|
||||||
|
|
||||||
|
const maxGroupLength = meta.config.maximumGroupNameLength;
|
||||||
|
meta.config.maximumGroupNameLength = 30;
|
||||||
const timestamp = await db.getObjectField('group:administrators', 'timestamp');
|
const timestamp = await db.getObjectField('group:administrators', 'timestamp');
|
||||||
const verifiedExists = await groups.exists('verified-users');
|
const verifiedExists = await groups.exists('verified-users');
|
||||||
if (!verifiedExists) {
|
if (!verifiedExists) {
|
||||||
@@ -38,7 +41,8 @@ module.exports = {
|
|||||||
timestamp: timestamp + 1,
|
timestamp: timestamp + 1,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// restore setting
|
||||||
|
meta.config.maximumGroupNameLength = maxGroupLength;
|
||||||
await batch.processSortedSet('users:joindate', async function (uids) {
|
await batch.processSortedSet('users:joindate', async function (uids) {
|
||||||
progress.incr(uids.length);
|
progress.incr(uids.length);
|
||||||
const userData = await user.getUsersFields(uids, ['uid', 'email:confirmed']);
|
const userData = await user.getUsersFields(uids, ['uid', 'email:confirmed']);
|
||||||
|
|||||||
Reference in New Issue
Block a user