code: def has_module_perms(self, user_obj, app_label):
          
          cache_name = "_has_module_perms_%s_%s_cache" % (app_label, user_obj.pk)
          if hasattr(self, cache_name):
              return getattr(self, cache_name)
          if self.app_label != app_label:
              setattr(self, cache_name, False)
          else:
              for permission in self.get_supported_permissions():
                  if user_obj.has_perm(permission):
                      setattr(self, cache_name, True)
                      return True
          setattr(self, cache_name, False)
          return False
docs: Check if user have permission of specified app
  
          Parameters
          ----------
          user_obj : django user model instance
              A django user model instance which be checked
          app_label : string
              Django application name
  
          Returns
          -------
          boolean
              Whether the specified user have any permissions of specified app