コード例 #1
0
ファイル: miscTest.php プロジェクト: gudwin/extasy
 /**
  * 
  */
 public function testRemoveEntity()
 {
     ACL::create('test');
     ACL::create('test2');
     ACL::create('test3');
     ACL::grant('test', 'obj1');
     ACL::grant('test2', 'obj2');
     ACL::grant('test3', 'obj1');
     ACL::removeEntity('obj1');
     $this->assertEquals(1, DBSimple::getRowsCount(ACL_GRANT_TABLE));
     $this->assertEquals(true, ACL::isGranted('test2', 'obj2'));
 }
コード例 #2
0
ファイル: grant.php プロジェクト: gudwin/extasy
 public function onDelete(\Extasy\ORM\QueryBuilder $queryBuilder)
 {
     ACL::removeEntity($this->getEntity());
 }