Closes #93: Edit tag color and title in #/tag/id

This commit is contained in:
jendib
2016-05-08 23:05:44 +02:00
parent 26685334a1
commit e234440ce6
10 changed files with 114 additions and 94 deletions
@@ -97,6 +97,14 @@ public class TagResource extends BaseResource {
.add("name", tagDto.getName())
.add("color", tagDto.getColor());
// Add the parent if its visible
if (tagDto.getParentId() != null) {
AclDao aclDao = new AclDao();
if (aclDao.checkPermission(tagDto.getParentId(), PermType.READ, getTargetIdList(null))) {
tag.add("parent", tagDto.getParentId());
}
}
// Add ACL
AclUtil.addAcls(tag, id, getTargetIdList(null));