Forums / Setup & design / Showing menu items the user does not have access to

Showing menu items the user does not have access to

Author Message

Kjell Rune Skaaraas

Friday 15 April 2005 6:23:20 am

I got a site with several sections, some with login required. I want these menu options to be visible even if the user is not logged in (with a lock icon, got that part done). However, when I assign the folders to a different section, they disappear from the menu. If I access it directly, the path (e.g. "ez.no / Community / Forum" is also broken with a "Kernel error (1)".

If I assign "read" access to the anon user, that would give them read permission on all the content. I can build the menu manually but that is annoying. And I'm not at all sure how to fix the path. Anyone know how to fix this?

nga patel

Friday 15 April 2005 6:37:59 am

Hi, Skaaraas
Sorry........
I could not understand your problem very well so let me clear that you have the problem of disappering the menu when you click on the subfolder

so you wnat to set the path related to it????

Right?

Xavier Dutoit

Friday 15 April 2005 6:49:17 am

Hi,

Well, either the user can read or can't. If he doesn't he gets a kernel 1 error when trying to access it. Logical.

What I would suggest is to put these "half visible" items on a special section, and on the view full, display something different based on the group of the user (eg, if he's anonymous, don't display the content but just a "forbidden" message).

That's the same for the menu item, display the lock if he's anonymous.

X+

http://www.sydesy.com

Kjell Rune Skaaraas

Sunday 17 April 2005 11:53:10 pm

Maybe I didn't make this clear enough. I use the default menu template's way of building the menu, which lists all sub-folders, but only those folders the current user has read rights to. I want to show the folders the user does not have access to, but display a login page instead.

So problem #1 is missing menu items (considering just building this manually)

The "content" block does this already ($module_result.content} but the path does not. So I get the login page where the content should be, BUT with a "Kernel error (1)" where the path should be.

So problem #2 is a kernel error on the login page.

If I could do something like this in path.tpl:

"Section show=module.isReadable()"
(...current code)
"Section-else"
Access denied
"Section-end"

That would work just fine, but I can't figure out just how. Right now I think I'll just build the menu manually to add the "missing" links, but I still need to fix the path so that it'll only access the module if the module is readable.

Kjell Rune Skaaraas

Sunday 17 April 2005 11:58:49 pm

Bah, forgot to ask something on #1. Is there a NON-INHERTIABLE read access in eZ? That'd solve my first problem quite elegantly. I've looked but not found it. If the anon user can access the folder properties, but not the contents, that'd be perfect.

James Ward

Wednesday 29 June 2005 2:22:26 pm

Sounds like you need to use the node limitation available in newer version of ez. (can't remember which version it starts in) Just grant the ability to read your non member sections then create a seperate policy to allow read access on only the top level nodes of the members only folders.

working at www.wardnet.com
blogging at www.jamesward.ca

eZ debug

Timing: Jan 18 2025 22:30:50
Script start
Timing: Jan 18 2025 22:30:50
Module start 'content'
Timing: Jan 18 2025 22:30:50
Module end 'content'
Timing: Jan 18 2025 22:30:50
Script end

Main resources:

Total runtime0.1506 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9375180.8125
Module start 'content' 0.00600.0051 768.750097.9297
Module end 'content' 0.01100.1395 866.6797526.3750
Script end 0.1505  1,393.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.1990200.0002
Check MTime0.00130.8604200.0001
Mysql Total
Database connection0.00070.465710.0007
Mysqli_queries0.105169.82961410.0007
Looping result0.00140.94701390.0000
Template Total0.139292.410.1392
Template load0.00060.419810.0006
Template processing0.138592.013110.1385
Override
Cache load0.00050.298910.0005
Sytem overhead
Fetch class attribute can translate value0.00110.723310.0011
XML
Image XML parsing0.00030.200010.0003
General
dbfile0.00382.5105200.0002
String conversion0.00000.004030.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