A follow-on to: http://drupal.org/node/151583 for concerns not resolved by that patch.

The current menu module UI has some limitations - for example no simple way to move or copy links between menus.

This issue will address UI and usability concerns only.

Comments

pwolanin’s picture

Title: Improve menu module UI and usability » Improve menu module usability - additional permission

moving items between menus is being handled here:

Menu system UI problems - moving items between menus
http://drupal.org/node/151055

So, we'll make this issue for the idea of adding an additional permission so that users can have access to the menu_otf form in the node form with having the full 'administer menus' permission.

catch’s picture

Version: 6.x-dev » 7.x-dev
Category: bug » feature

bumping a version since the main bug has been fixed.

jody lynn’s picture

Title: Improve menu module usability - additional permission » Usability Issue - refine menu permissions

I agree that there could be a separate permission to let users add content to the menu without fully administering the menu.

jody lynn’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Simple patch to add a second permission to menu module: permission to access the menu settings fieldset in node forms.

pwolanin’s picture

"Manage menu items " shoudl be "Manage menu links "

pwolanin’s picture

should probably also be an OR between the two permissions for access to the form element.

jody lynn’s picture

StatusFileSize
new1.16 KB

Ok, changes made.

kleinmp’s picture

Status: Needs review » Reviewed & tested by the community

The patch works nicely for me.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

I'm on crack. Are you, too?

+++ modules/menu/menu.module	30 Aug 2009 21:51:17 -0000
@@ -41,6 +41,10 @@ function menu_permission() {
+    'access node menu settings' => array(
+      'title' => t('Access node menu settings'),
+      'description' => t('Manage menu links on node forms.'),
+    ),

I'd prefer we didn't use the word 'node' in user-facing text (yes, I know about 'administer nodes' and it can bite me ;))

How about more explicit? "place content into menus" or something?

This review is powered by Dreditor.

jody lynn’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.15 KB

Changed the perm description to 'place content into menus', that seems fine. It's hard to succinctly say 'Use the options in the menu settings fieldset which appears on node add/edit forms in order to add, edit or delete that node's menu settings.' but I think this suffices..

