mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Update the site name max length check - need to account for the role group names too
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@38102 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -457,7 +457,14 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
||||
|
||||
// Check that the site name isn't too long
|
||||
// Authorities are limited to 100 characters by the PermissionService
|
||||
int maximumPermisionGroupLength = 100;
|
||||
int longestPermissionLength = 0;
|
||||
for (String permission : permissionService.getSettablePermissions(siteType))
|
||||
{
|
||||
if (permission.length() > longestPermissionLength)
|
||||
longestPermissionLength = permission.length();
|
||||
}
|
||||
int maximumPermisionGroupLength = 99 - longestPermissionLength;
|
||||
|
||||
if (getSiteGroup(shortName, true).length() > maximumPermisionGroupLength)
|
||||
{
|
||||
throw new SiteServiceException(MSG_SITE_SHORT_NAME_TOO_LONG, new Object[] {
|
||||
|
Reference in New Issue
Block a user