User groups of groups management

Author Message

Alexandre Abric

Tuesday 22 November 2005 6:51:34 am

Hi,

I am currently designing the security model of a new Internet web site and we need to manage groups of groups.

For instance, let's say a user John Smith works for the company MacDonalds. MacDonalds has purchased the products : Foo and Bar.

Our user accounts administration page looks like this :
- Companies (user group)
- - MacDonalds (user group)
- - - John Smith (user)
- Products (user group)
- - Foo (user group)
- - Bar (user group)

The goal is to grant access to the support pages of the product Foo (that belongs to the section "Foo" of the web site) and the product Bar (that belongs to the section "Bar" of the web site) for John Smith. "Foo" section is accessible for users that belong to user group "Foo" (same for Bar).

In a "eZ-perfect world", I would click "add location" on teh MacDonalds node and add a location bellow teh nodes "Foo" and "Bar" => Users that are in "MacDonalds" user group would also be added to Foo and Bar.

- Companies (user group)
- - MacDonalds (user group)
- - - John Smith (user)
- Products (user group)
- - Foo (user group)
- - - MacDonalds (user group)
- - - - John Smith (user)
- - Bar (user group)
- - - MacDonalds (user group)
- - - - John Smith (user)

<b>In other words, we need a groups of groups functionnality in eZ Publish => is this planned in future releases ?</b>

Now the two possible workarounds I have found :

- Develop a workflow that automatically adds the user to the "MacDonalds" user group, and then adds him to the groups "Foo" and "Bar". (I have already developped such a workflow, but the assignments are statically configured in INI files, so this is not very flexible. I would develop a dynamic assignment workflow this time)

- Use reverse related objects attributes in custom user groups. And then develop a custom Admin interface to recursively fetch reverse related objects.

<b>What do you think of this design ? How do you usually manage this ?</b>

Arran Price

Tuesday 22 November 2005 12:58:06 pm

Hi Alexandre,
I may not have quite understood your situation, but can you not do what you need with roles?
if you have roles (probably as well as groups) for MacDonalds, Foo and Bar
you can assign the group MacDonalds to the the appropriate roles (which in this case would be all 3 roles MacDonalds, Foo and Bar). As ultimately roles define access.

Does that make sense?
In that way, all new members of the group, automatically pick up the correct permissions due to the group being assigned permissions as part of the role definition.

Hope thats of help

Arran

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 30 2025 21:37:36
Script start
Timing: Jan 30 2025 21:37:36
Module start 'layout'
Timing: Jan 30 2025 21:37:36
Module start 'content'
Timing: Jan 30 2025 21:37:36
Module end 'content'
Timing: Jan 30 2025 21:37:36
Script end

Main resources:

Total runtime0.0269 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1563151.2109
Module start 'layout' 0.00530.0049 739.3672220.6875
Module start 'content' 0.01020.0149 960.0547997.6953
Module end 'content' 0.02510.0018 1,957.750033.9922
Script end 0.0269  1,991.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003011.0785140.0002
Check MTime0.00134.6872140.0001
Mysql Total
Database connection0.00082.790010.0008
Mysqli_queries0.002710.148530.0009
Looping result0.00000.051410.0000
Template Total0.00124.610.0012
Template load0.00103.611110.0010
Template processing0.00031.007110.0003
Override
Cache load0.00072.452510.0007
General
dbfile0.00166.117680.0002
String conversion0.00000.032840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs