You are here

function content_access_action_settings in Content Access 7

Split the settings string into array.

File

content_access_rules/content_access_rules.rules.inc, line 324
Rules specific functions that expose content_access' API.

Code

function content_access_action_settings($action_settings = array()) {
  $roles_ids = array_flip(user_roles());
  foreach (_content_access_get_operations() as $op => $label) {
    $settings[$op] = array();
  }
  foreach ($action_settings as $op_role => $role) {
    $op = substr($op_role, 0, strpos($op_role, ':'));
    $rid = $roles_ids[$role];
    $settings[$op][] = $rid;
  }
  return $settings;
}