user administrator and roles: how to do with several restricted sections?

Author Message

Daniele P.

Monday 19 January 2004 4:14:00 am

Ez Publish is role-centric because role are assigned to users and
not viceversa.
In this way you have to view all roles (one by one) to know which role is
assigned to one user. This is bad design.
I have the following situation and due to the incomplete role assignment
and managment I can't use eZ publish for my porpouse.

I have 5 restricted areas on my ez publish site.
Some users should have the rights to read form area
1 only, some only from area 2 only, some for all the restricted areas.
So i create 5 roles "view area": view area 1, view area 2... because
is impossible to manage all groups for these combination.

I want to set a simple role for the "user administrator":
- Create new users in "customer group" (and this is simple).
- Assign to the users of "customer group" the right role: one or more
of the "view area" roles.

Is possible?
I can only assign to the "user administrator" the role policy:
role * *
that is too large.

If I can't manage such type of accounting I accept suggestion for
workarounds.

Thanks in Advance.
Daniele

Marco Zinn

Monday 19 January 2004 10:10:41 am

I don't know, how diverse the permission system for the role module is, but i guess, you tried this out.

One workaround would be:
Create 5 User groups ("Readers of Forum 1", "Readers of Forum 2") under the "Customer group".
Assign one of your 5 roles to each group.
Now, by storing users in one or more groups (this is possible), your user admins have control over the read rights.

You must test, if this really works. There WAS a bug with policy inheriting through user groups, but i guess, it's solved now.

Marco
http://www.hyperroad-design.com

Daniele P.

Monday 19 January 2004 12:24:36 pm

It works out of the box for eZ 3.3-1 (3.3).
It's a lot of repetitive work to set ut 5 sections, 5 user gruops and 5 role policies.
I tested the simplest conf:

USERS ROOT
|-- SEC1
| |-- USER1
| '-- USER12
`-- SEC2
|-- USER2
`-- USER12

USER12 can read from SEC1 and SEC2
Now I'm going to test the followings (whic are more useful):

USERS ROOT
`-- COMMONSEC
|-- SEC1
| |-- USER1
| '-- USER12
`-- SEC2
|-- USER2
`-- USER12

USERS ROOT
|-- COMMONSEC1
| |-- SEC1
| | |-- USER11
| | |-- USER12
| | '-- USER1212
| `-- SEC2
| |-- USER12
| |-- USER22
| '-- USER1212
`-- COMMONSEC2
|-- SEC1
| |-- USER1
| |-- USER12
| `-- USER1212
`-- SEC2
|-- USER2
|-- USER12
`-- USER1212

This is not the best solution (I really need a limited role editor, and a speedy setup for policies) but it seems to work.

What about if two user grop have opposite role?
In my test I only add read permission to a section.

Thanks,
Daniele

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 19:36:32
Script start
Timing: Jan 18 2025 19:36:32
Module start 'layout'
Timing: Jan 18 2025 19:36:32
Module start 'content'
Timing: Jan 18 2025 19:36:33
Module end 'content'
Timing: Jan 18 2025 19:36:33
Script end

Main resources:

Total runtime1.1335 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.0059 588.3516152.6563
Module start 'layout' 0.00590.0034 741.007839.4922
Module start 'content' 0.00931.1224 780.5000561.3203
Module end 'content' 1.13160.0018 1,341.820312.0781
Script end 1.1335  1,353.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.3701160.0003
Check MTime0.00140.1226160.0001
Mysql Total
Database connection0.00090.080610.0009
Mysqli_queries1.067194.1384570.0187
Looping result0.00060.0532550.0000
Template Total1.103397.320.5516
Template load0.00220.191520.0011
Template processing1.101197.139820.5505
Template load and register function0.00020.021410.0002
states
state_id_array0.00090.080310.0009
state_identifier_array0.00240.209220.0012
Override
Cache load0.00190.1674790.0000
Sytem overhead
Fetch class attribute can translate value0.00080.068420.0004
Fetch class attribute name0.00270.235540.0007
XML
Image XML parsing0.00070.061920.0004
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00110.0973160.0001
String conversion0.00000.000740.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
14content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 35
 Number of unique templates used: 6

Time used to render debug report: 0.0003 secs