function hook_farm_access_perms_alter in farmOS 7
Alter permissions that were defined by modules using hook_farm_access_perms().
Parameters
string $role: The role name that permissions are being built for.
array $perms: The permissions provided by other modules, passed by reference.
Related topics
2 invocations of hook_farm_access_perms_alter()
- farm_access_available_perms in modules/
farm/ farm_access/ farm_access.module - Gets a list of all available farm permissions.
- farm_access_modules_enabled in modules/
farm/ farm_access/ farm_access.module - Implements hook_modules_enabled().
File
- modules/
farm/ farm_access/ farm_access.api.php, line 109 - Hooks provided by farm_access.
Code
function hook_farm_access_perms_alter($role, &$perms) {
// Give Farm Managers permission to administer modules.
if ($role == 'farm_manager') {
$perms[] = 'administer modules';
}
}