def recurse_traversable(self, router: Router, route: Route, context: Resource): """Walk through traversable hierarchy. For each context iterate available views and add to sitemap. """ if not self.has_public_view_acl(context): # This resource limits view permission to subgroup and is not public. E.g. /admin/* return # Add all views for this leaf for view_data in self.enumerate_available_views(route, context): if self.is_public_get_view(view_data) and self.is_included(view_data, context, self.request): self.add_traverse_item(context, view_data["name"]) # Recurse to children if IContainer.providedBy(context): for name, child in context.items(): self.recurse_traversable(router, route, child)
def recurse_traversable(self, router: Router, route: Route, context: Resource): """Walk through traversable hierarchy. For each context iterate available views and add to sitemap. """ if not self.has_public_view_acl(context): # This resource limits view permission to subgroup and is not public. E.g. /admin/* return # Add all views for this leaf for view_data in self.enumerate_available_views(route, context): if self.is_public_get_view(view_data): self.add_traverse_item(context, view_data["name"]) # Recurse to children if IContainer.providedBy(context): for name, child in context.items(): self.recurse_traversable(router, route, child)