By wim leers on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.0.0-BETA10
Issue links:
Description:
In HEAD, this convenience method still returns a boolean. But that means the necessary access cacheability metadata is missing. By requiring an AccessResultInterface object to be returned, that problem is solved.
BEFORE
protected function blockAccess(AccountInterface $account) {
return $account->hasPermission('a permission');
}
AFTER
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermission($account, 'a permission');
}
Impacts:
Module developers