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().
|
||||
*/
|
||||
function farm_metrics_farm_access_perms($role) {
|
||||
// Load the list of farm roles.
|
||||
$roles = farm_access_roles();
|
||||
$perms = array();
|
||||
|
||||
// If this role has 'config' access, grant area generator access.
|
||||
if (!empty($roles[$role]['access']['config'])) {
|
||||
return array('access farm metrics');
|
||||
}
|
||||
else {
|
||||
return array();
|
||||
}
|
||||
// Access farm metrics.
|
||||
$perms[] = 'access farm metrics';
|
||||
|
||||
return $perms;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue