use of com.enonic.xp.repo.impl.elasticsearch.document.indexitem.IndexItemString in project xp by enonic.
the class AccessControlListStoreDocumentFactory method create.
static List<IndexItem> create(final AccessControlList accessControlList) {
final List<IndexItem> aclStoreDocumentItems = new ArrayList<>();
for (final AccessControlEntry entry : accessControlList) {
final Iterable<Permission> allowedPermissions = entry.getAllowedPermissions();
final PrincipalKey principalKey = entry.getPrincipal();
for (final Permission permission : allowedPermissions) {
aclStoreDocumentItems.add(new IndexItemString(getPathForPermission(permission), principalKey.toString()));
}
}
return aclStoreDocumentItems;
}
Aggregations