Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/maven/fixes/8.0' into maven/fixe…
Browse files Browse the repository at this point in the history
…s/8.1
  • Loading branch information
thomschke committed Dec 16, 2022
2 parents f293cbf + 029ea35 commit 8aa197a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .legacy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ services:
- "8081:80"
volumes:
- ../:/var/www/html/

extra_hosts:
- "host.docker.internal:host-gateway"
networks:
rendering:

Expand Down
8 changes: 4 additions & 4 deletions src/main/php/application/esmain/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 8aa197a

Please sign in to comment.