Forums / Developer / Group restrictions on certain custom classes
Yoann Bureau
Tuesday 04 September 2007 6:17:08 am
Hi everybody,
I am trying to find how to manage group restrictions on certain classes of my website. Example with a class called "A": I have an instance of A published on the website, ans two groups of users: "G1" and "G2". I want only G1 to be able to open the full view of the instance of the A class.If a member of the G2 group try to bypass by clicking on a link or direct url, I want him to be redirected to another node (the parent for example).
I tried to explore the Role section during hours but i couldn't find a specific class restriction. Do I need to program it in the template?
Thanks for your support.
Lazaro Ferreira
Tuesday 04 September 2007 7:24:33 am
Hi,
I think you can learn more about access_control here
http://ez.no/doc/ez_publish/technical_manual/3_9/concepts_and_basics/access_control
Regards
Lazaro http://www.mzbusiness.com
Tuesday 04 September 2007 8:25:36 am
Hi Lazaro,
Thanks for your advice; I read this part of the documentation many times in addition of my exploration in the administration.
There is no answer in the documentation about my particular dilema. I am trying to place simple "If" control structures to forbid the access in the template layout, but it's very aggressive for a control restriction.
Anyone got an idea to resolve this problem? Thanks.
Patrice DUCLAUD
Tuesday 04 September 2007 11:30:50 pm
Have you tried to use section ?.
Create a section S1 for folder F1 where you create objects of Class A. Create role(s) R1 (read...) on section S1 for class A. Assign R1 only to G1. And only G1 could read objects of class A. (G2 can't see F1, instance of class A)G2 could not acces to F1 and objects of class A in folder F1.
Another possiblitie: You can create the same structure for G2 (Section S2, Folder F2, role R2...) and publish objects of class A twice in folder F1 and In folder F2. G1 can access to S1 et F1 and G2 can access to S2 et F2.Now you can override template to view objects of class A In folder F1 (all attributes of class A) and In Folder F2 (only attribute title by example). G1 and G2 can view Objects of class A differently
Patrice
Wednesday 05 September 2007 2:56:44 am
Thanks Patrice! That is exactly what I wanted to find!
I never found an utility precedently for the sections, and this is a perfect example of its utilisation. Thanks again Pat!