You are here

function robotstxt_update_6100 in RobotsTxt 7

Same name and namespace in other branches
  1. 6 robotstxt.install \robotstxt_update_6100()

Automatically add the 'administer robots.txt' permission to granted users.

File

./robotstxt.install, line 72
Install, update and uninstall functions for the robotstxt module.

Code

function robotstxt_update_6100() {
  $roles = user_roles(FALSE, 'administer site configuration');
  foreach ($roles as $rid => $role) {
    _update_7000_user_role_grant_permissions($rid, array(
      'administer robots.txt',
    ), 'robotstxt');
  }
  return t("Added 'administer robots.txt' permission to all roles with 'administer site configuration' permission.");
}