From c28557bfbf8a958dcf799775fdfe039afb3ec885 Mon Sep 17 00:00:00 2001 From: Torsten Simon Date: Fri, 16 Dec 2022 11:52:03 +0100 Subject: [PATCH 1/2] fix:contentLicense check not working properly if accessOriginal was empty --- application/esmain/index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/esmain/index.php b/application/esmain/index.php index 32983e69..5919e8f2 100644 --- a/application/esmain/index.php +++ b/application/esmain/index.php @@ -148,14 +148,15 @@ 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 (@in_array('Read', $data->node->accessOriginal) === true) { + error_log(print_r($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)); From 4f12e34949f13597cce2e4d1abb718cdc49ea58e Mon Sep 17 00:00:00 2001 From: Torsten Simon Date: Fri, 16 Dec 2022 11:57:32 +0100 Subject: [PATCH 2/2] fix:docker compose allow host access --- .legacy/docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: