diff -u b/core/modules/book/tests/src/Functional/BookTest.php b/core/modules/book/tests/src/Functional/BookTest.php --- b/core/modules/book/tests/src/Functional/BookTest.php +++ b/core/modules/book/tests/src/Functional/BookTest.php @@ -240,7 +240,7 @@ // Give anonymous users the permission 'node test view'. $edit = []; $edit[RoleInterface::ANONYMOUS_ID . '[node test view]'] = TRUE; - $this->drupalPostForm('admin/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); + $this->drupalPostForm('admin/config/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), "Permission 'node test view' successfully assigned to anonymous users."); // Test correct display of the block. @@ -315,7 +315,7 @@ // Give anonymous users the permission 'node test view'. $edit = []; $edit[RoleInterface::ANONYMOUS_ID . '[node test view]'] = TRUE; - $this->drupalPostForm('admin/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); + $this->drupalPostForm('admin/config/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), "Permission 'node test view' successfully assigned to anonymous users."); // Create a book. @@ -427,7 +427,7 @@ // Give anonymous users the permission 'node test view'. $edit = []; $edit[RoleInterface::ANONYMOUS_ID . '[node test view]'] = TRUE; - $this->drupalPostForm('admin/config/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); + $this->drupalPostForm('admin/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), "Permission 'node test view' successfully assigned to anonymous users."); // Test correct display of the block. @@ -502,7 +502,7 @@ // Give anonymous users the permission 'node test view'. $edit = []; $edit[RoleInterface::ANONYMOUS_ID . '[node test view]'] = TRUE; - $this->drupalPostForm('admin/config/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); + $this->drupalPostForm('admin/people/permissions/' . RoleInterface::ANONYMOUS_ID, $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), "Permission 'node test view' successfully assigned to anonymous users."); // Create a book. reverted: --- b/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php +++ a/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php @@ -45,7 +45,7 @@ $edit = [ 'authenticated[translate interface]' => 'translate interface', ]; + $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); - $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); // Check and update the translation status. This will import the Afrikaans // translations of locale_test_translate module. reverted: --- b/core/modules/node/src/Tests/NodeViewTest.php +++ a/core/modules/node/src/Tests/NodeViewTest.php @@ -49,7 +49,7 @@ $edit = [ 'anonymous[edit own ' . $node->bundle() . ' content]' => TRUE ]; + $this->drupalPostForm('admin/people/permissions', $edit, 'Save permissions'); - $this->drupalPostForm('admin/config/people/permissions', $edit, 'Save permissions'); $this->drupalLogout(); // Anonymous user's should now see the edit-form link but not the reverted: --- b/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php +++ a/core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php @@ -152,7 +152,7 @@ $edit = []; $edit[$rid . '[administer taxonomy]'] = FALSE; + $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); - $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); // Assert that the subtrees hash has been altered because the subtrees // structure changed. reverted: --- b/core/modules/user/src/Tests/UserPermissionsTest.php +++ a/core/modules/user/src/Tests/UserPermissionsTest.php @@ -40,19 +40,6 @@ } /** - * Test acessing the Permissions administration page. - */ - public function testPermissionsAdministration() { - $this->drupalLogin($this->adminUser); - $default_langcode = \Drupal::languageManager() - ->getDefaultLanguage() - ->getId(); - - $this->drupalGet('admin/config/people/permissions'); - $this->assertTitle(t('Permissions' . ' | Drupal')); - } - - /** * Test changing user permissions through the permissions page. */ public function testUserPermissionChanges() { @@ -74,7 +61,7 @@ $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.'); $edit = []; $edit[$rid . '[administer users]'] = TRUE; + $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); - $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.'); $storage->resetCache(); $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.'); @@ -87,7 +74,7 @@ $this->assertTrue($account->hasPermission('access user profiles'), 'User has "access user profiles" permission.'); $edit = []; $edit[$rid . '[access user profiles]'] = FALSE; + $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); - $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.'); $storage->resetCache(); $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has "access user profiles" permission.'); reverted: --- b/core/modules/user/src/Tests/UserRoleAdminTest.php +++ a/core/modules/user/src/Tests/UserRoleAdminTest.php @@ -42,17 +42,20 @@ public function testRoleAdministration() { $this->drupalLogin($this->adminUser); $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); + // Test presence of tab. + $this->drupalGet('admin/people/permissions'); + $tabs = $this->xpath('//ul[@class=:classes and //a[contains(., :text)]]', [ + ':classes' => 'tabs primary', + ':text' => t('Roles'), + ]); + $this->assertEqual(count($tabs), 1, 'Found roles tab'); - - // Test accessing the Roles administration page. - $this->drupalGet( 'admin/config/people/roles'); - $this->assertTitle(t('Roles' . ' | Drupal')); // Test adding a role. (In doing so, we use a role name that happens to // correspond to an integer, to test that the role administration pages // correctly distinguish between role names and IDs.) $role_name = '123'; $edit = ['label' => $role_name, 'id' => $role_name]; + $this->drupalPostForm('admin/people/roles/add', $edit, t('Save')); - $this->drupalPostForm('admin/config/people/roles/add', $edit, t('Save')); $this->assertRaw(t('Role %label has been added.', ['%label' => 123])); $role = Role::load($role_name); $this->assertTrue(is_object($role), 'The role was successfully retrieved from the database.'); @@ -61,33 +64,33 @@ $this->assertEqual($role->language()->getId(), $default_langcode); // Try adding a duplicate role. + $this->drupalPostForm('admin/people/roles/add', $edit, t('Save')); - $this->drupalPostForm('admin/config/people/roles/add', $edit, t('Save')); $this->assertRaw(t('The machine-readable name is already in use. It must be unique.'), 'Duplicate role warning displayed.'); // Test renaming a role. $role_name = '456'; $edit = ['label' => $role_name]; + $this->drupalPostForm("admin/people/roles/manage/{$role->id()}", $edit, t('Save')); - $this->drupalPostForm("admin/config/people/roles/manage/{$role->id()}", $edit, t('Save')); $this->assertRaw(t('Role %label has been updated.', ['%label' => $role_name])); \Drupal::entityManager()->getStorage('user_role')->resetCache([$role->id()]); $new_role = Role::load($role->id()); $this->assertEqual($new_role->label(), $role_name, 'The role name has been successfully changed.'); // Test deleting a role. + $this->drupalGet("admin/people/roles/manage/{$role->id()}"); - $this->drupalGet("admin/config/people/roles/manage/{$role->id()}"); $this->clickLink(t('Delete')); $this->drupalPostForm(NULL, [], t('Delete')); $this->assertRaw(t('The role %label has been deleted.', ['%label' => $role_name])); + $this->assertNoLinkByHref("admin/people/roles/manage/{$role->id()}", 'Role edit link removed.'); - $this->assertNoLinkByHref("admin/config/people/roles/manage/{$role->id()}", 'Role edit link removed.'); \Drupal::entityManager()->getStorage('user_role')->resetCache([$role->id()]); $this->assertFalse(Role::load($role->id()), 'A deleted role can no longer be loaded.'); // Make sure that the system-defined roles can be edited via the user // interface. + $this->drupalGet('admin/people/roles/manage/' . RoleInterface::ANONYMOUS_ID); - $this->drupalGet('admin/config/people/roles/manage/' . RoleInterface::ANONYMOUS_ID); $this->assertResponse(200, 'Access granted when trying to edit the built-in anonymous role.'); $this->assertNoText(t('Delete role'), 'Delete button for the anonymous role is not present.'); + $this->drupalGet('admin/people/roles/manage/' . RoleInterface::AUTHENTICATED_ID); - $this->drupalGet('admin/config/people/roles/manage/' . RoleInterface::AUTHENTICATED_ID); $this->assertResponse(200, 'Access granted when trying to edit the built-in authenticated role.'); $this->assertNoText(t('Delete role'), 'Delete button for the authenticated role is not present.'); } @@ -110,7 +113,7 @@ $saved_rids[] = $role->id(); $weight--; } + $this->drupalPostForm('admin/people/roles', $edit, t('Save')); - $this->drupalPostForm('admin/config/people/roles', $edit, t('Save')); $this->assertText(t('The role settings have been updated.'), 'The role settings form submitted successfully.'); // Load up the user roles with the new weights. 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 @@ -87,9 +87,6 @@ case 'user.admin_create': return '

' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '

'; - case 'entity.user.collection': - return '

' . t('For configuration of user accounts, permissions and roles check the People Configuration pages.', [':config-people' => \Drupal::url('user.admin_index')]) . '

'; - case 'user.admin_permissions': return '

' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', [':role' => \Drupal::url('entity.user_role.collection'), ':settings' => \Drupal::url('entity.user.admin_form')]) . '

'; @@ -98,6 +95,9 @@ case 'user.admin_create': return '

' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '

'; + case 'entity.user.collection': + return '

' . t('For configuration of user accounts, permissions and roles check the People Configuration pages.', [':config-people' => \Drupal::url('user.admin_index')]) . '

'; + case 'user.admin_permissions': return '

' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', [':role' => \Drupal::url('entity.user_role.collection'), ':settings' => \Drupal::url('entity.user.admin_form')]) . '

'; reverted: --- b/core/modules/views_ui/src/Tests/ViewEditTest.php +++ a/core/modules/views_ui/src/Tests/ViewEditTest.php @@ -172,7 +172,7 @@ $edit = [ 'authenticated[administer languages]' => TRUE, ]; + $this->drupalPostForm('/admin/people/permissions', $edit, t('Save permissions')); - $this->drupalPostForm('/admin/config/people/permissions', $edit, t('Save permissions')); // Enable Content language negotiation so we have one more item // to select. $edit = [ only in patch2: unchanged: --- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php @@ -57,7 +57,7 @@ public function testConfigTranslationImport() { $edit = [ 'authenticated[translate interface]' => 'translate interface', ]; - $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); + $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); // Check and update the translation status. This will import the Afrikaans // translations of locale_test_translate module. only in patch2: unchanged: --- a/core/modules/node/tests/src/Functional/NodeViewTest.php +++ b/core/modules/node/tests/src/Functional/NodeViewTest.php @@ -49,7 +49,7 @@ public function testHtmlHeadLinks() { $edit = [ 'anonymous[edit own ' . $node->bundle() . ' content]' => TRUE ]; - $this->drupalPostForm('admin/people/permissions', $edit, 'Save permissions'); + $this->drupalPostForm('admin/config/people/permissions', $edit, 'Save permissions'); $this->drupalLogout(); // Anonymous user's should now see the edit-form link but not the only in patch2: unchanged: --- a/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php +++ b/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php @@ -153,7 +153,7 @@ public function testUserRoleUpdateSubtreesHashCacheClear() { $edit = []; $edit[$rid . '[administer taxonomy]'] = FALSE; - $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); + $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); // Assert that the subtrees hash has been altered because the subtrees // structure changed. only in patch2: unchanged: --- a/core/modules/user/tests/src/Functional/UserPermissionsTest.php +++ b/core/modules/user/tests/src/Functional/UserPermissionsTest.php @@ -40,6 +40,19 @@ protected function setUp() { } /** + * Test acessing the Permissions administration page. + */ + public function testPermissionsAdministration() { + $this->drupalLogin($this->adminUser); + $default_langcode = \Drupal::languageManager() + ->getDefaultLanguage() + ->getId(); + + $this->drupalGet('admin/config/people/permissions'); + $this->assertTitle(t('Permissions' . ' | Drupal')); + } + + /** * Test changing user permissions through the permissions page. */ public function testUserPermissionChanges() { @@ -61,7 +74,7 @@ public function testUserPermissionChanges() { $this->assertFalse($account->hasPermission('administer users'), 'User does not have "administer users" permission.'); $edit = []; $edit[$rid . '[administer users]'] = TRUE; - $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); + $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.'); $storage->resetCache(); $this->assertTrue($account->hasPermission('administer users'), 'User now has "administer users" permission.'); @@ -74,7 +87,7 @@ public function testUserPermissionChanges() { $this->assertTrue($account->hasPermission('access user profiles'), 'User has "access user profiles" permission.'); $edit = []; $edit[$rid . '[access user profiles]'] = FALSE; - $this->drupalPostForm('admin/people/permissions', $edit, t('Save permissions')); + $this->drupalPostForm('admin/config/people/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), 'Successful save message displayed.'); $storage->resetCache(); $this->assertFalse($account->hasPermission('access user profiles'), 'User no longer has "access user profiles" permission.'); only in patch2: unchanged: --- a/core/modules/user/tests/src/Functional/UserRoleAdminTest.php +++ b/core/modules/user/tests/src/Functional/UserRoleAdminTest.php @@ -42,20 +42,17 @@ protected function setUp() { public function testRoleAdministration() { $this->drupalLogin($this->adminUser); $default_langcode = \Drupal::languageManager()->getDefaultLanguage()->getId(); - // Test presence of tab. - $this->drupalGet('admin/people/permissions'); - $tabs = $this->xpath('//ul[@class=:classes and //a[contains(., :text)]]', [ - ':classes' => 'tabs primary', - ':text' => 'Roles', - ]); - $this->assertEqual(count($tabs), 1, 'Found roles tab'); + + // Test accessing the Roles administration page. + $this->drupalGet( 'admin/config/people/roles'); + $this->assertTitle(t('Roles' . ' | Drupal')); // Test adding a role. (In doing so, we use a role name that happens to // correspond to an integer, to test that the role administration pages // correctly distinguish between role names and IDs.) $role_name = '123'; $edit = ['label' => $role_name, 'id' => $role_name]; - $this->drupalPostForm('admin/people/roles/add', $edit, t('Save')); + $this->drupalPostForm('admin/config/people/roles/add', $edit, t('Save')); $this->assertRaw(t('Role %label has been added.', ['%label' => 123])); $role = Role::load($role_name); $this->assertTrue(is_object($role), 'The role was successfully retrieved from the database.'); @@ -64,33 +61,33 @@ public function testRoleAdministration() { $this->assertEqual($role->language()->getId(), $default_langcode); // Try adding a duplicate role. - $this->drupalPostForm('admin/people/roles/add', $edit, t('Save')); + $this->drupalPostForm('admin/config/people/roles/add', $edit, t('Save')); $this->assertRaw(t('The machine-readable name is already in use. It must be unique.'), 'Duplicate role warning displayed.'); // Test renaming a role. $role_name = '456'; $edit = ['label' => $role_name]; - $this->drupalPostForm("admin/people/roles/manage/{$role->id()}", $edit, t('Save')); + $this->drupalPostForm("admin/config/people/roles/manage/{$role->id()}", $edit, t('Save')); $this->assertRaw(t('Role %label has been updated.', ['%label' => $role_name])); \Drupal::entityManager()->getStorage('user_role')->resetCache([$role->id()]); $new_role = Role::load($role->id()); $this->assertEqual($new_role->label(), $role_name, 'The role name has been successfully changed.'); // Test deleting a role. - $this->drupalGet("admin/people/roles/manage/{$role->id()}"); + $this->drupalGet("admin/config/people/roles/manage/{$role->id()}"); $this->clickLink(t('Delete')); $this->drupalPostForm(NULL, [], t('Delete')); $this->assertRaw(t('The role %label has been deleted.', ['%label' => $role_name])); - $this->assertNoLinkByHref("admin/people/roles/manage/{$role->id()}", 'Role edit link removed.'); + $this->assertNoLinkByHref("admin/config/people/roles/manage/{$role->id()}", 'Role edit link removed.'); \Drupal::entityManager()->getStorage('user_role')->resetCache([$role->id()]); $this->assertFalse(Role::load($role->id()), 'A deleted role can no longer be loaded.'); // Make sure that the system-defined roles can be edited via the user // interface. - $this->drupalGet('admin/people/roles/manage/' . RoleInterface::ANONYMOUS_ID); + $this->drupalGet('admin/config/people/roles/manage/' . RoleInterface::ANONYMOUS_ID); $this->assertResponse(200, 'Access granted when trying to edit the built-in anonymous role.'); $this->assertNoText(t('Delete role'), 'Delete button for the anonymous role is not present.'); - $this->drupalGet('admin/people/roles/manage/' . RoleInterface::AUTHENTICATED_ID); + $this->drupalGet('admin/config/people/roles/manage/' . RoleInterface::AUTHENTICATED_ID); $this->assertResponse(200, 'Access granted when trying to edit the built-in authenticated role.'); $this->assertNoText(t('Delete role'), 'Delete button for the authenticated role is not present.'); } @@ -113,7 +110,7 @@ public function testRoleWeightOrdering() { $saved_rids[] = $role->id(); $weight--; } - $this->drupalPostForm('admin/people/roles', $edit, t('Save')); + $this->drupalPostForm('admin/config/people/roles', $edit, t('Save')); $this->assertText(t('The role settings have been updated.'), 'The role settings form submitted successfully.'); // Load up the user roles with the new weights. only in patch2: unchanged: --- a/core/modules/views_ui/tests/src/Functional/ViewEditTest.php +++ b/core/modules/views_ui/tests/src/Functional/ViewEditTest.php @@ -185,7 +185,7 @@ public function testEditFormLanguageOptions() { $edit = [ 'authenticated[administer languages]' => TRUE, ]; - $this->drupalPostForm('/admin/people/permissions', $edit, t('Save permissions')); + $this->drupalPostForm('/admin/config/people/permissions', $edit, t('Save permissions')); // Enable Content language negotiation so we have one more item // to select. $edit = [