Posted by westwesterson on November 14, 2012 at 3:48pm
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