Forums / Extensions / eZ Find / Permissions issue in search results

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

eZ debug

Timing: Jan 18 2025 02:56:23
Script start
Timing: Jan 18 2025 02:56:23
Module start 'content'
Timing: Jan 18 2025 02:56:24
Module end 'content'
Timing: Jan 18 2025 02:56:24
Script end

Main resources:

Total runtime0.9488 sec
Peak memory usage4,096.0000 KB
Database Queries196

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 591.0391180.7734
Module start 'content' 0.00550.8330 771.8125557.2422
Module end 'content' 0.83850.1102 1,329.0547336.7500
Script end 0.9487  1,665.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3909210.0002
Check MTime0.00140.1456210.0001
Mysql Total
Database connection0.00070.075810.0007
Mysqli_queries0.881692.92021960.0045
Looping result0.00170.17931940.0000
Template Total0.921797.120.4609
Template load0.00200.213820.0010
Template processing0.919796.933220.4598
Template load and register function0.00010.015810.0001
states
state_id_array0.00090.095410.0009
state_identifier_array0.00120.125420.0006
Override
Cache load0.00160.1668190.0001
Sytem overhead
Fetch class attribute can translate value0.00150.156930.0005
Fetch class attribute name0.00100.108250.0002
XML
Image XML parsing0.00280.294030.0009
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00510.5349330.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs