6.0.0-beta1
11/9/25

[#3794] Show only menu items with PERMS_SHOW
Summary Show only menu items with PERMS_SHOW
Queue Wicked
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester tinu (at) humbapa (dot) ch
Created 04/19/2006 (7144 days ago)
Due
Updated 06/17/2006 (7085 days ago)
Assigned
Resolved 06/17/2006 (7085 days ago)
Milestone
Patch No

History
06/17/2006 03:40:08 AM Chuck Hagenbuch Comment #4
State ⇒ Rejected
Reply to this comment
I can always be convinced, but I'm rejecting this for now.
04/21/2006 09:04:20 PM tinu (at) humbapa (dot) ch Comment #3 Reply to this comment
My first idea was to only show the menu item HowToUseWiki from 
conf.xml to authenticated users because guests won't be able to edit 
pages anyway. So the check is only done for the 6 menu items which are 
selected during the wicked setup.



Maybe it would be a better idea to set this on conf.xml. e.g.:

Should we only show links with read permissions? The permission check 
tests only automated links like menu items, page listing or search 
results. Links inside a wiki page won?t be affected. This is a 
performance hit, but may be okay on smaller installations. [true/false]



Of course this would mean some more programming... but I think if we 
really want to do something to hide links, it would be worth the work.

I agree about PERMS_READ. The show permission doesn?t make much sense here.
04/19/2006 03:55:27 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
My initial reaction was that this makes perfect sense. However, it's 
actually inconsistent with how things work inside pages themselves - 
wikiwords just get linked, we don't hide the link somehow if it's to a 
page there aren't permissions for - and the top-level page links are 
to pages that generally aren't going to be restricted. Unless wicked 
itself is restricted, which should take care of that.



Given all that, I'm not sure it's worth the permissions check calls on 
every page to do this. Also, I'd think it should be PERMS_READ; if 
we're going to do it, may as well not show them links they won't be 
able to use, even if technically PERMS_SHOW means they should see that 
the page exists.



I'm open to convincing on all of this.
04/19/2006 01:56:08 PM tinu (at) humbapa (dot) ch Comment #1
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Show only menu items with PERMS_SHOW
Queue ⇒ Wicked
New Attachment: Wicked.php.patch Download
Reply to this comment
this is a small patch who enhances the getMenu methode from class 
Wicked (lib/Wicked.php) to show only menu items with the permission 
PERMS_SHOW.



hope this could be usefull for other users too...



martin lüthi

Saved Queries