mirror of
https://github.com/sismics/docs.git
synced 2025-12-21 05:31:42 +00:00
Fix inherited ACLs displayed on documents
This commit is contained in:
@@ -7,7 +7,7 @@ angular.module('docs').controller('DocumentViewPermissions', function($scope) {
|
||||
// Watch for ACLs change and group them for easy displaying
|
||||
$scope.$watch('document.inherited_acls', function(acls) {
|
||||
$scope.inheritedAcls = _.groupBy(acls, function(acl) {
|
||||
return acl.id;
|
||||
return acl.source_id;
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,14 @@
|
||||
<p class="well-sm">Permissions can be applied directly to this document, or can come from <a href="#/tag">tags</a>.</p>
|
||||
|
||||
<div class="well">
|
||||
<h3>Permissions on this document</h3>
|
||||
|
||||
<acl-edit source="document.id"
|
||||
acls="document.acls"
|
||||
writable="document.writable"
|
||||
creator="document.creator"></acl-edit>
|
||||
</div>
|
||||
|
||||
<div class="well" ng-show="document.inherited_acls.length > 0">
|
||||
<h3>Permissions inherited by tags</h3>
|
||||
|
||||
@@ -25,13 +34,4 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<h3>Permissions on this document</h3>
|
||||
|
||||
<acl-edit source="document.id"
|
||||
acls="document.acls"
|
||||
writable="document.writable"
|
||||
creator="document.creator"></acl-edit>
|
||||
</div>
|
||||
Reference in New Issue
Block a user