Group restrictions on certain custom classes

Author Message

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

Yoann Bureau

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

Yoann Bureau

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!

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

Main resources:

Total runtime0.6918 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.0099 588.0469152.6406
Module start 'layout' 0.01000.0035 740.687539.4766
Module start 'content' 0.01340.6769 780.1641555.5156
Module end 'content' 0.69030.0015 1,335.679712.1250
Script end 0.6918  1,347.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5355160.0002
Check MTime0.00160.2362160.0001
Mysql Total
Database connection0.00100.137910.0010
Mysqli_queries0.630291.0840650.0097
Looping result0.00080.1120630.0000
Template Total0.648593.720.3243
Template load0.00220.314420.0011
Template processing0.646393.421420.3232
Template load and register function0.00020.033810.0002
states
state_id_array0.00140.195310.0014
state_identifier_array0.00110.162620.0006
Override
Cache load0.00180.2594340.0001
Sytem overhead
Fetch class attribute can translate value0.00090.123030.0003
Fetch class attribute name0.00120.167050.0002
XML
Image XML parsing0.00040.058230.0001
class_abstraction
Instantiating content class attribute0.00000.001850.0000
General
dbfile0.00160.2282100.0002
String conversion0.00000.001440.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
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 18
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs