code: private boolean isVisibleInFrontend(AccessControllable node) {
  
  		if (node == null) {
  
  			return false;
  		}
  
  		// check hidden flag
  		if (node.isHidden()) {
  
  			return false;
  		}
  
  		// Fetch already logged-in user, if present (don't try to login)
  		final Principal user = getUser(false);
  
  		if (user != null) {
  
  			final Principal owner = node.getOwnerNode();
  
  			// owner is always allowed to do anything with its nodes
  			if (user.equals(node) || user.equals(owner) || Iterables.toList(user.getParents()).contains(owner)) {
  
  				return true;
  			}
  
  		}
  
  		// Public nodes are visible to non-auth users only
  		if (node.isVisibleToPublicUsers() && user == null) {
  
  			return true;
  		}
  
  		// Ask for user only if node is visible for authenticated users
  		if (node.isVisibleToAuthenticatedUsers()) {
  
  			if (user != null) {
  
  				return true;
  			}
  		}
  
  		return node.isGranted(Permission.read, this);
  
  	}
docs: Indicates whether the given node is visible for a frontend request.
  This method should be used to explicetely check visibility of the
  requested root element, like e.g. a page, a partial or a file/image
  to download.
  
  It should *not* be used to check accessibility of child nodes because
  it might send a 401 along with a request for basic authentication.
  
  For those, use
  {@link SecurityContext#isReadable(org.structr.core.entity.AbstractNode, boolean, boolean)}
  
  @param node
  @return isVisible