Merge pull request #489 from Vec7or/fix-color-bug

Fix tag-colors inside inherited acl
This commit is contained in:
Benjamin Gamard 2020-12-30 23:45:57 +01:00 committed by GitHub
commit 36e5a9747b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ public class DocumentResource extends BaseResource {
* @apiSuccess {String="READ","WRITE"} inherited_acls.perm Permission
* @apiSuccess {String} inherited_acls.source_id Source ID
* @apiSuccess {String} inherited_acls.source_name Source name
* @apiSuccess {String} inherited_acls.source_color The color of the Source
* @apiSuccess {String} inherited_acls.id ID
* @apiSuccess {String} inherited_acls.name Target name
* @apiSuccess {String="USER","GROUP","SHARE"} inherited_acls.type Target type
@ -196,6 +197,7 @@ public class DocumentResource extends BaseResource {
.add("perm", aclDto.getPerm().name())
.add("source_id", tagDto.getId())
.add("source_name", tagDto.getName())
.add("source_color", tagDto.getColor())
.add("id", aclDto.getTargetId())
.add("name", JsonUtil.nullable(aclDto.getTargetName()))
.add("type", aclDto.getTargetType()));

View File

@ -22,7 +22,7 @@
<tr ng-repeat="(id, acl) in inheritedAcls">
<td>
<a href="#/tag/{{ acl[0].source_id }}">
<span class="fas fa-tags"></span>&nbsp;
<span class="fas fa-tags" ng-style="{ 'color': acl[0].source_color }"></span>&nbsp;
{{ acl[0].source_name }}
</a>
</td>