When you place a drupal menu block, menu items that the user does not have access to are not displayed. However, when building a menu view with this module, all menu items are shown regardless of user permissions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Yup. Care to work a patch?

agentrickard’s picture

Note: I think we need a hook_views_query_alter() here, to assert that {menu_links}.hidden == 0. Not sure, however.

agentrickard’s picture

FileSize
2.14 KB

Here is the basis for a full patch. This adds filters for 'hidden', 'external', 'has_children' and 'external' columns. These need better handlers.

For now, set the filter 'Menu: Visibility" to 'is equal to' zero.

agentrickard’s picture

Status: Active » Needs review
gabriel.achille’s picture

Title: menu item access restrictions » Expose menu_links attributes
Category: bug » feature
FileSize
1.67 KB
1.76 KB

Following integration of the patch Exposed "hidden" field (in both 6.x-1.x and 7.x-1.x branch) we had to reduce the scope of this one: attribute hidden is already exposed.

Plus i changed some wording of description field to stick to the description present in the schema information for the menu_links table (modules/system/system.install)

This patch should actually work for both 6.x an 7.x

agentrickard’s picture

@gabriel.achille

This module is seeking a new maintainer. Is your team interested?

gabriel.achille’s picture

@agentrickard
Mmmm yes I've been thinking to that since our last exchange on issue 1361746 on menu_node module. I am assuming we are talking of maintenance for both modules menu_node and menu_node_views. Are we not ? How many time do you usually spend for this 2 modules, or how many time you think you should spend ? ;)
I need to have a quick talk here internally but yes my personal opinion is that this is a reasonable module to start maintenance with and i am keen to do it.

agentrickard’s picture

Do I spend? Zero.

Should I spend? 2 hrs/week.

gabriel.achille’s picture

ok
are we talking about maintenance for both modules menu_node and menu_node_views ?

agentrickard’s picture

Yes. They are fairly stable. MNV gets more requests these days.

gabriel.achille’s picture

@agentrickard:
Just had a quick talk internally with my team (3 dev including me), and that definitely something we can do.
How shall we proceed ?

agentrickard’s picture

I'll give you commit access and release management and monitor for a bit. Then we can transfer project ownership after a stable release or two.

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)