Share » Forums » Setup & design » Problems with showing menu item based...

Problems with showing menu item based on rol...

Problems with showing menu item based on rol...

Monday 21 February 2005 4:40:26 am - 7 replies

Author Message

Nathan Mann

Wednesday 23 February 2005 8:30:03 am

Does anyone have any input on this? I am having the exact same issue with 3.5.0.

I have some of the sub-folders of the main folder assigned to a "members only" section to prevent anonymous users from accessing them. That part works fine.

However, when I log in as a user, I can not see the "members only" sub-folders until I go into one of the other sub-folders, at which point I can now see all of the folders I should be seeing. As soon as I go back up to the top-level folder, the protected folders dissapear again.

Does anyone have any suggestions?

-nathan

Gabriel Ambuehl

Wednesday 23 February 2005 8:49:48 am

That's probably a cache problem. Try surrounding it with a cache block whose key includes the role or something like that, so that there are two different versions based on the role id.

Visit http://triligon.org

Nathan Mann

Wednesday 23 February 2005 9:08:38 am

Gabriel, thanks for the quick response. I had also suspected a problem with the cache, but am not familiar with the cache manipulation directives.

I am searching through the documentation and forums for more information regarding how to do what you suggested. Any pointers/info you might have to offer would be greatly appreciated.

Thanks again,

-nathan

Nathan Mann

Wednesday 23 February 2005 10:04:00 am

OK, I found the info that I needed to implement Gabriel's suggestion.

For anyone that is interested:

1. Create an override for pagelayout.tpl and copy the original contents to the override.
2. Find the cache blocks for all of the menus
3. To each cache block change the keys to the following:
keys=array('my_cache_block',$uri_string,$current_user.role_id_list|implode(',')) expiry=86400

There may be a better way to do this, but I needed a quick fix and this worked. Any suggestions on improvements would be appreciated.

Thanks again Gabriel for the pointer.

-nathan

Gabriel Ambuehl

Wednesday 23 February 2005 10:51:44 am

Hey, it was more like a wild guess. But thanks for testing that, I might run into that myself some day ;-)

Visit http://triligon.org

Richard Francken

Monday 28 February 2005 1:01:01 pm

Hi Nathan and Gabriel,

Thanks for your help. The quick solution works fine. So I'm happy.

Richard

fabio bongiovanni

Thursday 15 September 2005 8:23:37 am

Hello

I?m using ez 3.6.1.
I've tried the work-around, but on my installation
it doesn't work, always the cached copy is used.

 

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu