You are here

function farm_quantity_farm_access_perms in farmOS 7

Implements hook_farm_access_perms().

File

modules/farm/farm_quantity/farm_quantity.module, line 87
Farm quantity module.

Code

function farm_quantity_farm_access_perms($role) {
  $perms = array();

  // Load the list of farm roles.
  $roles = farm_access_roles();

  // If this role has 'config' access, grant access to quantity configuration.
  if (!empty($roles[$role]['access']['config'])) {
    $perms[] = 'administer farm_quantity module';
  }
  return $perms;
}