Index: api/src/main/java/org/sakaiproject/entity/api/ResourceProperties.java =================================================================== --- api/src/main/java/org/sakaiproject/entity/api/ResourceProperties.java (revision 114936) +++ api/src/main/java/org/sakaiproject/entity/api/ResourceProperties.java (working copy) @@ -173,6 +173,9 @@ /** Property name on a ContentEntity indicating if we should add HTML header/footer.*/ static final String PROP_ADD_HTML = "SAKAI:add_html"; + + /** Property name on a ContentEntity indicating if the item is hidden but it's content is public.*/ + static final String PROP_HIDDEN_WITH_ACCESSIBLE_CONTENT = "SAKAI:hidden_accessible_content"; /** * Property name on a Resource or Collection which will allow resources with Index: kernel-impl/src/main/java/org/sakaiproject/content/impl/CollectionAccessFormatter.java =================================================================== --- kernel-impl/src/main/java/org/sakaiproject/content/impl/CollectionAccessFormatter.java (revision 114936) +++ kernel-impl/src/main/java/org/sakaiproject/content/impl/CollectionAccessFormatter.java (working copy) @@ -32,6 +32,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.sakaiproject.authz.cover.SecurityService; import org.sakaiproject.component.cover.ServerConfigurationService; import org.sakaiproject.content.api.ContentCollection; import org.sakaiproject.content.api.ContentEntity; @@ -190,6 +191,13 @@ } } + // check if the collection is hidden with accessible contents + boolean canSeeHiddenResources = SecurityService.unlock(ContentHostingService.AUTH_RESOURCE_HIDDEN,xs); + String hiddenWithAccessibleContentProperty = properties.getProperty(ResourceProperties.PROP_HIDDEN_WITH_ACCESSIBLE_CONTENT); + if( hiddenWithAccessibleContentProperty != null && !canSeeHiddenResources) + if("true".equals(properties.getProperty(ResourceProperties.PROP_HIDDEN_WITH_ACCESSIBLE_CONTENT))) + continue; + if (isCollection) { xs = xs.substring(0, xs.length() - 1);