Change record status: 
Introduced in branch: 

The user_access() method was directly replaced by AccountInterface::hasPermission(). Most of the time, this account is the current user session, which can be accessed via the account attribute on the current request.

If you have a user entity, you can also use the same method.

Drupal 7

user_access('name of permission');

$account = user_load('3');
user_access('name of permission', $account);

Drupal 8

\Drupal::currentUser()->hasPermission('name of permission');

$account = user_load('3');
$account->hasPermission('name of permission');
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other updates done