function farm_mapknitter_farm_access_perms in farmOS 7
Implements hook_farm_access_perms().
File
- modules/
farm/ farm_mapknitter/ farm_mapknitter.module, line 22 - Code for the Farm MapKnitter module.
Code
function farm_mapknitter_farm_access_perms($role) {
$perms = array();
// Load the list of farm roles.
$roles = farm_access_roles();
// If this role has 'config' access, grant administer permission
if (!empty($roles[$role]['access']['config'])) {
$perms[] = 'administer farm_mapknitter module';
}
return $perms;
}