code: protected boolean needsPermissionCheck(I_CmsSearchDocument doc) {
  
          if (!isCheckingPermissions()) {
              // no permission check is performed at all
              return false;
          }
  
          if ((doc.getType() == null) || (doc.getPath() == null)) {
              // permission check needs only to be performed for VFS documents that contain both fields
              return false;
          }
  
          if (!I_CmsSearchDocument.VFS_DOCUMENT_KEY_PREFIX.equals(doc.getType())
              && !OpenCms.getResourceManager().hasResourceType(doc.getType())) {
              // this is an unknown VFS resource type (also not the generic "VFS" type of OpenCms before 7.0)
              return false;
          }
          return true;
      }
docs: Checks if the OpenCms resource referenced by the result document needs to be checked.<p>
  
  @param doc the search result document to check
  
  @return <code>true</code> if the document needs to be checked <code>false</code> otherwise