Hi, I've tried this plugin and it is OK for me (although hide the resources in the tree would be better). The problem with this plugin is, that the user can't create a new resources (I get a white screen).
here my code:
<?php
#OnBeforeDocFormDelete and OnDocFormPrerender is activate
$managerPath = $modx->config['site_url'].'manager';
$authorId = $resource->get('createdby');
if (isset($authorId)) {
if ($modx->user->isMember(array('Administrator')) or
($modx->user->get('id') == $authorId))
{
#do nothing, resource access is allowed
}
else {
$modx->sendRedirect($managerPath);
}
}
I guess this is the problem
$authorId = $resource->get('createdby');
by reason the 'createdby' is not available - until I save the resources.
Are anyone know a solution for that issue?
____________________________________________________
MODx 2.1.5-pl without Error-Log and sorry for my english