code: def get_tabs(self):
          
          if not self.tabs:
              return None
          else:
              allowed_tabs = []
              for tab in self.tabs:
  
                  # check permission based on named_url
                  if not view_from_url(tab[1]).has_permission(self.request.user):
                      continue
  
                  obj = self if not hasattr(self, "object") else self.object
                  url = reverse_url(tab[1], obj)
                  allowed_tabs.append(
                      {
                          "name": tab[0],
                          "active": self.request.path == url,
                          "url": self.in_modal(url),
                      }
                  )
              return allowed_tabs
docs: Tabs format: (('name', 'url'), ...) or None if tabs are not used.