public function mayOperate($sOperation, $oUser = false) { $oUser = DocumentPeer::getRightsUser($oUser); $bIsAllowed = false; if ($oUser && ($this->isNew() || $this->getCreatedBy() === $oUser->getId()) && DocumentPeer::mayOperateOnOwn($oUser, $this, $sOperation)) { $bIsAllowed = true; } else { if (DocumentPeer::mayOperateOn($oUser, $this, $sOperation)) { $bIsAllowed = true; } } FilterModule::getFilters()->handleDocumentOperationCheck($sOperation, $this, $oUser, array(&$bIsAllowed)); return $bIsAllowed; }