コード例 #1
0
 private function checkNodeRights($strNodeId, $bitView = false, $bitEdit = false, $bitDelete = false, $bitRights = false, $bitRight1 = false, $bitRight2 = false, $bitRight3 = false, $bitRight4 = false, $bitRight5 = false)
 {
     $objTestObject = class_objectfactory::getInstance()->getObject($strNodeId);
     $this->assertEquals($bitView, $this->objRights->rightView($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights View " . $strNodeId);
     $this->assertEquals($bitEdit, $this->objRights->rightEdit($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Edit " . $strNodeId);
     $this->assertEquals($bitDelete, $this->objRights->rightDelete($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Delete " . $strNodeId);
     $this->assertEquals($bitRights, $this->objRights->rightRight($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Rights" . $strNodeId);
     $this->assertEquals($bitRight1, $this->objRights->rightRight1($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Right1" . $strNodeId);
     $this->assertEquals($bitRight2, $this->objRights->rightRight2($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Right2" . $strNodeId);
     $this->assertEquals($bitRight3, $this->objRights->rightRight3($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Right3" . $strNodeId);
     $this->assertEquals($bitRight4, $this->objRights->rightRight4($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Right4" . $strNodeId);
     $this->assertEquals($bitRight5, $this->objRights->rightRight5($strNodeId, $this->strUserId), __FILE__ . " checkNodeRights Right5" . $strNodeId);
 }
コード例 #2
0
 private function printTree($strRootNode, $intLevel)
 {
     for ($i = 0; $i < $intLevel; $i++) {
         echo "   ";
     }
     $objCommon = new class_module_system_aspect($strRootNode);
     //var_dump($objCommon->getSystemRecord());
     echo $objCommon->getRecordComment() . " / (v: " . $this->objRights->rightView($strRootNode, $this->strUserId) . " e: " . $this->objRights->rightEdit($strRootNode, $this->strUserId) . ") /  " . $objCommon->getSystemid() . "\n";
     //var_dump($objCommon->getChildNodesAsIdArray());
     foreach ($objCommon->getChildNodesAsIdArray() as $strOneId) {
         $this->printTree($strOneId, $intLevel + 1);
     }
 }