Allow all farm roles to access metrics.
This commit is contained in:
parent
1db1671256
commit
41758a29d2
|
@ -30,16 +30,12 @@ function farm_metrics_permission() {
|
||||||
* Implements hook_farm_access_perms().
|
* Implements hook_farm_access_perms().
|
||||||
*/
|
*/
|
||||||
function farm_metrics_farm_access_perms($role) {
|
function farm_metrics_farm_access_perms($role) {
|
||||||
// Load the list of farm roles.
|
$perms = array();
|
||||||
$roles = farm_access_roles();
|
|
||||||
|
|
||||||
// If this role has 'config' access, grant area generator access.
|
// Access farm metrics.
|
||||||
if (!empty($roles[$role]['access']['config'])) {
|
$perms[] = 'access farm metrics';
|
||||||
return array('access farm metrics');
|
|
||||||
}
|
return $perms;
|
||||||
else {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue