AnsweredAssumed Answered

How to disable permission checks when searching using SOLR

Question asked by dodjavola on Mar 2, 2016
Hello everyone,

I would like to know is it possible to disable permission checks when performing search in Alfresco 5 (Community)? I see that search results are being affected by ${system.acl.maxPermissionChecks} property. Increasing the number solves the issue temporary, but I would like to disable permission checks completely. I tried to override 'SearchService_security' with AlwaysProceedMethodInterceptor but it did not help. I see that 'afterInvocationManager' (which is in charge of permission checks, if I am not wrong) is being used in 'search.dbQueryEngineSecurity' as well, but I was not able to override that one.

Another interesting thing that I noticed. When executing fts-alfresco query, search behavior (in terms of security) is different between these 2 queries:

cm:description:"Something" and =cm:description:"Something".

In the first case, if I increase the limit of results using SearchService and set ${solr.query.maximumResultsFromUnlimitedQuery} to some big number, I will get all nodes found, regardless of maxPermissionChecks.
In the second case, (with '=' prefix), result set is being limited by maxPermissionChecks.

Could you please help me out with all of this? I spent almost 2 days on this already, I don't feel like I am getting close.

Thanks in advance!

Outcomes