Hello,

First of all, I love this module. It looks great, especially combined with the Rubik theme.

I've been browsing and looking around at this for a while and I was wondering if admin has the ability to add a custom made menu in the sidebar. I have seen that I can add a custom menu for example, and the person with another role would be able to use this, but it would also still show all the links automatically in the administration section of the pages where the user has permissions for.

For now I've been using the Rootcandy theme, and what I really love about that is that it lets you select a custom menu which will form the custom shortcut menubar. There I can choose myself which parts of the administration I show to the user of that role. I prefer this instead of a custom menu plus all the stuff with permissions automatically added.

And when I do add a custom menu, how can I add descriptions and icons to that? It would be great if I could do that in the menu module in the tree structure itself.

In the attachment I added a screenshot of the custom shortcut bar of my latest website. I would love to see this kind of custom structure added in the admin module.

I hope my explanation was clear enough. I feel like it was a difficult one to explain.

Again, awesome module. I will look more into it.
Cheers,
Danny

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Danny_Joris’s picture

Category: support » feature

Ok, so what it comes down to is that it would be great if you could add or remove administrative blocks based on roles. So I could turn off the 'administration block' but add some administration pages in a custom menu block.

I find that the biggest advantage of Rootcandy right now. It would be so awesome to have that in the admin module as well. I think this improves usability for end-users incredibly.

Cheers,
Danny

Danny_Joris’s picture

I would love to get some feedback on this, because I can't find any discussion on this topic. And this has been a big issue for me ever since i started working with Drupal.

Using permissions only, there are always admin pages you don't want to show to your clients, but end up accessible for them anyway. In a lot of cases you need to give a user a permission for something, but you don't want to show him the admin page for it, etc... The admin section purely based on permissions becomes a mess.

The ability to make the admin menu custom made would help a lot.

Any feedback, ideas or links to discussions are highly appreciated.

Cheers,
Danny

volocuga’s picture

Yes, I second this. I could call it "bug" because admin module does not respect block visibility settings :(

fuerst’s picture

Version: 6.x-2.0-beta1 » 6.x-2.0-beta3
Status: Active » Needs review
FileSize
1.38 KB

The attached patch adds code to the function admin_set_admin_blocks() which checks and applies role specific block visibility settings. It is a first try - please review carefully.

Shane Birley’s picture

Is this patch rolled against beta3 or dev?

Shane Birley’s picture

Patched. This appears to work. No errors being thrown that I can see. Firebug says all is well. Will let it run and report any weirdness should I run into any.

Shane Birley’s picture

I have configured a couple of sites with the patched version and it seems to work great. Thumbs up!

yhahn’s picture

Assigned: Unassigned » yhahn

Thanks for the patch -- will take a look at this. At first glance, should be a reasonable change to make.

Nick Robillard’s picture

FileSize
0 bytes

I've slightly re-worked/cleaned up fuerst's patch. However, it's against beta 2 and the admin_set_admin_blocks() function changed a bit in beta 3 (ie: don't try to patch against beta 3).

I'm debating whether to keep the user 1 override in. For my use case, i need it, but it might be counter intuitive - since you might not want user 1 to see every toolbar block.

Nick Robillard’s picture

FileSize
1.02 KB

Oops - beta 2 patch again.

marcoBauli’s picture

Version: 6.x-2.0-beta3 » 6.x-2.0-beta5
FileSize
946 bytes

needed this functionality too, rerolled against latest 6.x-2.0-beta5, works swift!

PS: it would be great if Admin could take into consideration the existing permissions of modules' blocks. For example, there should be no need to set up a superadmin role just to hide the Masquerade block to regular users.

mpaler’s picture

I can confirm that the patch in #4 works on v3. I applied it manually though.

fuerst’s picture

Version: 6.x-2.0-beta5 » 6.x-2.0
FileSize
1.12 KB

In 6.x-2.0 this patch still is necessary. Took modifications from #10 but placed it back inside the if (!empty($block)) { construct.
@nick_robillard: You did put it inside the if (count($split) === 2) { construct. Why that?

Attached patch for 6.x-2.0. Slightly modified inline documentation.

Nick Robillard’s picture

No good reason. Either way, things have changed a lot around that code - i think what you have is good.

patrickroma’s picture

works great!

Patrizio’s picture

perfect

fuerst’s picture

Status: Needs review » Reviewed & tested by the community
Patribus’s picture

Is this function implemented in de D7 version?

Shane Birley’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
Shane Birley’s picture

Status: Fixed » Closed (fixed)