update.post_update.php

Same filename in other branches
  1. 10 core/modules/update/update.post_update.php
  2. 11.x core/modules/update/update.post_update.php

Post update functions for Update Manager.

File

core/modules/update/update.post_update.php

View source
<?php


/**
 * @file
 * Post update functions for Update Manager.
 */

/**
 * Add 'view update notifications' to roles with 'administer site configuration'.
 */
function update_post_update_add_view_update_notifications_permission(&$sandbox) {
    $roles = user_roles(FALSE, 'administer site configuration');
    foreach ($roles as $role) {
        $role->grantPermission('view update notifications')
            ->save();
    }
}

Functions

Title Deprecated Summary
update_post_update_add_view_update_notifications_permission Add 'view update notifications' to roles with 'administer site configuration'.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.