I have setup a limited manager account that only has edit permissions, but I see they can still duplicate existing documents which effectively allow them to create a new page. How do I prevent someone from doing this? I only want managers to edit existing pages.
-
☆ A M B ☆
- 24,524 Posts
Looking over the code, it appears that this was overlooked. I believe that if you added the following block of code near the beginning of the manager/processors /duplicate_content.processor.php file (immediately after the initial access check) it would solve the problem:
if (!$modx->hasPermission('new_document')) {
$e->setError(3);
$e->dumpError();
}
-
☆ A M B ☆
- 24,524 Posts
Way ahead of you, Ryan! Also noted two other duplicate processors using the wrong permission check. Looks to me like somebody did a quick copy/paste job and didn’t pay attention.