Fix inherited ACLs displayed on documents

This commit is contained in:
jendib
2016-05-08 23:40:08 +02:00
parent f41dafe76d
commit 3ff41d2002
4 changed files with 15 additions and 13 deletions
@@ -92,7 +92,7 @@ public class DocumentResource extends BaseResource {
TagDao tagDao = new TagDao();
tagDtoList = tagDao.findByCriteria(
new TagCriteria()
.setTargetIdList(getTargetIdList(shareId))
.setTargetIdList(getTargetIdList(null)) // No tags for shares
.setDocumentId(documentId),
new SortCriteria(1, true));
JsonArrayBuilder tags = Json.createArrayBuilder();
@@ -270,7 +270,9 @@ public class DocumentResource extends BaseResource {
for (DocumentDto documentDto : paginatedList.getResultList()) {
// Get tags added by the current user on this document
List<TagDto> tagDtoList = tagDao.findByCriteria(new TagCriteria().setTargetIdList(getTargetIdList(null)).setDocumentId(documentDto.getId()), new SortCriteria(1, true));
List<TagDto> tagDtoList = tagDao.findByCriteria(new TagCriteria()
.setTargetIdList(getTargetIdList(null))
.setDocumentId(documentDto.getId()), new SortCriteria(1, true));
JsonArrayBuilder tags = Json.createArrayBuilder();
for (TagDto tagDto : tagDtoList) {
tags.add(Json.createObjectBuilder()