Forums / Developer / Restrict content access depending on siteaccess
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-policiesand 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
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!
Thursday 07 July 2005 12:09:05 am
You are definitely right :)
thanx a lot