docs: protected void ensureLock() throws CmsException {
  
          CmsLock lock = m_cms.getLock(m_resource);
          if (lock.isUnlocked() || !lock.isLockableBy(m_cms.getRequestContext().getCurrentUser())) {
              m_cms.lockResourceTemporary(m_cms.getSitePath(m_resource));
              m_needToUnlock = true;
          }
      }