Skip to content
Snippets Groups Projects
Commit 374ab2bc authored by uhensler's avatar uhensler
Browse files

OO-4207: Remove double accessibility check

parent f380cc81
No related branches found
No related tags found
No related merge requests found
......@@ -193,18 +193,14 @@ public class CourseIndexer extends AbstractHierarchicalIndexer {
.build()
.getNodeById(courseNode.getIdent());
if (treeNode == null) {
// TreeNode no longer visible
// TreeNode no longer visible and accessible
return false;
}
if (log.isDebugEnabled()) log.debug("call accessible=" + treeNode.isAccessible() );
if (treeNode.isAccessible()) {
CourseNodeIndexer courseNodeIndexer = getCourseNodeIndexer(courseNode);
bcContextEntry.setTransientState(new CourseNodeEntry(courseNode));
return courseNodeIndexer.checkAccess(bcContextEntry, businessControl, identity, roles)
&& super.checkAccess(bcContextEntry, businessControl, identity, roles);
}
return false;
CourseNodeIndexer courseNodeIndexer = getCourseNodeIndexer(courseNode);
bcContextEntry.setTransientState(new CourseNodeEntry(courseNode));
return courseNodeIndexer.checkAccess(bcContextEntry, businessControl, identity, roles)
&& super.checkAccess(bcContextEntry, businessControl, identity, roles);
}
private CourseNodeIndexer getCourseNodeIndexer(CourseNode node) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment