Share » Forums » Developer » Grant access for anonymouse users on...

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

Friday 23 July 2010 1:12:04 am - 4 replies

Author Message

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu