Restrict content access depending on siteaccess

Author Message

Tristan Rivoallan

Wednesday 06 July 2005 5:56:47 am

Hi,

I need to setup permissions for a content::read policy that deoend on the siteaccess. The admin interface does not permit this so I guess I have to implement this myself.

Am I right ? If so, could someone point me to ressources describing the best way (best == cleanest in my case) to do this ?

thx in advance.

ludo thomas

Wednesday 06 July 2005 7:04:55 am

If I understand you, you need to admin the access.
You have to go in admin/role-policies
and you can choose who can see or do what you want

more info here:http://ez.no/ez_publish/documentation/customization/access_control/access_control_management

Tristan Rivoallan

Wednesday 06 July 2005 7:20:53 am

actually, the admin/role-policies interface for the content module doesn't allow me to set permissions on content depending on the siteaccess (i can use this interface for setting permissions for node, subtrees, sections, etc).

so i guess i have to extend the content module policy code. But since it's an important kernel module i would be glad if someone could point me to the "bestpractices" for doing this kind of things.

Geraint Edwards

Wednesday 06 July 2005 10:29:03 am

A simpler is to write a template override for the articles/folders in question - restrict the template's use by node_id. Then show nothing or a fobidden message in place of the content in question. You also could create a new class (based on article etc.) so that the template would always apply to that specific class as opposed to listing specific nodes.

You may want to hide the nodes in question from any menus/recently published items lists you use too.

A bit easier than diving into the kernel!

Tristan Rivoallan

Thursday 07 July 2005 12:09:05 am

You are definitely right :)

thanx a lot

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 19:21:14
Script start
Timing: Jan 18 2025 19:21:14
Module start 'layout'
Timing: Jan 18 2025 19:21:14
Module start 'content'
Timing: Jan 18 2025 19:21:14
Module end 'content'
Timing: Jan 18 2025 19:21:14
Script end

Main resources:

Total runtime0.6682 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.0067 589.1641152.6406
Module start 'layout' 0.00670.0048 741.804739.4766
Module start 'content' 0.01150.6550 781.2813556.0234
Module end 'content' 0.66650.0016 1,337.304712.1250
Script end 0.6681  1,349.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5511160.0002
Check MTime0.00150.2293160.0001
Mysql Total
Database connection0.00100.144010.0010
Mysqli_queries0.610791.3962650.0094
Looping result0.00080.1242630.0000
Template Total0.631194.520.3155
Template load0.00210.308520.0010
Template processing0.629094.140620.3145
Template load and register function0.00020.023910.0002
states
state_id_array0.00110.165110.0011
state_identifier_array0.00120.173120.0006
Override
Cache load0.00170.2515230.0001
Sytem overhead
Fetch class attribute can translate value0.00050.075830.0002
Fetch class attribute name0.00150.219460.0002
XML
Image XML parsing0.00070.111730.0002
class_abstraction
Instantiating content class attribute0.00000.002560.0000
General
dbfile0.00100.1448160.0001
String conversion0.00000.001640.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs