Allow all farm roles to access metrics.

This commit is contained in:
Michael Stenta 2020-02-26 10:16:08 -05:00
parent 1db1671256
commit 41758a29d2
1 changed files with 5 additions and 9 deletions

View File

@ -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;
}
/**