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

Previously, role permission assignments were stored in a {role_permissions} table in the database. Instead, we are now storing the permissions of a role directly on the Role configuration entity(see User roles are now configurables).

Instead of using procedural wrappers you can now retrieve or manipulate a role's permission through a set of methods defined in the RoleInterface.

Drupal 7

<?php
// Retrieving a list of granted permissions for a role
$permissions = user_role_permissions($rids);
// Checking if a role has a permission.
$permissions = user_role_permissions($rids);
isset(
$permissions[$rid]['access content']);
// Granting permissions.
user_role_grant_permissions($rid, array('access content', 'post comments'));
// Revoking permissions.
user_role_revoke_permissions($rid, array('access content'));
?>

Drupal 8

<?php
// Retrieving a list of granted permissions for a role
$role->getPermissions();
// Checking if a role has a permission.
$role->hasPermission('access content');
// Granting permissions.
$role->grantPermission('post comments');
// Revoking permissions.
$role->revokePermission('access content');
?>
Impacts: 
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: 
Other updates done