Implements AccessCheckInterface::access().
Overrides AccessCheckInterface::access
public function access(Route $route, Request $request) {
$permission = $route
->getRequirement('_permission');
// @todo Replace user_access() with a correctly injected and session-using
// alternative.
// If user_access() fails, return NULL to give other checks a chance.
return user_access($permission) ? static::ALLOW : static::DENY;
}