From 292d28c831f6f8517fc820f728bd5de3ebc96c51 Mon Sep 17 00:00:00 2001
From: Neil Drumm <drumm@3064.no-reply.drupal.org>
Date: Wed, 27 Sep 2006 07:02:32 +0000
Subject: [PATCH] #42826 by jvandyk, mfb, macgirvin. Only show 'edit primary
 links' link if the user has access to it.

---
 includes/menu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/menu.inc b/includes/menu.inc
index ab35a34326ec..6d71f84c2a10 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -870,7 +870,7 @@ function menu_primary_links($start_level = 1, $pid = 0) {
   }
 
   // Special case - provide link to admin/build/menu if primary links is empty.
-  if (empty($links) && $start_level == 1 && $pid == variable_get('menu_primary_menu', 0)) {
+  if (empty($links) && $start_level == 1 && $pid == variable_get('menu_primary_menu', 0) && user_access('administer menu')) {
     $links['1-1'] = array(
       'title' => t('edit primary links'),
       'href' => 'admin/build/menu'
-- 
GitLab