webchick’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs usability review
+++ modules/menu/menu.module	30 Aug 2009 21:51:17 -0000
@@ -41,6 +41,10 @@ function menu_permission() {
+    'access node menu settings' => array(
+      'title' => t('Access node menu settings'),
+      'description' => t('Place content into menus.'),
+    ),

Sorry, this will teach me to try and review patches at ice cream sprints.

I meant something more like:

+    'place content into menu' => array(

+      'title' => t('Place content into menu'),

+      'description' => t('Access menu controls on content forms to place content into menus.'),

+    ),

We don't use "node" in user-facing text.

I'm tagging "needs usability review" in the hope that someone can come up with something better than the above.

I'm on crack. Are you, too?

sun’s picture

This issue slightly overlaps with #38777: Menu OTF needs its own permission

jody lynn’s picture

Status: Needs work » Needs review
StatusFileSize
new1.18 KB

Changed the text to the way webchick put it.

heather’s picture

StatusFileSize
new1.06 KB
new17 KB
new16.42 KB

This looks like a handy improvement.

However, could the text be misleading? We're not adding "content", like an image, or intro text into a menu. We're adding links.

Patch #13: "Access menu controls on content forms to place content into menus"

Patch attached: "Access menu controls on content forms to place links to content into menus"

 'place content into menus' => array(
      'title' => t('Link to content in menus'),
      'description' => t('Access menu controls on content forms to place links to content into menus.'),
    ),

heather’s picture

Issue tags: +Usability

Changing to needs review, and adding tag.

I looked over #38777: Menu OTF needs its own permission and this looks like an isolated solution, but sun suggests there is a larger problem. If the larger problem isn't solved this would be an improvement for finer grained menu permissions?

pwolanin’s picture

'Link to content in menus' is really more like 'Add links to menus while editing content', but in any case it's never going to make sense without the description. There's no real need to bikeshed the text.

pwolanin’s picture

Title: Usability Issue - refine menu permissions » Refine menu permissions - add separate one for menu OTF

I'm really not sure why usability is relevant here?

Status: Needs review » Needs work

The last submitted patch failed testing.

pwolanin’s picture

Category: feature » bug

This is a really simple patch and would be a big usability improvement - let's get it re-rolled.

jody lynn’s picture

Status: Needs work » Needs review
StatusFileSize
new1.08 KB

Here's a reroll, with permission description update to 'Add links to content in menus while editing content.'

pwolanin’s picture

Status: Needs review » Reviewed & tested by the community

patch applies cleanly, works as advertised.

sun’s picture

+++ modules/menu/menu.module	29 Nov 2009 20:55:53 -0000
@@ -48,6 +48,10 @@ function menu_permission() {
+    'place content into menus' => array(
+      'title' => t('Add links to content in menus'),
+      'description' => t('Add links to content in menus while editing content.'),
+    ),
@@ -576,7 +580,7 @@ function menu_form_alter(&$form, $form_s
     $form['menu'] = array(
       '#type' => 'fieldset',
       '#title' => t('Menu settings'),
-      '#access' => user_access('administer menu'),
+      '#access' => user_access('place content into menus') || user_access('administer menu'),

This doesn't really match up. The title says "Add", the internal permission says "place".

According to the code, this permission not only allows you to add links for nodes, but also edit them, and potentially delete them.

I'd suggest to name at least the internal permission more precisely, perhaps "manage links" or "edit links".

I'm on crack. Are you, too?

jody lynn’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.1 KB

It's hard to put it concisely. How's this one?

pwolanin’s picture

Yeah, hard to make it short but coherent.

Do you use "manage" elsewhere?

I might almost call this "administer links to content"

MichaelCole’s picture

#23: menu.patch queued for re-testing.

pwolanin’s picture

StatusFileSize
new972 bytes

Here's some alternative wording.

jody lynn’s picture

Status: Needs review » Reviewed & tested by the community

I'm fine with that new wording.

forngren’s picture

Status: Needs work » Reviewed & tested by the community

Marked #38777: Menu OTF needs its own permission as a duplicate of this issue.

This wording makes sense to me, as a non-native English-speaker. RTBC.

sun’s picture

Status: Reviewed & tested by the community » Needs work
+++ modules/menu/menu.module
@@ -43,7 +43,10 @@ function menu_help($path, $arg) {
+    'edit content menu links' => array(
+      'title' => t('Edit menu links to content while editing content'),
     ),

I don't really care about the human-readable title; but the internal permission name has a completely different meaning.

+++ modules/menu/menu.module
@@ -601,7 +604,7 @@ function menu_form_alter(&$form, $form_state, $form_id) {
-      '#access' => user_access('administer menu'),
+      '#access' => user_Access('edit content menu links') || user_access('administer menu'),

Case error in function name.

Powered by Dreditor.

forngren’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new803 bytes

How about this wording?

--- modules\menu\menu.module
+++ modules\menu\menu.module
@@ -43,7 +43,10 @@
 function menu_permission() {
   return array(
     'administer menu' => array(
-      'title' => t('Administer menus and menu items'),
+      'title' => t('Administer menus and menu links'),
+    ),
+    'edit node menu item' => array(
+      'title' => t('Edit menu links to content while editing content'),
     ),
   );
 }
@@ -601,7 +604,7 @@
     $form['menu'] = array(
       '#type' => 'fieldset',
       '#title' => t('Menu settings'),
-      '#access' => user_access('administer menu'),
+      '#access' => user_access('administer menu') || user_acess('edit node menu item'),
       '#collapsible' => TRUE,
       '#collapsed' => !$link['link_title'],
       '#group' => 'additional_settings',

Status: Needs review » Needs work

The last submitted patch, 154471.patch, failed testing.

pwolanin’s picture

There is no such thing as "menu item" - use "menu link"

forngren’s picture

Status: Needs work » Needs review
StatusFileSize
new1.03 KB

Alright, trying again.

forngren’s picture

Is there still a chance of this getting into 7.x? If so, I'll update the patch.

forngren’s picture

#33: 154471.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Needs usability review, +Usability

The last submitted patch, 154471.patch, failed testing.

Bojhan’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: -Needs usability review

Sounds oke?

ralphb’s picture

Why has this been abandoned? The new permission is really missing from 7.x to make content creation (e.g., Wiki-style pages) for normal users feasible.

xano’s picture

Category: Bug report » Feature request
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new37.03 KB

Marking this a feature request, since everything works as designed, even if it's risky to let end-users manage menus.

This patch takes a new approach, as discussed with @pwolanin on IRC. Instead of focussing on nodes, we expand the menu system with content-specific permissions for menu links. By separating permissions for config and content, we can ensure that end users can manage links, which are content, without being able to (accidentally) change menu configuration. The new access controller has full test coverage, but not all content usages of the old administer menu permission have been converted yet, and neither have the corresponding tests.

Some issues we need to decide on:

  1. Should we convert config permissions in the same patch? It would prevent an awkward in-between state where the "administer menu" permission is used as an undocumented bypass permission for content, but as the primary permission for config.
  2. What are static menu link overrides? They seem similar to the menu link storage, but are defined in config as opposed to in the database. MenuLinkContent provides similar behavior, but stores the overrides in entity storage rather than config.
  3. About administer menu: We can keep it as a bypass permission, which ensures continuity, but requires complex access checks. We can also deprecate it, which means we keep it around for contributed modules and existing site configurations to use, but we take the permission away from all roles that have it, and replace it with all available new permissions. This requires configuration permissions to be converted in the same patch. A third alternative is to keep the permission for config only, and just add the new content permissions to all roles that have the old permission.
  4. MenuLinkContentAccessControlHandler uses the administer menu permission to check "view" access. This was added in #2558905-15: Content translation module - Information disclosure by insufficient access checking, but the reason for this addition is not clear to me, as well as alternative solutions to the problem this check solves.

Status: Needs review » Needs work

The last submitted patch, 39: drupal_154471_39.patch, failed testing.

The last submitted patch, 39: drupal_154471_39.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +stale-issue-cleanup

Thank you for sharing your idea for improving Drupal.

We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

Thanks!

smustgrave’s picture

Wanted to bump 1 more time if summary could be cleaned up.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.