{
return null;
}
List<PageNavigation> navigations = new ArrayList<PageNavigation>();
PageNavigation navigation = storage_.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
if (navigation != null)
{
navigation.setModifiable(userACL_.hasPermission(portal.getEditPermission()));
navigations.add(navigation);
}
if (accessUser == null)
{
// navigation = getPageNavigation(PortalConfig.GROUP_TYPE,
// userACL_.getGuestsGroup());
// if (navigation != null)
// navigations.add(navigation);
}
else
{
navigation = storage_.getPageNavigation(PortalConfig.USER_TYPE, accessUser);
if (navigation != null)
{
navigation.setModifiable(true);
navigations.add(navigation);
}
Collection<?> groups = null;
if (userACL_.getSuperUser().equals(accessUser))
{
groups = orgService_.getGroupHandler().getAllGroups();
}
else
{
groups = orgService_.getGroupHandler().findGroupsOfUser(accessUser);
}
for (Object group : groups)
{
Group m = (Group)group;
String groupId = m.getId().trim();
if (groupId.equals(userACL_.getGuestsGroup()))
{
continue;
}
navigation = storage_.getPageNavigation(PortalConfig.GROUP_TYPE, groupId);
if (navigation == null)
{
continue;
}
navigation.setModifiable(userACL_.hasEditPermission(navigation));
navigations.add(navigation);
}
}
Collections.sort(navigations, new Comparator<PageNavigation>()
{