code: protected void ensureSession() throws CmsException {
  
          CmsUser user = getCmsObject().getRequestContext().getCurrentUser();
          if (user.isGuestUser()) {
              throw new CmsException(Messages.get().container(Messages.ERR_SESSION_EXPIRED_0));
          }
      }
docs: Ensures that the user session is still valid.<p>
  
  @throws CmsException if the current user is the guest user