diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 1b4763362ce30d991995e54ac60526cca2244971..42c64741ef72222666c248498b77adba107b65e6 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -499,7 +499,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
   $form['menu'] = array(
     '#type' => 'details',
     '#title' => t('Menu settings'),
-    '#access' => user_access('administer menu'),
+    '#access' => Drupal::currentUser()->hasPermission('administer menu'),
     '#collapsed' => !$link['link_title'],
     '#group' => 'advanced',
     '#attached' => array(