Commit dfda8031 authored by webchick's avatar webchick

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
......@@ -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');
}
}
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