policy limitation by subtree AND node

Author Message

Sebastiaan van der Vliet

Friday 27 August 2010 6:24:26 am

The function "policyLimitationFilterQuery" in 2.1.0-final does not know how to deal with policies that include both subtree and node restrictions for content read. It combines both using "AND", which returns no results, but "OR" does. I can change the following on line 1425:

if ( count( $filterQueryPolicyLimitations ) > 0 )
            {
                $filterQueryPolicies[] = '( ' . implode( ' AND ', $filterQueryPolicyLimitations ) . ')';
            }

to:

if ( count( $filterQueryPolicyLimitations ) > 0 )
            {
                $filterQueryPolicies[] = '( ' . implode( ' OR ', $filterQueryPolicyLimitations ) . ')';
            }

but that solution is only good for testing. Any suggestions on how to fix this?

Thanks in advance.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Paul Borgermans

Friday 27 August 2010 8:15:46 am

Its a known bug, and the solution a tad more complex. I have it on my todo list for eZ Find 2.3.

Cheers

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Sebastiaan van der Vliet

Friday 27 August 2010 8:19:24 am

Thanks Paul.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.