Roles for users...

Author Message

Jorge estévez

Monday 26 January 2009 6:16:16 am

Hello!

I am making a site for artists, designer, the intention is to allow any registered user to create their own tree of nodes with all their information.

artist - work
- information
- contact

and so on...

I wanted to allow create xxx class
if ( parent class is yyy and was created by the current user logged in)

I cannot (seems to be not allowed) to set the rule "if parent class - owner-self"

I intend to do a different approach:

1. get the user ID (logged in)
2. get the parent class (get the creation user id)
3. See if they are the same (parent was created by the current user)

Add the class options to the website toolbar if condition is set.

Is there any other way of doing this? A different approach?

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

André R.

Monday 26 January 2009 8:09:05 am

"if parent class - owner-self / owner-group-self" support is one of the new features in 4.1.
Until then it can be archived with a custom view or some template logic, not as secure or clean but it could work.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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

Main resources:

Total runtime1.0461 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.7891152.6094
Module start 'layout' 0.00670.0044 740.398439.4141
Module start 'content' 0.01121.0335 779.8125528.1250
Module end 'content' 1.04460.0014 1,307.93758.1875
Script end 1.0461  1,316.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3692160.0002
Check MTime0.00140.1324160.0001
Mysql Total
Database connection0.00120.110610.0012
Mysqli_queries0.998195.4109540.0185
Looping result0.00060.0544520.0000
Template Total1.005596.120.5027
Template load0.00250.241120.0013
Template processing1.002995.872220.5015
Template load and register function0.00020.017310.0002
states
state_id_array0.00200.191410.0020
state_identifier_array0.00230.218820.0011
Override
Cache load0.00210.1978230.0001
Sytem overhead
Fetch class attribute can translate value0.00070.070420.0004
Fetch class attribute name0.00100.092530.0003
XML
Image XML parsing0.00060.056520.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00080.0787170.0000
String conversion0.00010.004840.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
2content/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
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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