mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
16681: Fixed ETHREEOH-2454 "It's possible to create a group with less than 3 symbols in JSF client, but it's impossible to find it in Share client" - Group name can now only be between 3-100 characters in webclient git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16901 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -51,6 +51,7 @@ public class CreateGroupDialog extends BaseDialogBean
|
||||
transient private AuthorityService authService;
|
||||
|
||||
private static final String MSG_ERR_EXISTS = "groups_err_exists";
|
||||
private static final String MSG_GROUPNAME_LENGTH = "groups_err_group_name_length";
|
||||
private static final String MSG_ERR_NAME = "groups_err_group_name";
|
||||
private static final String MSG_ROOT_GROUPS = "root_groups";
|
||||
private static final String MSG_BUTTON_NEW_GROUP = "new_group";
|
||||
@@ -154,8 +155,17 @@ public class CreateGroupDialog extends BaseDialogBean
|
||||
|
||||
public void validateGroupName(FacesContext context, UIComponent component, Object value) throws ValidatorException
|
||||
{
|
||||
String name = (String) value;
|
||||
|
||||
int minGroupNameLength = Application.getClientConfig(context).getMinGroupNameLength();
|
||||
|
||||
String name = ((String)value).trim();
|
||||
|
||||
if (name.length() < minGroupNameLength || name.length() > 100)
|
||||
{
|
||||
String err = MessageFormat.format(Application.getMessage(context, MSG_GROUPNAME_LENGTH),
|
||||
new Object[]{minGroupNameLength, 100});
|
||||
throw new ValidatorException(new FacesMessage(err));
|
||||
}
|
||||
|
||||
if (name.indexOf('"') != -1 || name.indexOf('\\') != -1)
|
||||
{
|
||||
String err = MessageFormat.format(Application.getMessage(context, MSG_ERR_NAME),
|
||||
|
Reference in New Issue
Block a user