The following patch extends menu_per_role_form_alter() to attach the menu_per_role form items to a node create / node edit form.

It requires a minor change in menu_per_role_form_submit(), since the menu data is nested inside a 'menu' array when coming from the node form.

CommentFileSizeAuthor
mpr.patch1.71 KBagentrickard

Comments

agentrickard’s picture

Status: Active » Needs review
fago’s picture

Status: Needs review » Needs work

hm, a nice feature, however I'm a bit worried that users don't like it there.
Could you add a new permission "Modify menu item access" or similar as well as checks for this permission to the module?

Then administrators could disable this for some users.

agentrickard’s picture

Makes sense. I even thought of that. So menu_per_role() would have a setting:

[] show menu options on node forms

Or should this be an access control rule?

"assign during node edit"

fago’s picture

I can think of two ways:
* add an access control permission like "Modify menu item access" - which would in affect allow one to remove it from node forms for certain users based on roles
* we create a settings page and add the setting "show menu options on node forms" *AND* add the access control permission from above.

AlexisWilke’s picture

This is 3 years old... I'm closing it. Hopefully you'll be able to upgrade to 6.x and get that resolved. There are no 5.x maintainers.

AlexisWilke’s picture

Status: Needs work » Closed (won't fix)

Looks like I missed changing the status... 8-)