diff --git a/core/docs/changelog.txt b/core/docs/changelog.txt index 05be13ddb4d..f36b09ca4a4 100755 --- a/core/docs/changelog.txt +++ b/core/docs/changelog.txt @@ -2,6 +2,7 @@ This file shows the changes in recent releases of MODX. The most current release is usually the development release, and is only shown to give an idea of what's currently in the pipeline. +- [#4918] Limit save permission check to modified nodes in resource/sort processor - [#5065] Fix 404 error with cross-context symlinks when cacheable - [#5152] Fix nested non-cacheable tags from being cached in modResource->_content - [#5145] Update config check on dashboard to show correct core path if core is moved diff --git a/core/model/modx/processors/resource/sort.php b/core/model/modx/processors/resource/sort.php index 860ff41bc7a..07883eb9416 100644 --- a/core/model/modx/processors/resource/sort.php +++ b/core/model/modx/processors/resource/sort.php @@ -29,10 +29,6 @@ $node = $modx->getObject('modResource',$ar_node['id']); if (empty($node)) continue; - if (!$node->checkPolicy('save')) { - $nodeErrors[] = $modx->lexicon('access_denied'); - continue; - } if (empty($ar_node['context'])) continue; if (in_array($ar_node['parent'],$dontChangeParents)) continue; @@ -76,6 +72,13 @@ $node->set('menuindex',$ar_node['order']); $modifiedNodes[] = $node; } +if (!empty($modifiedNodes)) { + foreach ($modifiedNodes as $modifiedNode) { + if (!$modifiedNode->checkPolicy('save')) { + $nodeErrors[] = $modx->lexicon('resource_err_save'); + } + } +} if (!empty($nodeErrors)) { return $modx->error->failure(implode("\n", array_unique($nodeErrors))); }