Problem/Motivation

In old #2495833 issue contentPermissions() method has been removed in core/modules/node/src/NodePermissions.php.

Look at the difference below from issue #2495833:

diff --git a/core/modules/node/src/NodePermissions.php b/core/modules/node/src/NodePermissions.php
index 74a6442..dca4671 100644
--- a/core/modules/node/src/NodePermissions.php
+++ b/core/modules/node/src/NodePermissions.php
@@ -20,21 +20,6 @@ class NodePermissions {
   use UrlGeneratorTrait;
 
   /**
-   * Gets an array of content permissions.
-   *
-   * @return array
-   *   The content permissions.
-   */
-  public function contentPermissions() {
-    return array(
-      'access content overview' => array(
-        'title' => $this->t('Access the Content overview page'),
-        'description' => $this->t('Get an overview of <a href="!url">all content</a>.', array('!url' => $this->url('system.admin_content'))),
-      ),
-    );
-  }
-
-  /**
    * Gets an array of node type permissions.
    *
    * @return array

Together with contentPermissions() method $this->url('system.admin_content') has been removed so UrlGeneratorTrait class is no longer needed there.

Proposed resolution

Class UrlGeneratorTrait is no longer needed there, because it was only one reference to this class. Now it can be safely removed.

Remaining tasks

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Krzysztof Domański created an issue. See original summary.

Krzysztof Domański’s picture

Krzysztof Domański’s picture

Issue summary: View changes
Status: Active » Needs review
Krzysztof Domański’s picture

Title: Remove unnecessary UrlGeneratorTrait from core/modules/node/src/NodePermissions.php » Remove unnecessary UrlGeneratorTrait from NodePermissions.php
Issue summary: View changes
Issue tags: +Quick fix

Updated the Issue Summary in accordance with the standards.

longwave’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0a8ea5e and pushed to 8.7.x. Thanks!

  • alexpott committed 0a8ea5e on 8.7.x
    Issue #3001312 by Krzysztof Domański: Remove unnecessary...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.