Posted by darthclue on April 27, 2009 at 1:14pm
Jump to:
| Project: | Menu Subtree Permissions |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | rwohleb |
| Status: | active |
Issue Summary
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
#1
I'll take a look.
#2
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.
#3
We were using this module for D5 and when we upgraded to 6 this stopped functioning.
#4
Same problem here, I'd like to restrict user permissions to a complete menu rather than to a subtree. How can I do this?
#5
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.
#6
subscribing
#7
Subscribe
#8
Subscribe
#9
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
<?php
// If no permissions for this menu item, remove it.
elseif (!isset($mitems[$menu_name][$plid])) {
unset($form['menu']['parent']['#options'][$option]);
}
?>
change to
<?php
// 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.
#10
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).
#11
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)
#12
subscribe
#13
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.