public function tearDown() { eZPolicyLimitation::removeByID($this->policy->attribute('id')); eZPolicy::removeByID($this->policy->attribute('id')); $this->policy = null; parent::tearDown(); }
$db->commit(); } } if ($http->hasPostVariable('RemovePolicy')) { $policyID = $http->postVariable('RolePolicy'); eZDebugSetting::writeDebug('kernel-role-edit', $policyID, 'trying to remove policy'); eZPolicy::removeByID($policyID); // Set flag for audit. If true audit will be processed $http->setSessionVariable('RoleWasChanged', true); } if ($http->hasPostVariable('RemovePolicies') and $http->hasPostVariable('DeleteIDArray')) { $db = eZDB::instance(); $db->begin(); foreach ($http->postVariable('DeleteIDArray') as $deleteID) { eZDebugSetting::writeDebug('kernel-role-edit', $deleteID, 'trying to remove policy'); eZPolicy::removeByID($deleteID); } $db->commit(); // Set flag for audit. If true audit will be processed $http->setSessionVariable('RoleWasChanged', true); } if ($http->hasPostVariable('CustomFunction')) { if ($http->hasPostVariable('Modules')) { $currentModule = $http->postVariable('Modules'); } else { if ($http->hasPostVariable('CurrentModule')) { $currentModule = $http->postVariable('CurrentModule'); } } if ($currentModule != '*') { $mod = eZModule::exists($currentModule);