Drupal 7 Menu admin per menu

By shane
Mon, 2013-03-11 21:54
Daily Dose of Drupal Episode #126

Share with Others

The Drupal 7 Menu Admin Per Menu module is a simple module that allows you to grant permissions for users to administer specific Drupal menus based on their role. This module for instance would allow you to allow one role to modify the Main menu, while not allowing the role to modify a separate menu on your Drupal 7 website.

In this episode you will learn:

  • How to allow a specific role to administer the user menu on a Drupal site without giving them access to modify the Main menu

Thanks to BuildAModule.com for sponsoring this episode of the Daily Dose of Drupal.

Hello everyone and welcome to another Daily Dose of Drupal, today we’re on Episode Number 126 and we’re going to be going over the Menu Admin Per Menu Module. And this is a module that probably isn’t going to be used on many of your Drupal sites but if you have complex needs with how you want to control access to various parts of your administration of your Drupal site especially in this case the Menus that specific users are going to have access to, this module can help.

Now I’ll explain how we can use that here in just a second but before we get started; as always I am Shane Thomas, you can follow me on Twitter at smthomas3 and make sure to go to codekarate.com and check out the other videos and posts and sign up for the newsletter.

Today’s sponsor is buildamodule.com. Go ahead and check out buildamodule.com if you haven’t already, there’s over 850 Drupal video tutorials and I recently hired two developers for my development company and I bought them subscriptions to buildamodule.com to get them started on learning Drupal.

So go ahead and check it out yourself, there’s a bunch of free videos to get you started to see if you like how the videos are presented and I highly recommend you try it and I think you’re going to like it. Let’s go ahead and get started; so the Menu Admin Per Menu Module basically it’s going to allow us to control access to various menus on our site.

So let’s say for instance we have a pretty complex site and we have different users we want to be able to administer different sections of the site. Let’s say for instance we want a user to be able to administer the navigation section on our site but not necessarily the main menu. We can go ahead and use this Menu Admin Per Menu Module to go ahead and make that happen so I’m going to go over to the Modules page and you can see I already have the Menu Admin Per Menu Module installed, it’s a 7.x-1.0 version.

So I’m going to go ahead and click on the Permissions because it’s a permissions based module so there’s not a lot of configuration here and if you scroll down; typically if you want a user to be able to administer menus and menu items you would simply select this checkbox right here and obviously you’ll probably have multiple roles not just authenticated users but in this case I’m just going to use the authenticated user role as an example but you can of course add other roles through your Drupal website.

You’ll notice that the Menu Admin Per Menu Module has added a bunch more permissions here. Some for the development menu, the main menu, the management menu, the navigation menu and the user menu. So let’s say for instance we want to give the Navigation Menu and User Menu administration abilities to the authenticated users of this website.

I can go ahead and select this boxes, scroll down and save it and now another thing I’m going to want to do is come into my Management Menu and I’m going to go ahead and move this menu section out of the administration section and up above just so it’s easier for authenticated users to find, I’m going to go ahead and save that and I’m also going to make sure I add this Management Menu block to the sidebar over here on the left just so I can get to the links and then we’ll go ahead and notice that now the Management Menus over here I’m going to go ahead and logout and login as just a regular authenticated user, you’ll notice that I don’t have the administration menu on the top but I do have this link here to administer the menu.

You’ll notice that I only have access to two menus. I can go ahead and list the links for the menu and add links. So for instance in this navigation menu I can view the different links that are going to be here which I only see one link, I can of course add another, you can do the same for the user men.

So you can see there’s the My Account in the logout link, if I wanted to add another link and I’m going to go ahead and just go to Node 2 as an example and give it a wait so it shows up in the bottom, then we’ll save this. Now you’ll notice that me as an authenticated user I was able to add a menu item to this link but I wasn’t able to add menu items or manage menu items for any of the other menus that I don’t have access to.

So as you can see it’s a really simple module but it really allows you to find grain control over who can access what menus can be useful as I said on very large Drupal sites in which you have a large user based and you have multiple administrators managing the site.

A lot of times you don’t want to give full administration permission to every user so you can use this module to configure which users and which roles have access to change which menus. So that’s it on this episode of the Daily Dose of Drupal, go ahead and thank buildamodule.com and check out the videos on buildamodule.com and thank you for watching the daily dose of Drupal, I’ll see you next time.