Handling user's rules

Author Message

Pascal France

Monday 12 November 2007 4:00:07 am

Hi,

I have a folder which contains some article objects which can't be read by anonymous.

I would like to know if there is a way to display to anonymous users a list of link to these articles. And if an anonymous click on the link then the login page will be displayed.

By default, if anonymous users can't read article then I can't fetch and display the attributes of these objects.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Gunnar Birkeland

Monday 12 November 2007 9:17:50 pm

Use access override in your fetch. By providing an empty array you would fetch any object no matter what rights exists.

Limitation array (emtpy array = access override). 

http://ez.no/developer/forum/developer/how_to_fetch_list_ignoring_user_rights/re_how_to_fetch_list_ignoring_user_rights

</major>
----------------------------
ez-version: 3.9.3.
PHP: 4.4.2-1
MYSQL: 4.0.24

Pascal France

Tuesday 13 November 2007 3:03:34 pm

Thank you very much Gunnar.

It's exactely what I was looking for.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

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 31 2025 00:35:42
Script start
Timing: Jan 31 2025 00:35:42
Module start 'layout'
Timing: Jan 31 2025 00:35:42
Module start 'content'
Timing: Jan 31 2025 00:35:42
Module end 'content'
Timing: Jan 31 2025 00:35:42
Script end

Main resources:

Total runtime0.0249 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.1250151.2109
Module start 'layout' 0.00570.0039 739.3359220.6875
Module start 'content' 0.00960.0135 960.0234997.8047
Module end 'content' 0.02310.0018 1,957.828133.9922
Script end 0.0249  1,991.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003012.1108140.0002
Check MTime0.00124.9759140.0001
Mysql Total
Database connection0.00093.759210.0009
Mysqli_queries0.002610.600430.0009
Looping result0.00000.044010.0000
Template Total0.00135.110.0013
Template load0.00104.016510.0010
Template processing0.00031.071310.0003
Override
Cache load0.00072.724210.0007
General
dbfile0.00124.971280.0002
String conversion0.00000.032540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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