Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Most access checking in all places is done using the account of the current user, for example by using the "hasPermission" method, so the account object gets passed to the access method on the block.

Previous

 /**
  * {@inheritdoc}
  */
 public function access() {
   // Only grant access to users with the 'access news feeds' permission.
   return user_access('access news feeds');
 }

After

 /**
  * {@inheritdoc}
  */
 public function access(AccountInterface $account) {
   // Only grant access to users with the 'access news feeds' permission.
   return $account->hasPermission('access news feeds');
 }
Impacts: 
Module developers