diff --git a/core/modules/datetime/src/Tests/DateTimeFieldTest.php b/core/modules/datetime/src/Tests/DateTimeFieldTest.php index bf3ba07..bd98a33 100644 --- a/core/modules/datetime/src/Tests/DateTimeFieldTest.php +++ b/core/modules/datetime/src/Tests/DateTimeFieldTest.php @@ -70,8 +70,9 @@ protected function setUp() { 'view test entity', 'administer entity_test content', 'administer entity_test form display', - 'administer content types', + 'administer nodes', 'administer node fields', + 'administer content types', )); $this->drupalLogin($web_user); diff --git a/core/modules/node/src/Access/NodeAddAccessCheck.php b/core/modules/node/src/Access/NodeAddAccessCheck.php index 8d9d119..5ab4831 100644 --- a/core/modules/node/src/Access/NodeAddAccessCheck.php +++ b/core/modules/node/src/Access/NodeAddAccessCheck.php @@ -46,8 +46,8 @@ public function __construct(EntityManagerInterface $entity_manager) { */ public function access(AccountInterface $account, NodeTypeInterface $node_type = NULL) { $access_control_handler = $this->entityManager->getAccessControlHandler('node'); - // If checking whether a node of a particular type may be created. - if ($account->hasPermission('administer content types')) { + // Check if user has permission to administer nodes. + if ($account->hasPermission('administer nodes')) { return AccessResult::allowed()->cachePerPermissions(); } if ($node_type) { diff --git a/core/modules/node/src/Tests/NodeAccessMenuLinkTest.php b/core/modules/node/src/Tests/NodeAccessMenuLinkTest.php index c1bc0eb..cebf39b 100644 --- a/core/modules/node/src/Tests/NodeAccessMenuLinkTest.php +++ b/core/modules/node/src/Tests/NodeAccessMenuLinkTest.php @@ -32,8 +32,9 @@ protected function setUp() { $this->contentAdminUser = $this->drupalCreateUser(array( 'access content', + 'administer nodes', + 'administer menu', 'administer content types', - 'administer menu' )); $this->config('user.role.' . RoleInterface::ANONYMOUS_ID)->set('permissions', array())->save(); diff --git a/core/modules/node/src/Tests/NodeCreationTest.php b/core/modules/node/src/Tests/NodeCreationTest.php index bf3ce86..ecdb4a4 100644 --- a/core/modules/node/src/Tests/NodeCreationTest.php +++ b/core/modules/node/src/Tests/NodeCreationTest.php @@ -185,7 +185,7 @@ function testNodeAddWithoutContentTypes() { $this->drupalGet('node/add'); $this->assertResponse(403); - $admin_content_types = $this->drupalCreateUser(array('administer content types')); + $admin_content_types = $this->drupalCreateUser(array('administer nodes')); $this->drupalLogin($admin_content_types); $this->drupalGet('node/add'); diff --git a/core/modules/node/src/Tests/NodeTypeTranslationTest.php b/core/modules/node/src/Tests/NodeTypeTranslationTest.php index f86ccc4..0a35042 100644 --- a/core/modules/node/src/Tests/NodeTypeTranslationTest.php +++ b/core/modules/node/src/Tests/NodeTypeTranslationTest.php @@ -52,10 +52,11 @@ protected function setUp() { parent::setUp(); $admin_permissions = array( - 'administer content types', + 'administer nodes', 'administer site configuration', 'administer themes', 'translate configuration', + 'administer content types', ); // Create and log in user. diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php index c6efe41..61ede2c 100644 --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php @@ -338,7 +338,7 @@ public function testAccessShortcutsPermission() { */ public function testShortcutLinkOrder() { // Ensure to give permissions to access the shortcuts. - $this->drupalLogin($this->drupalCreateUser(array('access toolbar', 'access shortcuts', 'access content overview', 'administer content types'))); + $this->drupalLogin($this->drupalCreateUser(array('access toolbar', 'access shortcuts', 'access content overview', 'administer nodes'))); $this->drupalGet(Url::fromRoute('')); $shortcuts = $this->cssSelect('#toolbar-item-shortcuts-tray .toolbar-menu a'); $this->assertEqual((string) $shortcuts[0], 'Add content'); diff --git a/core/profiles/minimal/src/Tests/MinimalTest.php b/core/profiles/minimal/src/Tests/MinimalTest.php index 056565e..637f988 100644 --- a/core/profiles/minimal/src/Tests/MinimalTest.php +++ b/core/profiles/minimal/src/Tests/MinimalTest.php @@ -24,7 +24,7 @@ function testMinimal() { // Create a user to test tools and navigation blocks for logged in users // with appropriate permissions. - $user = $this->drupalCreateUser(array('access administration pages', 'administer content types')); + $user = $this->drupalCreateUser(array('access administration pages', 'administer nodes')); $this->drupalLogin($user); $this->drupalGet(''); $this->assertText(t('Tools'));