/** * get all possible application rights * * @param int application id * @return array all application rights */ public function getAllRights($_applicationId) { $application = $this->getApplicationById($_applicationId); // call getAllApplicationRights for application (if it has specific rights) $appAclClassName = $application->name . '_Acl_Rights'; if (@class_exists($appAclClassName)) { $appAclObj = call_user_func(array($appAclClassName, 'getInstance')); $allRights = $appAclObj->getAllApplicationRights(); } else { $allRights = Tinebase_Acl_Rights::getInstance()->getAllApplicationRights($application->name); } return $allRights; }
/** * try to check getting application rights * */ public function testGetAllApplicationRights() { $rights = Tinebase_Acl_Rights::getInstance()->getAllApplicationRights('Tinebase'); //print_r($rights); $this->assertGreaterThan(0, count($rights)); }