Download & Extend

(Preliminary) New hook: user_access_alter

Project: 
Drupal core
Introduced in branch: 
8.x
Description: 

Note: this change has not landed yet.

A new hook is created so modules can alter the basic user access scheme with their own additions or modifications.

Example usage:

function my_module_user_access_alter(array &$permissions, $account) {
  // Add a permission if a user has the America/Santiago timezone.
  if (isset($account->timezone) && $account->timezone == 'America/Santiago') {
    $permissions['user lives in santiago'] = TRUE;
  }
}
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
nobody click here