mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 06:10:38 +01:00
closes #4749
This commit is contained in:
@@ -53,10 +53,10 @@
|
||||
"post-edit-duration-expired-minutes": "You are only allowed to edit posts for %1 minute(s) after posting",
|
||||
"post-edit-duration-expired-minutes-seconds": "You are only allowed to edit posts for %1 minute(s) %2 second(s) after posting",
|
||||
"post-edit-duration-expired-hours": "You are only allowed to edit posts for %1 hour(s) after posting",
|
||||
"post-edit-duration-expired-hours-minutes": "You are only allowed to edit posts for %1 hour(s) %2 minute(s) after posting",
|
||||
"post-edit-duration-expired-hours-minutes": "You are only allowed to edit posts for %1 hour(s) %2 minute(s) after posting",
|
||||
"post-edit-duration-expired-days": "You are only allowed to edit posts for %1 day(s) after posting",
|
||||
"post-edit-duration-expired-days-hours": "You are only allowed to edit posts for %1 day(s) %2 hour(s) after posting",
|
||||
|
||||
|
||||
|
||||
"content-too-short": "Please enter a longer post. Posts should contain at least %1 character(s).",
|
||||
"content-too-long": "Please enter a shorter post. Posts can't be longer than %1 character(s).",
|
||||
@@ -86,6 +86,7 @@
|
||||
"invalid-file-type": "Invalid file type. Allowed types are: %1",
|
||||
|
||||
"group-name-too-short": "Group name too short",
|
||||
"group-name-too-long": "Group name too long",
|
||||
"group-already-exists": "Group already exists",
|
||||
"group-name-change-not-allowed": "Group name change not allowed",
|
||||
"group-already-member": "Already part of this group",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
var async = require('async'),
|
||||
meta = require('../meta'),
|
||||
plugins = require('../plugins'),
|
||||
utils = require('../../public/src/utils'),
|
||||
db = require('../database');
|
||||
var async = require('async');
|
||||
var meta = require('../meta');
|
||||
var plugins = require('../plugins');
|
||||
var utils = require('../../public/src/utils');
|
||||
var db = require('../database');
|
||||
|
||||
module.exports = function(Groups) {
|
||||
|
||||
@@ -79,6 +79,10 @@ module.exports = function(Groups) {
|
||||
return callback(new Error('[[error:group-name-too-short]]'));
|
||||
}
|
||||
|
||||
if (name.length > (parseInt(meta.config.maximumGroupNameLength, 10) || 255)) {
|
||||
return callback(new Error('[[error:group-name-too-long]]'));
|
||||
}
|
||||
|
||||
if (name.indexOf('/') !== -1) {
|
||||
return callback(new Error('[[error:invalid-group-name]]'));
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
<p class="help-block">
|
||||
If enabled, users can create groups <em>(Default: disabled)</em>
|
||||
</p>
|
||||
|
||||
<label>Maximum Group Name Length</label>
|
||||
<input class="form-control" type="text" placeholder="255" data-field="maximumGroupNameLength" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user