Active
Project:
Path Access
Version:
7.x-1.0-beta2
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2008 at 01:21 UTC
Updated:
7 Mar 2014 at 23:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
buddaFor future reference the magic is done in:
Comment #2
redndahead commentedI tried figuring out how to convert this d5 code to d6 and it didn't work out. There may be still a solution. What I decided to do is use javascript to check all menu items on the loaded page.
Attached is the patch that handles this.
Comment #3
buddaCould this be handled by http://api.drupal.org/api/function/hook_menu_alter/6 in D6?
Comment #4
MedicSean37 commentedYeah I have the same issue!
Comment #5
jmcerda commentedI think this should be an option and not set in the code as I like the fact that the menus still show up so the user can see what options they would have as an authenticated user. I would like an option for the path restriction to display the user a popup window with a definable message letting the user know that there is restricted access.
Comment #6
verta commented+1 for making this optional
Comment #7
verta commentedSide note, Nonviewable Menu Items http://drupal.org/project/remove_nonviewable_menu_items is for D5, there is no D6 version.
Comment #8
Renee S commentedAnother +1 for optional. I definitely want people to see the menu items they don't have access to... so they know what's there :)
Comment #9
Mamoun commentedSubscribe
Comment #10
mrfelton commented+1 for optional. One of the main reasons I'm looking at this module over other access modules is that this one allows the menu items to remain in the menu, meaning that users can still see what menu items would be available if they were logged in.
Comment #11
mrfelton commentedIn the Drupal 7 branch, access checking is done using hook_menu_alter and so the menu items are hidden when access to them is restricted - this is Drupal core behavior.
There is a module called always_visible which lets you mark menu items as being always visible regardless of the user's permission to view the content.
It's think it's better to have the access module remove the menu items (as in the case with path_access for D7) as this is standard and expected behavior, and then if people want those menu items to show regardless, then use the always_visible module.
I'm now maintainer of this module, and have been working mainly on the Drupal 7 branch. However, I think it would be good if both the D6 and D7 branches did the same thing - ie. restricting access to a menu item should remove it from the menu, and then use always_visible if you still want it to show. It's a more flexible approach, and is more inline with how other access modules behave.
I don't use the D6 version of this module, but how do you all fee about altering it so that it is more inline with how things are being done in D7? It would probably make upgrading easier for you.
Comment #12
mrfelton commentedComment #13
Firetracker commentedHi,
Any news on this being 'fixed'. It would be really useful if version 6 worked as per 7.
Cheers
Zap
Comment #14
AlexisWilke commentedThis is actually documented on the front page... The path access is not checked the same way as the menu otherwise expects.
This being said, I would think that the project page of this module should mention the Menu per Role module as an extension one can use to hide "unwanted" menu items.
Thus, at this point, there is probably no need to make the Path Access 6.x module more complicated than it needs to be. There is no Menu per Role for 7.x (yet) so that could be something to add...
Thank you.
Alexis Wilke
Comment #15
buddaI've added the Menu Per Role module link to the Drupal 6 section of the homepage.
Comment #16
Renee S commentedI don't know, always_visible isn't even released yet, and it would be just for 7. I think making it optional for 6 would be ideal - consistency only makes sense if everything else is equal, and in this case it isn't...
Comment #17
NoRandom commented#11 It's not working for me in D7 with beta1. The access control works perfectly but users with access restricted can still see the menu item. In case it helps, in my case the problem is in the main_menu.
Regards.
Comment #18
Lloyd commentedSame issue. Menu still appears although anonymous users do not have access. Also using an item in the main menu.
Comment #19
hkirsman commentedI created views page path and tried to restrict access. Didn't work. tried PATH and PATH/*
Comment #20
oystercrackher commentedSame issue here.
I have placed "user/register", , and other pages under anonymous users for testing purposes and all are still visible.
Please advise.
Thanks
Comment #21
oystercrackher commentedChanging to active bug report in hopes of getting a response as this seems to be functionality that is available but may not be working properly.
Thanks
Comment #22
buddaThe Path Access module is not attempting to do anything itself to hide menu items of urls which are restricted. So this thread is a feature request.
Comment #23
rudolfbykerIf this is NOT a bug, then WHY does the actual behaviour differ from that stated on the module page?
Stated:
Actual behaviour: (Steps to reproduce)
Comment #24
adamps commentedI confirm #23. So #11 is not true for me.
I have set it back to a bug, because as per #23, the module page clearly states that menu items will be hidden in D7. If the maintainer does not wish to support this behaviour, then it is at least a documentation bug - please could you update the module page?