Commit dedc7b50 authored by webchick's avatar webchick

Issue #2061979 by rhm50, InternetDevels: Replace user_access() calls with...

Issue #2061979 by rhm50, InternetDevels: Replace user_access() calls with ->hasPermission() in contextual module.
parent de0f3ab3
...@@ -23,7 +23,8 @@ function contextual_menu() { ...@@ -23,7 +23,8 @@ function contextual_menu() {
* Implements hook_toolbar(). * Implements hook_toolbar().
*/ */
function contextual_toolbar() { function contextual_toolbar() {
if (!user_access('access contextual links')) {
if (!Drupal::currentUser()->hasPermission('access contextual links')) {
return; return;
} }
...@@ -61,7 +62,8 @@ function contextual_toolbar() { ...@@ -61,7 +62,8 @@ function contextual_toolbar() {
* @see contextual_preprocess() * @see contextual_preprocess()
*/ */
function contextual_page_build(&$page) { function contextual_page_build(&$page) {
if (!user_access('access contextual links')) {
if (!Drupal::currentUser()->hasPermission('access contextual links')) {
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment