Projet

Général

Profil

Révision b0dc3a2e

Ajouté par Julien Enselme il y a plus de 7 ans

Update to Drupal 7.52

Voir les différences:

drupal7/modules/field/field.install
467 467
  // Empty update to force a rebuild of the registry.
468 468
}
469 469

  
470
/**
471
 * Grant the new "administer fields" permission to trusted users.
472
 */
473
function field_update_7004() {
474
  // Assign the permission to anyone that already has a trusted core permission
475
  // that would have previously let them administer fields on an entity type.
476
  $rids = array();
477
  $permissions = array(
478
    'administer site configuration',
479
    'administer content types',
480
    'administer users',
481
  );
482
  foreach ($permissions as $permission) {
483
    $rids = array_merge($rids, array_keys(user_roles(FALSE, $permission)));
484
  }
485
  $rids = array_unique($rids);
486
  foreach ($rids as $rid) {
487
    _update_7000_user_role_grant_permissions($rid, array('administer fields'), 'field');
488
  }
489
}
490

  
470 491
/**
471 492
 * @} End of "addtogroup updates-7.x-extra".
472 493
 */

Formats disponibles : Unified diff