CSPACE-5943: Add tenant ID restriction to JDBC queries except where a separate repository is being used, or where disabled by configuration.