Skip to content
Snippets Groups Projects
Commit 74bbed5b authored by Ron Lucke's avatar Ron Lucke Committed by Till Glöggler
Browse files

Biest#283

parent edbcccde
Branches
No related tags found
No related merge requests found
...@@ -111,7 +111,10 @@ export default { ...@@ -111,7 +111,10 @@ export default {
let children = this.structuralElement.relationships.children.data; let children = this.structuralElement.relationships.children.data;
let childElements = []; let childElements = [];
children.forEach((element) => { children.forEach((element) => {
childElements.push(view.structuralElementById({ id: element.id })); let childElement = view.structuralElementById({ id: element.id });
if (childElement.attributes['can-read']) {
childElements.push(childElement);
}
}); });
return childElements; return childElements;
......
...@@ -56,6 +56,7 @@ export default { ...@@ -56,6 +56,7 @@ export default {
function buildNodes(structuralElements, relatedStructuralElement) { function buildNodes(structuralElements, relatedStructuralElement) {
return structuralElements.reduce((memo, element) => { return structuralElements.reduce((memo, element) => {
if (element.attributes['can-read']) {
memo.push({ memo.push({
id: element.id, id: element.id,
parent: parent:
...@@ -70,6 +71,7 @@ function buildNodes(structuralElements, relatedStructuralElement) { ...@@ -70,6 +71,7 @@ function buildNodes(structuralElements, relatedStructuralElement) {
relationship: 'children', relationship: 'children',
})?.map((child) => child.id) ?? [], })?.map((child) => child.id) ?? [],
}); });
}
return memo; return memo;
}, []); }, []);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment