diff -u b/core/includes/update.inc b/core/includes/update.inc --- b/core/includes/update.inc +++ b/core/includes/update.inc @@ -1540,10 +1540,10 @@ * This function can rename one permission to several or even delete an old * one. * - * @param $rename - * An asssociative array. The keys are the old permissions the values are - * a list of new permissions. If the list is an empty array, the old - * permission is removed. + * @param array $rename + * An associative array. The keys are the old permissions the values are a + * list of new permissions. If the list is an empty array, the old permission + * is removed. */ function update_rename_permissions($rename) { $prefix = 'user.role.'; @@ -1551,7 +1551,7 @@ $role_names = \Drupal::service('config.storage')->listAll($prefix); foreach ($role_names as $role_name) { $rid = substr($role_name, $cut); - $config = config("user.permission.$rid"); + $config = \Drupal::service('config.factory')->get("user.permission.$rid"); $permissions = $config->get(); foreach ($rename as $old_permission => $new_permissions) { $key = array_search($old_permission, $permissions); diff -u b/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/LanguageUpgradePathTest.php @@ -193,7 +193,7 @@ ))->execute(); $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.'); - $this->assertFalse(user_roles(FALSE, 'translate content'), 'No translate content role left on database.'); + $this->assertFalse(user_roles(FALSE, 'translate content'), 'No translate content role left in config.'); // Check that translate content has been renamed to translate all content. $this->assertTrue(user_roles(FALSE, 'translate all content'), 'Rename role translate content to translate all content was completed successfully.'); } diff -u b/core/modules/system/system.install b/core/modules/system/system.install --- b/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1614,7 +1614,7 @@ update_rename_permissions(array( 'block IP addresses' => array('ban IP addresses'), )); - config('user.permission.module') + config('user.module.permission') ->set("ban.ban IP addresses", TRUE) ->save(); // Rename {blocked_ips} table into {ban_ip}. diff -u b/core/modules/user/lib/Drupal/user/Plugin/views/filter/Permissions.php b/core/modules/user/lib/Drupal/user/Plugin/views/filter/Permissions.php --- b/core/modules/user/lib/Drupal/user/Plugin/views/filter/Permissions.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/filter/Permissions.php @@ -53,6 +53,7 @@ public function query() { // @todo user_role_names() should maybe support multiple permissions. $rids = array(); + // Get all roles, that have the configured permissions. foreach ($this->value as $permission) { $roles = user_role_names(FALSE, $permission); $rids += array_keys($roles); diff -u b/core/modules/user/user.module b/core/modules/user/user.module --- b/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1925,7 +1925,7 @@ ->save(); // @TODO: remove. $modules = user_permission_get_modules(); - $config = config('user.permission.module'); + $config = config('user.module.permission'); foreach ($modules as $permission => $module) { $config->set("$module.$permission", TRUE); } @@ -2566,7 +2566,7 @@ * Implements hook_modules_uninstalled(). */ function user_modules_uninstalled($modules) { - $config = config('user.permission.module'); + $config = config('user.module.permission'); $permissions_to_remove = array(); foreach ($modules as $module) { $permissions_to_remove += (array) $config->get($module);