You are here

function securitytxt_install in Security.txt 7

Implements hook_install().

See also

http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...

File

./securitytxt.install, line 13
Install, update and uninstall functions for the securitytxt module.

Code

function securitytxt_install() {
  $settings = array();
  $settings['enabled'] = FALSE;
  $settings['contact_email'] = '';
  $settings['contact_phone'] = '';
  $settings['contact_url'] = '';
  $settings['encryption_key_url'] = '';
  $settings['policy_url'] = '';
  $settings['acknowledgement_url'] = '';
  $settings['signature_text'] = '';
  variable_set('securitytxt', $settings);

  /* Configure permissions */
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array(
    'view securitytxt',
  ));
  user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array(
    'view securitytxt',
  ));
}