コード例 #1
0
 function postInstall()
 {
     if ($this->firstExec('acl2')) {
         jAcl2DbManager::removeSubject('hfnu.admin.server.info');
         jAcl2DbManager::addSubject('servinfo.access', 'servinfo~servinfo.acl.access');
         jAcl2DbManager::addRight(1, 'servinfo.access');
         // for admin group
     }
 }
コード例 #2
0
 public function testRemoveSubject2()
 {
     // remove a subject when rights exists on it
     jAcl2DbManager::removeSubject('super.cms.update');
     array_pop($this->subjects);
     $this->assertTableContainsRecords('jacl2_subject', $this->subjects);
     $this->rights = array(array('id_aclsbj' => 'super.cms.list', 'id_aclgrp' => 'group1', 'id_aclres' => null), array('id_aclsbj' => 'super.cms.list2', 'id_aclgrp' => 'group1', 'id_aclres' => null), array('id_aclsbj' => 'admin.access', 'id_aclgrp' => 'group1', 'id_aclres' => null));
     $this->assertTableContainsRecords('jacl2_rights', $this->rights);
 }