Problem/Motivation
The permissions callback provider class, being handled by the controller resolver, is capable of dependency injection by implementing ContainerInjectionInterface. The following patch adds that for the node module permission provider. The same should be done for other core modules that provide permission callbacks.
Proposed resolution
Make NodePermissions implement ContainerInjectionInterface
Add autowiring of entity type manager
Remaining tasks
Review
API changes
NodePermissions now requires an $entityTypeManager argument.