private SecureTreeNode getNodeForGroup(LayerGroupInfo lg) { SecureTreeNode node; if (lg.getWorkspace() == null) { node = root.getNode(lg.getName()); } else { String[] path = getLayerGroupPath(lg); node = root.getNode(path); } return node; }
private boolean canAccess( Authentication user, LayerGroupInfo layerGroup, boolean directAccess) { String[] path = getLayerGroupPath(layerGroup); SecureTreeNode node = root.getDeepestNode(path); boolean catalogNodeAllowsAccess = node.canAccess(user, AccessMode.READ);