code: public static boolean isWorkplaceUser(HttpServletRequest req) {
  
          HttpSession session = req.getSession(false);
          if (session != null) {
              // if a session is available, check for a workplace configuration
              CmsWorkplaceSettings workplaceSettings = (CmsWorkplaceSettings)session.getAttribute(
                  CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS);
              return ((null != workplaceSettings) && !workplaceSettings.getUser().isGuestUser());
          }
          // no session means no workplace use
          return false;
      }
docs: Returns true if the provided request was done by a Workplace user.<p>
  
  @param req the request to check
  
  @return true if the provided request was done by a Workplace user