code: public static boolean isDirectEditDisabled(ServletRequest request) {
  
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(request.getParameter(CmsGwtConstants.PARAM_TEMPLATE_CONTEXT))) {
              return true;
          }
          String disabledParam = request.getParameter(CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT);
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(disabledParam)) {
              return Boolean.parseBoolean(disabledParam);
          } else {
              HttpSession session = ((HttpServletRequest)request).getSession(false);
              Boolean disabledAttr = null == session
              ? null
              : (Boolean)session.getAttribute(CmsGwtConstants.PARAM_DISABLE_DIRECT_EDIT);
              return (disabledAttr != null) && disabledAttr.booleanValue();
          }
      }
docs: Returns if direct edit is disabled for the current request.<p>
  
  @param request the servlet request
  
  @return <code>true</code> if direct edit is disabled for the current request