Grant access for anonymouse users on search module on an folder which is hidden from anonymouse users

Author Message

Romeo Antony

Friday 23 July 2010 1:12:04 am

Hi, I am the first time working with user roles and policies(new ).I have read through the documenation in ez.

I will explain what I am trying to do on user policies.

In webiste I have 5 topmenues , these top menus are created by class frontpage.

Also all the contents in these 5 tope menus are referred from a folder called archival .

This archival folder is hidden from the anonymouse users.

For that I have set a section for this archival folder and this section is not accessible by anonymous users. All the other topmunes are in the standard section so anonymous users can read the contents.

but, I want to grant access to anonymouse users to search on contents present in the archival folder . But it is not happening, since I have set anonymouse users can access only standard section.

Also for search module, function limitation is not available.Anyone have any idea please guide me. Romeo .

Philippe VINCENT-ROYOL

Friday 23 July 2010 3:07:42 am

Hi Romeo,

If you use ezfind to search, use "limitation" parameters to override current user access

http://ez.no/doc/extensions/ez_find/2_2/customization/template_fetch_functions

else

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/modules/content/fetch_functions/search

Have fun :)

Certified Developer (4.1): http://auth.ez.no/certification/verify/272607
Certified Developer (4.4): http://auth.ez.no/certification/verify/377321

G+ : http://plus.tl/dspe
Twitter : http://twitter.com/dspe

Romeo Antony

Friday 23 July 2010 3:59:24 am

Philippe, thank you for your reply. But can you please tell me can I do something with roles and policies in admin interface to search contents of a hidden node. Please give me a suggestion. ROmeo

Romeo Antony

Friday 23 July 2010 4:37:57 am

In my search.tpl I have set it like

{let search=false()}
{section show=$use_template_search}
{set page_limit=10}
{set search=fetch(content,search,
hash(text,$search_text,
section_id,$search_section_id,
subtree_array,$search_subtree_array,
sort_by,array('modified',false()),
offset,$view_parameters.offset,
ignore_visibility,true(),
limit,$page_limit))}
{set search_result=$search['SearchResult']}
{set search_count=$search['SearchCount']}
{set stop_word_array=$search['StopWordArray']}
{set search_data=$search}
{/section}

But it is not showing the hidden nodes after searching. Can anyone please help me.

Peter Keung

Friday 23 July 2010 8:02:16 am

Do not confuse node visibility with sections and their related permissions. If you set the "limitation" parameter to be an empty array, the result list should bypass permissions:

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/modules/content/fetch_functions/search

Also, note that by default the template search code won't be executed (the PHP view code would be executed) unless you remove the $use_template_search condition in site.ini:

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/configuration_files/site_ini/searchsettings/searchviewhandling

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

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 02:17:48
Script start
Timing: Jan 18 2025 02:17:48
Module start 'layout'
Timing: Jan 18 2025 02:17:48
Module start 'content'
Timing: Jan 18 2025 02:17:50
Module end 'content'
Timing: Jan 18 2025 02:17:50
Script end

Main resources:

Total runtime1.3628 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.7422152.6875
Module start 'layout' 0.00700.0038 742.429739.5859
Module start 'content' 0.01081.3504 782.0156619.9609
Module end 'content' 1.36130.0015 1,401.976616.0156
Script end 1.3628  1,417.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.2785160.0002
Check MTime0.00150.1124160.0001
Mysql Total
Database connection0.00090.065810.0009
Mysqli_queries1.290694.6992650.0199
Looping result0.00070.0520630.0000
Template Total1.321697.020.6608
Template load0.00270.200220.0014
Template processing1.318896.771520.6594
Template load and register function0.00010.006810.0001
states
state_id_array0.00160.115310.0016
state_identifier_array0.00210.154520.0011
Override
Cache load0.00230.1722500.0000
Sytem overhead
Fetch class attribute can translate value0.00090.066630.0003
Fetch class attribute name0.00220.163980.0003
XML
Image XML parsing0.00170.121930.0006
class_abstraction
Instantiating content class attribute0.00000.0016100.0000
General
dbfile0.00240.1758300.0001
String conversion0.00000.000840.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs