You are here

function acb_enable in Access Control Bridge 7

Same name and namespace in other branches
  1. 8 acb.install \acb_enable()

Implements hook_enable().

File

./acb.install, line 9
Installation file containing install hooks.

Code

function acb_enable() {

  // Ask for rebuilding node permissions.
  node_access_needs_rebuild(TRUE);

  // Inform users of a change compared to previous versions.
  $perms = user_role_permissions(array(
    DRUPAL_AUTHENTICATED_RID => DRUPAL_AUTHENTICATED_RID,
  ));
  if (module_exists('domain') && in_array('edit domain content', $perms[DRUPAL_AUTHENTICATED_RID])) {
    drupal_set_message(t('Notice for <strong>if you updated from Access Control Bridge 7.x-1.1 or below</strong>: the "%edit" and "%delete" permissions aren\'t required anymore. It is recommended to uncheck them if you don\'t actually use them for your permission setup and <strong>rebuild your permissions</strong> afterwards.', array(
      '%edit' => t('Edit any content on assigned domains'),
      '%delete' => t('Delete any content on assigned domains'),
    )), 'warning');
  }
}