コード例 #1
0
 function test_join_test()
 {
     ACL::add('dummy', 'blog:posts', 'add');
     $acl = new ACL();
     $this->assertTrue($acl->grant('dummy', 'blog:posts', 'add'));
     $this->assertFalse($acl->grant('dummy', 'blog:posts', 'edit'));
     ACL::remove('dummy', 'blog:posts', 'add');
     $this->assertFalse($acl->grant('dummy', 'blog:posts', 'add'));
 }
コード例 #2
0
ファイル: deleteTest.php プロジェクト: gudwin/extasy
 public function testDeleteAndCheckEntityDeletion()
 {
     ACL::create('test/test2/test3');
     ACL::grant('test/test2/test3', 'o1');
     ACL::grant('test', 'o2');
     ACL::remove('test/test2');
     $this->assertEquals(1, DBSimple::getRowsCount(ACL_GRANT_TABLE));
     // Проверяем, что удалились именно нужные данные
     $this->assertEquals(true, ACL::isGranted('test', 'o2'));
 }
コード例 #3
0
ファイル: index.php プロジェクト: gudwin/extasy
 public function call($method, $path, $title = '')
 {
     switch ($method) {
         case 'create':
             print ACL::create($path, $title);
             break;
         case 'remove':
             ACL::remove($path);
             break;
     }
     die;
 }