You are here

function farm_quick_farm_access_perms in farmOS 7

Implements hook_farm_access_perms().

File

modules/farm/farm_quick/farm_quick.module, line 32
Code for the Farm Quick module.

Code

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

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

  // If this role has 'config' access, allow them to configure quick forms.
  if (!empty($roles[$role]['access']['config'])) {
    $perms[] = 'configure farm quick forms';
  }
  return $perms;
}