mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 14:23:04 +02:00
dont check maximum group name length if it is a privilege group
This commit is contained in:
@@ -9,7 +9,9 @@ var db = require('../database');
|
||||
module.exports = function(Groups) {
|
||||
|
||||
Groups.create = function(data, callback) {
|
||||
var system = data.system === true || parseInt(data.system, 10) === 1 || data.name === 'administrators' || data.name === 'registered-users' || data.name === 'Global Moderators' || Groups.isPrivilegeGroup(data.name);
|
||||
var system = data.system === true || parseInt(data.system, 10) === 1 ||
|
||||
data.name === 'administrators' || data.name === 'registered-users' || data.name === 'Global Moderators' ||
|
||||
Groups.isPrivilegeGroup(data.name);
|
||||
var groupData;
|
||||
var timestamp = data.timestamp || Date.now();
|
||||
|
||||
@@ -79,7 +81,7 @@ module.exports = function(Groups) {
|
||||
return callback(new Error('[[error:group-name-too-short]]'));
|
||||
}
|
||||
|
||||
if (name.length > (parseInt(meta.config.maximumGroupNameLength, 10) || 255)) {
|
||||
if (!Groups.isPrivilegeGroup(data.name) && name.length > (parseInt(meta.config.maximumGroupNameLength, 10) || 255)) {
|
||||
return callback(new Error('[[error:group-name-too-long]]'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user