code: def get_breadcrumbs(self):
          
          if not self.breadcrumbs:
              return None
          else:
              allowed_breadcrumbs = []
              for breadcrumb in self.breadcrumbs:
  
                  # check permission based on named_url
                  if breadcrumb[1] is not None and not view_from_url(
                      breadcrumb[1]
                  ).has_permission(self.request.user):
                      continue
  
                  obj = self if not hasattr(self, "object") else self.object
                  url = (
                      None
                      if not breadcrumb[1]
                      else reverse_url(breadcrumb[1], obj)
                  )
                  allowed_breadcrumbs.append({"name": breadcrumb[0], "url": url})
              return allowed_breadcrumbs
docs: Breadcrumb format: (('name', 'url'), ...) or None if not used.