Restrict create privilege where owner of parent is self.

Author Message

Nathan Sharp

Friday 29 September 2006 10:42:22 am

I've looked around a little and haven't found this yet, so my apologies if it has already been requested. I am soon to be administering an image gallery site for a group of people. I would like each person to have create/edit/remove permissions for their own gallery. Obviously I could manually create top-level folders and roles for each person that do this, but I was hoping for something a little simpler. If I could restrict the create privilege to only allow people to create new nodes if the parent node is already owned by them, I think I could implement this with a static list of roles and a user group.

1) Allow users to create folders directly in a top-level node, but not in the subtree
2) Allow users to create folders, galleries, images in any sub-tree of the top-level <i>where they own the parent</i>.
3) Allow users to edit/remove any of the above that they own.

Is this reasonable? Is there some way to accomplish it that I haven't thought of?

Regards,
Nathan

P.S. In a matter of a few hours I was able to put together a site for this group that seriously wowed them. Thanks!

Kristof Coomans

Saturday 30 September 2006 6:05:31 am

Hi Nathan

There was a ParentOwner patch (by Gabriel Ambuehl) submitted for eZ 3.8 on the sdk-public mailinglist (http://lists.ez.no/pipermail/sdk-public/2006-March/002046.html). It didn't make it's way into it but it's definitely worth a try.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Nathan Sharp

Monday 02 October 2006 6:00:55 am

That looks right on! Thanks!

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

Main resources:

Total runtime0.7444 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.2734152.6563
Module start 'layout' 0.00510.0027 741.929739.5078
Module start 'content' 0.00780.7352 781.4375533.2969
Module end 'content' 0.74300.0014 1,314.734412.0938
Script end 0.7444  1,326.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4558160.0002
Check MTime0.00140.1880160.0001
Mysql Total
Database connection0.00080.110710.0008
Mysqli_queries0.699493.9525570.0123
Looping result0.00050.0692550.0000
Template Total0.713395.820.3566
Template load0.00200.269320.0010
Template processing0.711395.546020.3556
Template load and register function0.00020.021610.0002
states
state_id_array0.00110.141810.0011
state_identifier_array0.00180.246520.0009
Override
Cache load0.00160.2187170.0001
Sytem overhead
Fetch class attribute can translate value0.00050.064220.0002
Fetch class attribute name0.00110.148140.0003
XML
Image XML parsing0.00060.076220.0003
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00070.0988160.0000
String conversion0.00000.001140.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/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/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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs