Skip to content
Snippets Groups Projects
Commit dedc7b50 authored by Angie Byron's avatar Angie Byron
Browse files

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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -23,7 +23,8 @@ function contextual_menu() {
* Implements hook_toolbar().
*/
function contextual_toolbar() {
if (!user_access('access contextual links')) {
if (!Drupal::currentUser()->hasPermission('access contextual links')) {
return;
}
......@@ -61,7 +62,8 @@ function contextual_toolbar() {
* @see contextual_preprocess()
*/
function contextual_page_build(&$page) {
if (!user_access('access contextual links')) {
if (!Drupal::currentUser()->hasPermission('access contextual links')) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment