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

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

eZ debug

Timing: Jan 31 2025 01:14:37
Script start
Timing: Jan 31 2025 01:14:37
Module start 'content'
Timing: Jan 31 2025 01:14:37
Module end 'content'
Timing: Jan 31 2025 01:14:37
Script end

Main resources:

Total runtime0.1938 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.1953370.2656
Module start 'content' 0.00640.0135 958.46091,001.6250
Module end 'content' 0.01990.1739 1,960.08593,897.1641
Script end 0.1938  5,857.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00412.1355200.0002
Check MTime0.00120.6429200.0001
Mysql Total
Database connection0.00070.384410.0007
Mysqli_queries0.100051.59441410.0007
Looping result0.00130.66421390.0000
Template Total0.173489.510.1734
Template load0.00080.415410.0008
Template processing0.172689.054310.1726
Override
Cache load0.00060.284210.0006
Sytem overhead
Fetch class attribute can translate value0.00190.969510.0019
XML
Image XML parsing0.00040.216710.0004
General
dbfile0.00683.4896200.0003
String conversion0.00000.001530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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