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

Issue #2062015 by InternetDevels, phiit: Replace user_access() calls with...

Issue #2062015 by InternetDevels, phiit: Replace user_access() calls with ->hasPermission() in picture module.
parent 7a88ed3b
Branches
Tags
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
......@@ -24,7 +24,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
return TRUE;
}
elseif (in_array($operation, array('update', 'delete'))) {
return user_access('administer pictures', $account);
return $account->hasPermission('administer pictures');
}
}
......@@ -32,7 +32,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
* {@inheritdoc}
*/
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return user_access('administer pictures', $account);
return $account->hasPermission('administer pictures');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment