You are here

function securitytxt_menu in Security.txt 7

Implements hook_menu().

See also

https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...

File

./securitytxt.module, line 75
Module which implements the security.txt standard for drupal.

Code

function securitytxt_menu() {
  $items['admin/config/system/securitytxt'] = array(
    'title' => 'Security.txt',
    'description' => 'Configure and sign the site security.txt file.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'securitytxt_file_form',
    ),
    'access arguments' => array(
      'administer securitytxt',
    ),
    'file' => 'securitytxt.admin.inc',
    'weight' => 50,
  );
  $items['admin/config/system/securitytxt/file'] = array(
    'title' => 'Configure',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/system/securitytxt/sign'] = array(
    'title' => 'Sign',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'securitytxt_sign_form',
    ),
    'access arguments' => array(
      'administer securitytxt',
    ),
    'file' => 'securitytxt.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['.well-known/security.txt'] = array(
    'title' => 'Security.txt file',
    'page callback' => 'securitytxt_file_page',
    'access arguments' => array(
      'view securitytxt',
    ),
    'file' => 'securitytxt.pages.inc',
    'type' => MENU_CALLBACK,
  );
  $items['.well-known/security.txt.sig'] = array(
    'title' => 'Security.txt file signature',
    'page callback' => 'securitytxt_signature_page',
    'access arguments' => array(
      'view securitytxt',
    ),
    'file' => 'securitytxt.pages.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}