It appears that setting permissions on a per menu basis is non-functional. When setting the permission on a menu I would expect to be able to assign any item in that menu as a parent and I am unable to do so.

Comments

rwohleb’s picture

Assigned: Unassigned » rwohleb

I'll take a look.

slosa’s picture

I really need to give permissions to an entire menu and all its children as well. particularly from the menu settings section of the edit page screen.

ShaneEaston’s picture

We were using this module for D5 and when we upgraded to 6 this stopped functioning.

diederik_2mpact’s picture

Same problem here, I'd like to restrict user permissions to a complete menu rather than to a subtree. How can I do this?

rubs’s picture

Not sure if this is the same subject, but it seems that changing the permissions on the root level does not do anything. Thus, when creating or editing a page, the root level e.g. "" never appears in the combo box inside the Menu Configurations group.

zilverdistel’s picture

subscribing

otterb’s picture

Subscribe

Hk001’s picture

Subscribe

stefan vaduva’s picture

I had the same problem for node creation form (permission set on the root menu but no items in the parent menu select box when I'm creating a new node). After a quick look I've seen that the items are removed from parent menu select box even if the user has access for the root menu. I've solved my problem by modifing the code:

find

// If no permissions for this menu item, remove it.
    elseif (!isset($mitems[$menu_name][$plid])) {
      unset($form['menu']['parent']['#options'][$option]);
    }

change to

// If no permissions for this menu item, remove it.
    elseif (!isset($mitems[$menu_name][$plid]) && !in_array($menu_name, $mroots)) {
      unset($form['menu']['parent']['#options'][$option]);
    }

Please note that this solution is ONLY for the node creation form.

stefan vaduva’s picture

Also, I think that _menu_stp_has_perms_roles needs to be changed to handle the case when an item has as a direct parent another menu that doesn't have valid permission, but is bellow a root level menu that has valid permission. I hope it makes sense :).

I can't really look into this now, but if nobody will, I'll try to solve this tomorrow.

And rwohleb, thanks alot for this module! Is very useful (at least for me).

lucascaro’s picture

hi stefan, could you check this issue? I'm having the same problem on node/*/edit for menus that are direct childs of an allowed root menu and no menu options show in the form (_menu_stp_has_perms_roles($plid, $rids)) on line 123 returns false)

drasgardian’s picture

subscribe

emptyvoid’s picture

Perhaps I'm totally missing the issue here but what you are describing seems to be the idea of cascading permissions for menus and menu items. Just a note the menu_access module does just that.

Anonymous’s picture

Status: Active » Closed (fixed)

This has been implemented as part of the development path of Advanced Menu (http://drupal.org/project/advanced_menu). I recommend using that module.