Merged 5.2.N (5.2.1) to HEAD (5.2)

127160 cturlica: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      127134 cturlica: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
         127102 rmunteanu: MNT-15614 : Site with name "IT" cannot be managed properly
            - Changed the way the role name is striped out.
            - Implemented tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127868 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-06 09:21:06 +00:00
parent 3bf3914916
commit db287e9c24
3 changed files with 64 additions and 5 deletions

View File

@@ -2262,10 +2262,11 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
List<String> groups = getPermissionGroups(shortName, authorityName);
for (String group : groups)
{
int index = group.indexOf(shortName) + shortName.length();
String shortNamePattern = '_' + shortName + '_';
int index = group.lastIndexOf(shortNamePattern) + (shortNamePattern).length();
if (index != -1)
{
result.add(group.substring(index + 1));
result.add(group.substring(index));
}
}
return result;