String firstItem = publiclyReadableFolders.get(0);
// If the first value in the list is '*', list all resource folders.
if (firstItem != null && firstItem.equals("*")) {
// fake role that represents normally logged in user
Roles registeredUserRole = new Roles(false, false, false, false, false, false);
List<RepositoryEntry> allEntries = (List<RepositoryEntry>) repoManager.queryByTypeLimitAccess(SharedFolderFileResource.TYPE_NAME,
registeredUserRole);
for (RepositoryEntry entry : allEntries) {
addReadonlyFolder(rootContainer, entry, sfm, addedEntries);
}
} else {