コード例 #1
0
ファイル: grant.php プロジェクト: gudwin/extasy
 public function generate()
 {
     $fullGrantList = $this->getAllGrantsMap();
     $grantList = ACL::selectAllGrantsForEntity($this->entity);
     $tpl = __DIR__ . DIRECTORY_SEPARATOR . 'form.tpl';
     $parseData = array('name' => $this->szName, 'grantList' => $grantList, 'fullGrantList' => $fullGrantList);
     return UParser::parsePHPFile($tpl, $parseData);
 }
コード例 #2
0
ファイル: miscTest.php プロジェクト: gudwin/extasy
 /**
  * @group testSelectAllGrantsForEntity
  */
 public function testSelectAllGrantsForEntity()
 {
     ACL::create('test');
     ACL::create('test2');
     ACL::create('test3');
     ACL::grant('test', 'obj1');
     ACL::grant('test2', 'obj2');
     ACL::grant('test3', 'obj1');
     $grantsList = ACL::selectAllGrantsForEntity('obj1');
     $this->assertEquals(2, sizeof($grantsList));
     $this->assertFalse(!empty($grantsList['test2']));
     $this->assertTrue(!empty($grantsList['test3']));
     $this->assertTrue(!empty($grantsList['test']));
 }
コード例 #3
0
ファイル: grant.php プロジェクト: gudwin/extasy
 public function refreshRights()
 {
     $this->aValue = ACL::selectAllGrantsForEntity($this->getEntity());
     //		_debug( $this->aValue, $this->getEntity() );
     $this->loaded = true;
 }