diff --git a/.legacy/docker-compose.yml b/.legacy/docker-compose.yml index f6e845dd..c4c7c5f9 100755 --- a/.legacy/docker-compose.yml +++ b/.legacy/docker-compose.yml @@ -24,7 +24,8 @@ services: - "8081:80" volumes: - ../:/var/www/html/ - + extra_hosts: + - "host.docker.internal:host-gateway" networks: rendering: diff --git a/src/main/php/application/esmain/index.php b/src/main/php/application/esmain/index.php index a5f6f43d..e931e94d 100644 --- a/src/main/php/application/esmain/index.php +++ b/src/main/php/application/esmain/index.php @@ -140,14 +140,14 @@ function render(array $options) Config::set('forcePreview', true); Config::set('hasContentLicense', false); - if (in_array('ccm:collection_io_reference', $data->node->aspects) && !empty($data->node->accessOriginal)) { + if (in_array('ccm:collection_io_reference', $data->node->aspects)) { // is it a licensed node? check the original for access (new since 5.1) if ($data->node->originalRestrictedAccess) { - Config::set('hasContentLicense', @in_array('ReadAll', $data->node->accessOriginal) === true); - } else if (!empty($data->node->accessOriginal) && @in_array('Read', $data->node->accessOriginal) === true) { + Config::set('hasContentLicense', !empty($data->node->accessOriginal) && in_array('ReadAll', $data->node->accessOriginal) === true); + } else if (!empty($data->node->accessOriginal) && in_array('Read', $data->node->accessOriginal) === true) { //Has the user alf permissions on the node? -> check if he also has read_all permissions // LEGACY! Remove this Behaviour in future releases, only included for back compat - Config::set('hasContentLicense', in_array('ReadAll', $data->node->accessOriginal)); + Config::set('hasContentLicense', !empty($data->node->accessOriginal) && in_array('ReadAll', $data->node->accessOriginal)); } else { // otherwise, the collection concept allows access, so we give the user access simply depending on the collection entry Config::set('hasContentLicense', in_array('ReadAll', $data->node->access));