This commit is contained in:
Lucio Lelii 2019-01-08 17:12:44 +00:00
parent b03cfa85a7
commit 3ee7c2e52f
1 changed files with 8 additions and 3 deletions

View File

@ -149,9 +149,14 @@ public class ItemsManager {
try{
ses = repository.getRepository().login(CredentialHandler.getAdminCredentials(context));
authChecker.checkReadAuthorizationControl(ses, id);
NodeIterator it = ses.getNodeByIdentifier(id).getNodes(name);
while (it.hasNext())
toReturn.add(node2Item.getItem(it.nextNode(), excludes));
NodeIterator it = ses.getNodeByIdentifier(id).getNodes();
while (it.hasNext()) {
Node child= it.nextNode();
Item item = node2Item.getItem(child, excludes);
if (item.getName().equalsIgnoreCase(name) || item.getTitle().equalsIgnoreCase(name))
toReturn.add(item);
}
}catch(RepositoryException re){
log.error("jcr error searching item", re);
GXOutboundErrorResponse.throwException(new BackendGenericError("jcr error searching item", re));