Access right per user per node ?

Author Message

Xavier Dutoit

Tuesday 13 June 2006 7:58:08 am

Hi all,

I'd like to create a more collaborative document oriented site.

The owner (and some power users) should be able to grant access right more easily than with the existing admin interface (ie. no need to modify the roles and assign them to groups/nodes, no need to create new sections...).

1) I want to let him the right to choose one or several groups of users and let him grant them a read right on the current node.

2) In also want to let him the right to choos one or several users and let him grant a read or edit right on the current node.

For 1) the features exists and I intend to develop a new extension, where you can for each node add it to a role (add a new content read policy limited to a node for instance).

Not sure how to avoid to start creating roles by dozen and have a f*** mess in a second (probably creating one role per user group and add the read/edit policy restricted to the current node).

Not so sure yet on the feature, nor if it is going to be a big problem on the performance.

For 2) unless I've missed something, that isn't ez standard at all. I don't have any idea of how to do that without ending with one role per user (something I'd rather avoid ;)

I don't know if it would make sense to patch the kernel to add these features.

Anyway, I'd like to discuss that with you, any idea or suggestion more than welcome !

X+

http://www.sydesy.com

Paul Borgermans

Tuesday 13 June 2006 8:53:37 am

Hi Xavier

2) is possible, one role per node wuth different users/groups assigned this role

The best option is to create a small extension which looks up the role if it exists, add/remove users/groups from the node specific role.

The hardest part will be the interface, but look at Kristof's AJAX extensions which provide the best ground to build upon for that

BTW: we need it too, just got a request from a collegue wanting the same ... no option to change their idea with predefined roles on subtrees and simplify their needs.

Regards

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Xavier Dutoit

Tuesday 13 June 2006 9:09:46 am

Hi Paul,

You're right, having one role per node and assign it to users is probably easier than one role per user and restrict it to nodes.

Probably a few tricky things to sort out, eg. no need to create a new role to grant right to someone that has already access rights because he's a member of a group that has access rights to it.

Do you have any idea of the impact on the performance ?

I've used Kristof's ajax, that's definitively the way to go.

As for the timing on my side, that's exploratory so far, just to see if it's possible and not too outside of the scope of ez. The dev (if it happends) is probably going ot be end of july/early august. I obvioulsy intend to let it GPL, let's talk privately once I've got more visibility on my side (or next time you're in BXL with Kristof, as he won't be able to go back home on his own with the amount of beer I'm going to feed him with ;)

X+

http://www.sydesy.com

Xavier Dutoit

Tuesday 13 June 2006 9:17:26 am

On a second thought, a clever interface should not let the user grant access to a user that has already on this right, ie calculate the access right for each user. I'd guess that without ajax coating, that'd be paintfully slow.

X+

http://www.sydesy.com

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 19 2025 01:15:08
Script start
Timing: Jan 19 2025 01:15:08
Module start 'layout'
Timing: Jan 19 2025 01:15:08
Module start 'content'
Timing: Jan 19 2025 01:15:09
Module end 'content'
Timing: Jan 19 2025 01:15:09
Script end

Main resources:

Total runtime0.8009 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.1563152.6250
Module start 'layout' 0.00700.0036 741.781339.4453
Module start 'content' 0.01060.7888 781.2266556.7188
Module end 'content' 0.79940.0015 1,337.945316.1563
Script end 0.8009  1,354.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4769160.0002
Check MTime0.00140.1774160.0001
Mysql Total
Database connection0.00170.210310.0017
Mysqli_queries0.734391.6822600.0122
Looping result0.00060.0722580.0000
Template Total0.761095.020.3805
Template load0.00210.266220.0011
Template processing0.758894.749420.3794
Template load and register function0.00010.013210.0001
states
state_id_array0.00120.151310.0012
state_identifier_array0.00130.167820.0007
Override
Cache load0.00190.2334380.0000
Sytem overhead
Fetch class attribute can translate value0.00060.075320.0003
Fetch class attribute name0.00200.254860.0003
XML
Image XML parsing0.00140.177520.0007
class_abstraction
Instantiating content class attribute0.00000.002480.0000
General
dbfile0.00200.2511230.0001
String conversion0.00000.001040.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 5

Time used to render debug report: 0.0001 secs