where to put access control for custom views ?

Author Message

Massimiliano Bariola

Friday 08 July 2005 6:50:39 am

Hello ,

I have added a couple of templates to design/my_design/templates/node/view/, so that I'll be able to access them via link like content/view/[nodeid], effectively creating two new view templates.

These views should be protected so that anonymous users will not be able to see them. what is the best way to protect them ?

adding an if statement on the visiting user's class, redirecting to login page if it's an anonymous user?

or is there a way to add policies via the admin interface for these view templates?

TIA

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 19 2025 01:17:45
Script start
Timing: Jan 19 2025 01:17:45
Module start 'layout'
Timing: Jan 19 2025 01:17:45
Module start 'content'
Timing: Jan 19 2025 01:17:46
Module end 'content'
Timing: Jan 19 2025 01:17:46
Script end

Main resources:

Total runtime0.6961 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 590.4141152.6406
Module start 'layout' 0.00670.0036 743.054739.4766
Module start 'content' 0.01030.6844 782.5313434.4219
Module end 'content' 0.69470.0013 1,216.95318.1250
Script end 0.6960  1,225.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.6865160.0003
Check MTime0.00150.2179160.0001
Mysql Total
Database connection0.00160.226610.0016
Mysqli_queries0.647993.0819460.0141
Looping result0.00050.0741440.0000
Template Total0.658994.720.3295
Template load0.00360.511520.0018
Template processing0.655394.148420.3277
Template load and register function0.00010.017510.0001
states
state_id_array0.00130.181310.0013
state_identifier_array0.00100.143720.0005
Override
Cache load0.00280.4042100.0003
Sytem overhead
Fetch class attribute can translate value0.00110.152710.0011
Fetch class attribute name0.00070.105620.0004
XML
Image XML parsing0.00070.098710.0007
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00080.1176170.0000
String conversion0.00000.001340.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 5
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs