summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/file/src/FileAccessControlHandler.php
diff options
context:
space:
mode:
authorAlex Pott <alex.a.pott@googlemail.com>2019-06-02 08:53:50 +0100
committerAlex Pott <alex.a.pott@googlemail.com>2019-06-02 08:53:50 +0100
commite08ec1395cca4e29475257d9b98b85a46686f077 (patch)
treea3fdf4705fb4b8588aa291d37058af966949a70c /core/modules/file/src/FileAccessControlHandler.php
parentd2792e13d7344c8963b5ddea16d902e55ed42b60 (diff)
downloaddrupal-e08ec1395cca4e29475257d9b98b85a46686f077.tar.gz
drupal-e08ec1395cca4e29475257d9b98b85a46686f077.zip
Issue #3034072 by kim.pepper, Berdir, alexpott, jibran, larowlan, claudiu.cristea: Move file uri/scheme functions from file.inc and FileSystem to StreamWrapperManager
Diffstat (limited to 'core/modules/file/src/FileAccessControlHandler.php')
-rw-r--r--core/modules/file/src/FileAccessControlHandler.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/file/src/FileAccessControlHandler.php b/core/modules/file/src/FileAccessControlHandler.php
index 1e6768da645..7c1aed94557 100644
--- a/core/modules/file/src/FileAccessControlHandler.php
+++ b/core/modules/file/src/FileAccessControlHandler.php
@@ -21,7 +21,7 @@ class FileAccessControlHandler extends EntityAccessControlHandler {
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
/** @var \Drupal\file\FileInterface $entity */
if ($operation == 'download' || $operation == 'view') {
- if (\Drupal::service('file_system')->uriScheme($entity->getFileUri()) === 'public') {
+ if (\Drupal::service('stream_wrapper_manager')->getScheme($entity->getFileUri()) === 'public') {
if ($operation === 'download') {
return AccessResult::allowed();
}