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

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

eZ debug

Timing: Jan 29 2025 13:39:18
Script start
Timing: Jan 29 2025 13:39:18
Module start 'content'
Timing: Jan 29 2025 13:39:18
Module end 'content'
Timing: Jan 29 2025 13:39:18
Script end

Main resources:

Total runtime0.1126 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.5469180.7656
Module start 'content' 0.00620.0038 769.312598.1797
Module end 'content' 0.00990.1026 867.4922531.0469
Script end 0.1126  1,398.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00292.5546200.0001
Check MTime0.00110.9879200.0001
Mysql Total
Database connection0.00100.916410.0010
Mysqli_queries0.078169.38671410.0006
Looping result0.00080.72781390.0000
Template Total0.102490.910.1024
Template load0.00060.533710.0006
Template processing0.101890.368310.1018
Override
Cache load0.00040.377210.0004
Sytem overhead
Fetch class attribute can translate value0.00060.554010.0006
XML
Image XML parsing0.00030.288510.0003
General
dbfile0.00322.8609200.0002
String conversion0.00000.004430.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs