docs: private void checkLockable(
          CmsDbContext dbc,
          CmsResource resource,
          CmsUser user,
          CmsProject project,
          CmsLockType type,
          CmsLock currentLock) throws CmsLockException {
  
          if (!currentLock.isLockableBy(user)) {
              // check type, owner and project for system locks
              // this is required if publishing several siblings
              if (currentLock.getSystemLock().isUnlocked()
                  || (currentLock.getType() != type)
                  || !currentLock.isOwnedInProjectBy(user, project)) {
                  // display the right message
                  CmsMessageContainer message = null;
                  if (currentLock.getSystemLock().isPublish()) {
                      message = Messages.get().container(
                          Messages.ERR_RESOURCE_LOCKED_FORPUBLISH_1,
                          dbc.getRequestContext().getSitePath(resource));
                  } else if (currentLock.getEditionLock().isInherited()) {
                      message = Messages.get().container(
                          Messages.ERR_RESOURCE_LOCKED_INHERITED_1,
                          dbc.getRequestContext().getSitePath(resource));
                  } else {
                      message = Messages.get().container(
                          Messages.ERR_RESOURCE_LOCKED_BYOTHERUSER_1,
                          dbc.getRequestContext().getSitePath(resource));
                  }
                  throw new CmsLockException(message);
              }
          }
      }