Ehmm...
Glad to know that you solve your problem.
Btw, here is the function that I made to check manager permission on specific document.
// API Addition to check manager doc groups with current docs
function isMemberOfMgrGroup(){
global $modx;
// Fetch current document groups
$sql = '';
$result = $modx->db->select('document_group', $modx->getFullTableName("document_groups"), 'document = '.$modx->documentIdentifier);
$counter = 0;
while($tempResult = mysql_fetch_array($result)) {
$docGroups[$counter] = $tempResult['document_group'];
$counter++;
}
if(!is_array($docGroups)) return true;
// Fetch current manager groups
$mgrGroups = $_SESSION['mgrDocgroups'];
if(!is_array($mgrGroups)) return false;
// Check doc groups and mgr groups
if(!is_array($docGroups)) return false;
foreach($docGroups as $k=>$v)
if(in_array(trim($v),$mgrGroups)) return true;
return false;
}
Hope it will ease your development process.
Sicnerely,