Ejemplo n.º 1
0
 def is_visible(self):
     """Whether or not the tile is visible on the dashboard (permissions).
     :return: Boolean
     """
     if not self.request.can_access_all_locations:
         url = self.get_url(self.request)
         try:
             match = resolve(url)
         except Resolver404:
             pass
         else:
             if 'domain' in match.kwargs and not url_is_location_safe(url):
                 return False
     return bool(self.visibility_check(self.request))
Ejemplo n.º 2
0
 def is_visible(self):
     """Whether or not the tile is visible on the dashboard (permissions).
     :return: Boolean
     """
     if not self.request.can_access_all_locations:
         url = self.get_url(self.request)
         try:
             match = resolve(url)
         except Resolver404:
             pass
         else:
             if 'domain' in match.kwargs and not url_is_location_safe(url):
                 return False
     return bool(self.visibility_check(self.request))