code: private boolean checkLock(CmsResource resource) throws CmsException {
  
          CmsLock lock = m_cms.getLock(resource);
          return lock.isUnlocked() || lock.getUserId().equals(m_cms.getRequestContext().getCurrentUser().getId());
      }
docs: Checks that the resource is not locked by another user.<p>
  
  @param resource the resource
  @return true if the resource is not locked by another user
  
  @throws CmsException if something goes wrong