You are here

function _config_perms_install_data in Custom Permissions 7.2

Same name and namespace in other branches
  1. 6.2 config_perms.install \_config_perms_install_data()
1 call to _config_perms_install_data()
config_perms_install in ./config_perms.install
Implements hook_install().

File

./config_perms.install, line 90
Installation file

Code

function _config_perms_install_data() {
  $perms = array(
    'administer account settings' => array(
      'admin/config/people/accounts',
    ),
    'administer clean-urls' => array(
      'admin/config/search/clean-urls',
    ),
    'administer date-time' => array(
      'admin/config/regional/date-time',
      'admin/config/regional/date-time/*',
    ),
    'administer error reporting' => array(
      'admin/config/error-reporting',
    ),
    'administer file system' => array(
      'admin/config/file-system',
    ),
    'administer performance' => array(
      'admin/config/development/performance',
    ),
    'administer site information' => array(
      'admin/config/system/site-information',
    ),
    'administer site maintenance' => array(
      'admin/config/development/maintenance',
    ),
    'display site structure menu' => array(
      'admin/structure',
    ),
    'display site configuration menu' => array(
      'admin/config',
    ),
    'display site reports menu' => array(
      'admin/reports',
    ),
  );
  foreach ($perms as $name => $paths) {
    $id = db_insert('config_perms')
      ->fields(array(
      'machine_name' => config_perms_generate_machine_name($name),
      'status' => 1,
      'name' => $name,
      'path' => serialize($paths),
    ))
      ->execute();
  }
}