Forums / Setup & design / Roles and blocking access to folders

Roles and blocking access to folders

Author Message

Steve Conrad

Tuesday 11 January 2005 2:40:51 am

Hi there,
I have a problem that I can't seem to solve.
I'm working on an Intranet that isn't using virtual hosts.

I have a structure like this:

HOME
|--- Sub1
|--- Sub2
|--- Sub3

When an admin user logs on they get the Sub1-3 at the top of the page as links to visit and the address they are looking at is http://server/index.php/home/

This is all working fine.

However, I also want a set of users that can only see folder sub3.

I set up a role that has the following access:
Business (limited to subtree /1/2/79/) user all functions Nolimitations
Business (limited to subtree /1/2/79/) content read Nolimitations

[I've also tried:
user all functions No limitations
content read Subtree( Sub3 )
]
at is http://server/index.php/home/ and they are only authorised to read http://server/index.php/home/Sub3 and downwards?

How can I either (a) authorise a user to the http://server/index.php/home/ folder, but not include Sub1 and Sub2 at the same time or (b) Force a user logging on under this role to automatically jump to http://server/index.php/home/Sub3 after logging on?

Once I get the 'access denied' page I can actually change the URL myself to go to http://server/index.php/home/sub3 and this works fine (Except if I click the logo where it tries to jump back to http://server/index.php/home/ again!).

Secondly, I've also noticed that if I log on as this business user and try to edit it's own account I again get an 'access denied' since the URL I'm getting is http://server/index.php/home/content/edit/289 (289 being the number of the user in question). I'm assuming the function 'selfedit' under user should allow this - but I'm not getting the option to work. Strangely the 'change password' option does work though!

Eivind Marienborg

Tuesday 11 January 2005 3:17:21 am

You could try setting up different sections for the different folders, and grating access based on those.

Steve Conrad

Tuesday 11 January 2005 3:28:35 am

Hmm.. as I thought -
Adding a section (Business_section) and assigning a subtree to this, then setting the role to:
user all functions No limitations
content read Section( Business_section )

Still gives me the same result - i.e. the user is only authorised to the sub-tree 'sub3' and not to the main page 'home', and the main page is not a subtree itself that I can add to anywhere (either a role directly or via a section) :(

Steve Conrad

Tuesday 11 January 2005 4:08:06 am

Ah - some more playing about and I think I'm close to a solution:

The breakthrough was noticing an UpArrow icon on one of the screens!
When you add a subtree (or a single node even) the system shows you the main set of subtrees automatically. However, I've now noticed that you can use an uparrow icon (top left, above the 10,25,50 figures). This allows you to move above the subtrees and back to the top level node (Home in my case).
I can then select this and authorise just the Home node to the policy plus the subtree(s) of my choice.
I've now got the policy looking like this:
user all functions No limitations
content read Node( Home )
content read Subtree( sub3 )
And this seems to fix my problem.
:)

Steve Conrad

Tuesday 11 January 2005 4:11:12 am

In the same vein, adding the following to the policy:
content edit Subtree( Users )
content read Subtree( Users )

Has enable me to get the restriced user to be able to update their own account details.

eZ debug

Timing: Jan 18 2025 11:16:44
Script start
Timing: Jan 18 2025 11:16:44
Module start 'content'
Timing: Jan 18 2025 11:16:44
Module end 'content'
Timing: Jan 18 2025 11:16:44
Script end

Main resources:

Total runtime0.2149 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0088 587.8359180.8281
Module start 'content' 0.00890.0088 768.664197.8984
Module end 'content' 0.01770.1970 866.5625529.3281
Script end 0.2147  1,395.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00391.7950200.0002
Check MTime0.00150.7076200.0001
Mysql Total
Database connection0.00130.620810.0013
Mysqli_queries0.163676.11991410.0012
Looping result0.00150.69961390.0000
Template Total0.196591.410.1965
Template load0.00110.527410.0011
Template processing0.195390.913210.1953
Override
Cache load0.00070.322610.0007
Sytem overhead
Fetch class attribute can translate value0.00080.375610.0008
XML
Image XML parsing0.00040.168010.0004
General
dbfile0.00160.7525200.0001
String conversion0.00000.003730.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.0003 secs