code: def allowed(self, context):
          
  
          # if the dashboard has policy rules, honor those above individual
          # panels
          if not self._can_access(context['request']):
              return False
  
          # check if access is allowed to a single panel,
          # the default for each panel is True
          for panel in self.get_panels():
              if panel.can_access(context):
                  return True
  
          return False
docs: Checks for role based access for this dashboard.
  
          Checks for access to any panels in the dashboard and of the
          dashboard itself.
  
          This method should be overridden to return the result of
          any policy checks required for the user to access this dashboard
          when more complex checks are required.