You are here

function ldapauth_menu in LDAP integration 6

Same name and namespace in other branches
  1. 5.2 ldapauth.module \ldapauth_menu()
  2. 5 ldapauth.module \ldapauth_menu()

Implements hook_menu().

File

./ldapauth.module, line 66
ldapauth provides authentication against ldap server.

Code

function ldapauth_menu() {
  $items = array(
    'admin/settings/ldap' => array(
      'title' => 'LDAP',
      'description' => 'Configure LDAP integration settings.',
      'page callback' => 'ldapauth_admin_menu_block_page',
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth' => array(
      'title' => 'Authentication',
      'description' => 'Configure LDAP authentication settings.',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_settings',
      ),
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/configure' => array(
      'title' => 'Settings',
      'type' => MENU_DEFAULT_LOCAL_TASK,
    ),
    'admin/settings/ldap/ldapauth/list' => array(
      'title' => 'List',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_list',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 1,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/add' => array(
      'title' => 'Add Server',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_form',
        4,
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 2,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/edit' => array(
      'title' => 'Configure LDAP Server',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_form',
        4,
        5,
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/edit/%/test' => array(
      'title' => 'Test LDAP Server',
      'page callback' => '_ldapauth_ajax_test',
      'page arguments' => array(
        5,
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/delete' => array(
      'title' => 'Delete LDAP Server',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_delete',
        5,
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/activate' => array(
      'title' => 'Activate LDAP Source',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_activate',
      ),
      'access arguments' => array(
        'administer ldap modules',
      ),
      'type' => MENU_CALLBACK,
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/deactivate' => array(
      'title' => 'De-activate LDAP Source',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_deactivate',
      ),
      'access arguments' => array(
        'administer ldap modules',
      ),
      'type' => MENU_CALLBACK,
      'file' => 'ldapauth.admin.inc',
    ),
    'admin/settings/ldap/ldapauth/user/%user/tolocal' => array(
      'title' => 'Convert LDAP user to local user',
      'page callback' => 'ldapauth_user_to_local_user',
      'page arguments' => array(
        5,
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer users',
      ),
      'file' => 'ldapauth.admin.inc',
    ),
  );

  // Need ctools to export or import
  if (module_exists("ctools")) {
    $items['admin/settings/ldap/ldapauth/export/%ldapauth_server'] = array(
      'title' => 'Export Server Settings',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_export_form',
        5,
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    );
    $items['admin/settings/ldap/ldapauth/import'] = array(
      'title' => 'Import Server',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'ldapauth_admin_import_form',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 3,
      'access arguments' => array(
        'administer ldap modules',
      ),
      'file' => 'ldapauth.admin.inc',
    );
  }
  return $items;
}