Attribute based permissions ?

Author Message

Nabil Alimi

Wednesday 02 February 2011 3:54:55 am

Hi,

I've got a quite simple issue. I've searched ressources for that but no succes. I'd like to define the content to which an user has access based on an attribute (object relation) of the group he belongs too so it can be dynamic.

Simple example, i have user group "tennis".

In my content tree, I have

Sport

-- Tennis

i'd like to have a relation object in the tennis user group so i can match my group with the content tree node.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Ivo Lukac

Wednesday 02 February 2011 4:00:58 am

I advise you to make a simple workflow (triggered by the publish of the object with relation) which will add a policy for the user.

Look at this extension for the code: http://projects.ez.no/personal_folder

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Ivo Lukac

Wednesday 02 February 2011 4:02:02 am

"

Look at this extension for the code: http://projects.ez.no/personal_folder

"

Forgot to emphasize that this is a very old project (PHP4) so you will need to adopt it for new ez versions and PHP5

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

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 02:20:54
Script start
Timing: Jan 18 2025 02:20:54
Module start 'layout'
Timing: Jan 18 2025 02:20:54
Module start 'content'
Timing: Jan 18 2025 02:20:55
Module end 'content'
Timing: Jan 18 2025 02:20:55
Script end

Main resources:

Total runtime0.6687 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.3984153.4688
Module start 'layout' 0.00700.0029 742.867239.4297
Module start 'content' 0.00990.6574 782.2969549.8750
Module end 'content' 0.66730.0014 1,332.171912.1484
Script end 0.6687  1,344.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4596160.0002
Check MTime0.00120.1811160.0001
Mysql Total
Database connection0.00090.137410.0009
Mysqli_queries0.618392.4697590.0105
Looping result0.00050.0772570.0000
Template Total0.643196.220.3215
Template load0.00170.259620.0009
Template processing0.641395.908020.3207
Template load and register function0.00010.017110.0001
states
state_id_array0.00070.102110.0007
state_identifier_array0.00070.107720.0004
Override
Cache load0.00140.2159220.0001
Sytem overhead
Fetch class attribute can translate value0.00080.114820.0004
Fetch class attribute name0.00100.156050.0002
XML
Image XML parsing0.00110.159920.0005
class_abstraction
Instantiating content class attribute0.00000.001960.0000
General
dbfile0.00090.1400230.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs