I use the menu admin per menu module, which allows menus to be restricted by role. The main advantage of this module for me is that users can only see menus they have permission for without them seeing those that they don't have permission for (even the default menu defined in admin/build/menu/settings).

I have installed the domain module, and still have menu admin per menu installed.

If a role DOES NOT have permission for the default domain menu defined in the domain settings then NO menu settings are displayed on node/add.

If a role DOES have permission for the primary domain menu then the menu settings on node/add shows the default menu and any other menus they have permission for.

Can the domain module be modified to give the same functionality or do I need to raise this as a request on the menu admin per menu module?

Comments

agentrickard’s picture

You probably need to use hook_domainconf() or hook_domainbatch() to make menu-per-role settings per domain.

mbiddlecombe’s picture

Title: Integration with Menu Admin Per Menu Module » Integration with Domain Access
Project: Domain » Menu Admin per Menu
Version: 6.x-2.0-rc9 » 6.x-1.2

I raised this issue about the integration with the Domain Access module. Is this something the Menu Admin Per Menu guys could advise me on?

mbiddlecombe’s picture

I 'fixed' this by commenting out the line

          if ($option_key == $default_value) {
            return;
          }

in function menu_admin_per_menu_form_alter

Will this have any negative consequences that I cannot forsee?

anrikun’s picture

Hi mbiddlecombe,
Please have a look at http://drupal.org/node/571026 for an explanation about why what you commented out is needed.
Tell me if that answers your question.

mbiddlecombe’s picture

it doesn't really. Aside from the domain integration, I've realised that something is not quite right with this module. I was just helping a user with restricted permissions.

When she edits a previously created node with a menu item it shows the menu item and a filtered list of menus - correct behaviour. But when she creates a node she has no menu settings at all. In fact she cannot create a menu entry herself, and can only edit if it has been created by someone else.

If i comment out the

if ($option_key == $default_value) {
  return;
}

she can see menu settings on node creation as well as node editing. And the menu list is filtered correctly on creation and editing.

So I'm not quite sure what the code is for? The module seems to function as I would expect if it removed and not if it remains.

anrikun’s picture

Could you please post the menu related permissions for this user.
And also the other menu related modules you use if there are.
Thanks.

The purpose of the part you commented out is not to show menu settings field to the user when edited node is linked to an item of a menu the user has not the right to administer.

mbiddlecombe’s picture

I understand the purpose of the code, but it seems to remove any menu options when a node has not yet been assigned to a menu - either on creation or edit.

I only have this module affecting menu permissions.

The permissions are:

administer menus - no
administer menu_2 - yes (this is the only menu ticked)

menu_1 is default. if user has access to menu_1 as well then menu settings field shows on node creation.

anrikun’s picture

Ok Thank you for this feedback: it's a bug indeed, but as it doesn't occur when "Menu Settings per Content Type" is installed too (and I always use both), I've never noticed it!
I'll fix this one.
Thanks again!

anrikun’s picture

Title: Integration with Domain Access » Menu settings unavailable when user adds a new node and user does not have "administer menu items" permission on default menu
Category: support » bug
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.