Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I use the content_access module for different content-types/user roles and your module to hide different menu-items. If user-roles have the edit-right, they can edit the menu visibility. But I would like that this user-roles have only one menu-path to edit and not the right to influence this or edit another menu-path. Also I would like to prevent that a user of a role create a page with a menu-path that I not prefer. I know that your module not prevent a role from reaching a destination, but it comes my requirements at the nearest. (hope this is the right vocable)
> Do you only want the admin to have the right to edit that info?
Yes.
> If so, we could easily check user_access() of a given role...
How? My drupal programming know how is currently not so great. Could you give me a patch?
Okay, if you would please check the -dev version (available within 12h from now) and let me know what you think. It will hide the interface to anyone who does not have permission (who does not have the right role.)
Now, I guess we have a problem with having a default setup for each menu, possibly based on the node type... Let me know how this works for you at this point.
thank you for your fast help - the permission to edit the visibility is a nice feature.
> Now, I guess we have a problem with having a default setup for each menu, possibly based on the node type... Let me know how this works for you at this point.
The problem before and after the patch is that on the create content page | menu settings | parent item listbox, menu-names and -items to be available that I not prefer to offer my roles - e.g. navigation or primary menu. I can hide menu-items but not menu-names. The roles can use this menupath for new pages.
Another thing is that I have menus that the roles only should use, but not create pages with this menupath. Hide this menus is a no go way - a only read permission for that menus would be the soulution, but I think this is too complex.
Hmmm... so is the current version working for you?
If not, what else would you need?
Now I know what I was thinking about when I was looking at the code and thought... something missing in this module. It was actually in another module: http://drupal.org/project/node_privacy_byrole
That other module has a default in the node_type as I think the menu_per_role should also have. That way, when hidden it can still get a correct default set of settings (when right now everything is going to be visible by default.)
> Hmmm... so is the current version working for you?
Yes.
> If not, what else would you need?
See #4, if a role can only create pages for menupath that I, as admin, prefer - that would be a of great help for me and make my site safer.
The drop down selection should hide some of the menus based on the user roles. Right now, this is not part of of this module, but I guess that would make sense.
We'd have to add a role selection in the menu itself:
Comments
Comment #1
AlexisWilke commentedWho would have thought of that?! 8-)
That restriction is really only for the menu item visibility, not to actually prevent a role from reaching the destination.
Anyway, there isn't such a restriction at this point.
Do you only want the admin to have the right to edit that info? If so, we could easily check user_access() of a given role...
Thank you.
Alexis Wilke
Comment #2
Anonymous (not verified) commentedI use the content_access module for different content-types/user roles and your module to hide different menu-items. If user-roles have the edit-right, they can edit the menu visibility. But I would like that this user-roles have only one menu-path to edit and not the right to influence this or edit another menu-path. Also I would like to prevent that a user of a role create a page with a menu-path that I not prefer. I know that your module not prevent a role from reaching a destination, but it comes my requirements at the nearest. (hope this is the right vocable)
> Do you only want the admin to have the right to edit that info?
Yes.
> If so, we could easily check user_access() of a given role...
How? My drupal programming know how is currently not so great. Could you give me a patch?
Thank you.
Frank Kunert
Comment #3
AlexisWilke commentedFrank,
Okay, if you would please check the -dev version (available within 12h from now) and let me know what you think. It will hide the interface to anyone who does not have permission (who does not have the right role.)
Now, I guess we have a problem with having a default setup for each menu, possibly based on the node type... Let me know how this works for you at this point.
Thank you.
Alexis
Comment #4
Anonymous (not verified) commentedHello Alexis,
thank you for your fast help - the permission to edit the visibility is a nice feature.
> Now, I guess we have a problem with having a default setup for each menu, possibly based on the node type... Let me know how this works for you at this point.
The problem before and after the patch is that on the create content page | menu settings | parent item listbox, menu-names and -items to be available that I not prefer to offer my roles - e.g. navigation or primary menu. I can hide menu-items but not menu-names. The roles can use this menupath for new pages.
Another thing is that I have menus that the roles only should use, but not create pages with this menupath. Hide this menus is a no go way - a only read permission for that menus would be the soulution, but I think this is too complex.
Once again - thank you.
Frank
Comment #5
AlexisWilke commentedfku,
Hmmm... so is the current version working for you?
If not, what else would you need?
Now I know what I was thinking about when I was looking at the code and thought... something missing in this module. It was actually in another module: http://drupal.org/project/node_privacy_byrole
That other module has a default in the node_type as I think the menu_per_role should also have. That way, when hidden it can still get a correct default set of settings (when right now everything is going to be visible by default.)
Thank you.
Alexis
Comment #6
Anonymous (not verified) commented> Hmmm... so is the current version working for you?
Yes.
> If not, what else would you need?
See #4, if a role can only create pages for menupath that I, as admin, prefer - that would be a of great help for me and make my site safer.
Thank you.
Frank
Comment #7
AlexisWilke commentedfku,
Okay! I now understand #4.
The drop down selection should hide some of the menus based on the user roles. Right now, this is not part of of this module, but I guess that would make sense.
We'd have to add a role selection in the menu itself:
admin/build/menu-customize/primary-links/edit
and others.
It's now on my TODO list.
Thank you.
Alexis
Comment #8
Anonymous (not verified) commentedThank you...
Frank
Comment #9
AlexisWilke commentedChanging the title.
Comment #10
grimreaperHello,
Closing as the issue is about a deprecated version of Drupal.