code: def check(self, action, page=None, lang=None, method=None):
          
          if self.user.is_superuser:
              return True
  
          if action == 'change':
              return self.has_change_permission(page, lang, method)
  
          if action == 'delete':
              if not self.delete_page():
                  return False
              return True
          if action == 'add':
              if not self.add_page():
                  return False
              return True
          if action == 'freeze':
              perm = self.user.has_perm('pages.can_freeze')
              if perm:
                  return True
              return False
          if action == 'publish':
              perm = self.user.has_perm('pages.can_publish')
              if perm:
                  return True
              return False
  
          return False
docs: Return ``True`` if the current user has permission on the page.