You are here

function og_webform_menu_alter in Organic Groups Webform Integration 6

Implementation of hook_menu_access().

File

./og_webform.module, line 24
Enables organic group administrators to modify webforms within their groups.

Code

function og_webform_menu_alter(&$items) {

  // Set the Webform tab access callback to use OG.
  foreach ($items as $key => $item) {
    if (strpos($key, 'node/%webform_menu') === 0 && $item['access callback'] == 'node_access' && $item['access arguments'][0] == 'update') {
      $items[$key]['access callback'] = 'og_menu_access_node_edit';
      $items[$key]['access arguments'] = array(
        1,
      );
    }
  }
}