You are here

function farm_access_farm_access_perms in farmOS 7

Implements hook_farm_access_perms().

File

modules/farm/farm_access/farm_access.module, line 108
Farm Access module.

Code

function farm_access_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 farm_access configuration.
  if (!empty($roles[$role]['access']['config'])) {
    $perms[] = 'administer farm_access module';
  }
  return $perms;
}