Fix compilation as a result of elastic/elasticsearchelastic/elasticsearch#16268.

Original commit: elastic/x-pack-elasticsearch@4a334d7f7d
This commit is contained in:
Adrien Grand 2016-04-11 18:06:48 +02:00
parent d7a24379d7
commit 26e1535eee
1 changed files with 1 additions and 2 deletions

View File

@ -258,12 +258,11 @@ public class Security {
shieldLicenseState)); shieldLicenseState));
} }
if (transportClientMode == false) { if (transportClientMode == false) {
module.registerQueryCache(Security.OPT_OUT_QUERY_CACHE, OptOutQueryCache::new);
/* We need to forcefully overwrite the query cache implementation to use Shield's opt out query cache implementation. /* We need to forcefully overwrite the query cache implementation to use Shield's opt out query cache implementation.
* This impl. disabled the query cache if field level security is used for a particular request. If we wouldn't do * This impl. disabled the query cache if field level security is used for a particular request. If we wouldn't do
* forcefully overwrite the query cache implementation then we leave the system vulnerable to leakages of data to * forcefully overwrite the query cache implementation then we leave the system vulnerable to leakages of data to
* unauthorized users. */ * unauthorized users. */
module.forceQueryCacheType(Security.OPT_OUT_QUERY_CACHE); module.forceQueryCacheProvider(OptOutQueryCache::new);
} }
} }