mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
Fixed (subject to review) string parsing to get site names
- Some values didn't have roles - Still leaves the test failing on "// TODO - update this, if sites support groups" git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13622 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
8d0136553b
commit
7941d79c51
@ -648,7 +648,17 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
if (group.startsWith(GROUP_SITE_PREFIX))
|
||||
{
|
||||
int roleIndex = group.lastIndexOf('_');
|
||||
siteNames.add(group.substring(GROUP_SITE_PREFIX_LENGTH, roleIndex));
|
||||
String siteName;
|
||||
if (roleIndex + 1 <= GROUP_SITE_PREFIX_LENGTH)
|
||||
{
|
||||
// There is no role associated
|
||||
siteName = group.substring(GROUP_SITE_PREFIX_LENGTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
siteName = group.substring(GROUP_SITE_PREFIX_LENGTH, roleIndex);
|
||||
}
|
||||
siteNames.add(siteName);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user