Updated: Comment #0

Problem/Motivation

  1. \Drupal\node\NodeTypeAccessController uses user_access() which is deprecated.
  2. \Drupal\node\NodeTypeAccessController has no unit tests.

Proposed resolution

  1. Use $account->hasPermission() instead
  2. Tests, tests, tests, tests, tests!!!

Remaining tasks

Review patch.

#2041333: Inject the module handler into the entity access controller

Comments

tstoeckler’s picture

Status: Active » Needs review
StatusFileSize
new5.76 KB

Status: Needs review » Needs work

The last submitted patch, 2069291-1-node-type-access-controller.patch, failed testing.

tstoeckler’s picture

Sub-class must implement the getInfo method!

Thanks bot, that's actually a useful hint. I forgot our weirdo PhpUnit usage.

tstoeckler’s picture

Status: Needs work » Needs review
StatusFileSize
new997 bytes
new6.05 KB

Let's see if this works better.

alansaviolobo’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

the controller doesn't seem to exist anymore