Permissions issue in search results

Author Message

Jordan Hirsch

Friday 11 April 2008 11:56:44 am

I am working on an eZ Publish 4.0.0 installation (SVN revision: 19785) with eZ Find 1.0.0beta2 installed. My content is getting indexed just fine, and in the admin interface, I can see all my search results as expected. However, when I am viewing my public siteaccess as the Anonymous user, any search items residing within the Media Library are not returned in the search results. I have checked, double-checked, and re-checked the permissions for the Media Library, and they appear to be correct. In fact, the Anonymous user can browse directly to the items in question via the public siteaccess and view them with no problem. But they never come back in search results unless I login as the Administrator user first.

I can see that the right filtering logic is being applied in the query, i.e.:

( ( m_section_id:1 )) OR ( ( m_section_id:3 )) )

which is checking for the 2 sections this user is allowed to see, Standard and Media.

I've checked that the classes I'm trying to search (in this case, File) are included in the class array passed to the search function, and that the attributes in question (title, file) are included in the search query. I've also tried running my search with limitation set to an empty array to remove all permissions checking, with no effect.

I would <b>greatly</b> appreciate any light someone could shed on this for me. Thank you!

Me: http://jordan.teamhirsch.com
My blog: http://wiredformusic.blogspot.com
My other company: http://thinkimprov.com
eZ Certification: http://auth.ez.no/certification/verify/402488
eZ Award: http://ez.no/company/news/ez_awards_2007_prize_winners

Jordan Hirsch

Wednesday 16 April 2008 11:40:04 am

I found it! Turns out the problem was in my permissions setup. When I had 2 policies set, one for content/read (Standard section), and one for content/read (Media section), this did not work. When I removed the content/read (Media section) policy and edited the other one to contain both Standard and Media, it started working.

That sounds like a bug to me, but at least I figured it out.,

Me: http://jordan.teamhirsch.com
My blog: http://wiredformusic.blogspot.com
My other company: http://thinkimprov.com
eZ Certification: http://auth.ez.no/certification/verify/402488
eZ Award: http://ez.no/company/news/ez_awards_2007_prize_winners

Kristof Coomans

Thursday 17 April 2008 1:04:09 am

Hi Jordan

If not done yet, can you report this please in the issue tracker of eZ Find? http://issues.ez.no/ProjectSelect.php?Id=8

Thanks!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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

eZ debug

Timing: Jan 18 2025 10:28:28
Script start
Timing: Jan 18 2025 10:28:28
Module start 'layout'
Timing: Jan 18 2025 10:28:28
Module start 'content'
Timing: Jan 18 2025 10:28:28
Module end 'content'
Timing: Jan 18 2025 10:28:28
Script end

Main resources:

Total runtime0.8714 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.1797152.6406
Module start 'layout' 0.00670.0039 741.820339.4766
Module start 'content' 0.01060.8591 781.2969552.1484
Module end 'content' 0.86980.0016 1,333.445312.1328
Script end 0.8713  1,345.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4010160.0002
Check MTime0.00140.1653160.0001
Mysql Total
Database connection0.00120.142010.0012
Mysqli_queries0.816793.7259590.0138
Looping result0.00100.1191570.0000
Template Total0.830895.320.4154
Template load0.00230.260420.0011
Template processing0.828695.083720.4143
Template load and register function0.00010.014010.0001
states
state_id_array0.00120.138710.0012
state_identifier_array0.00230.266820.0012
Override
Cache load0.00190.2126190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.081720.0004
Fetch class attribute name0.00220.247950.0004
XML
Image XML parsing0.00230.258920.0011
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00220.2513220.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs