// Split AdminController::init() in init() and initProcess()

This commit is contained in:
tDidierjean
2011-11-29 14:20:22 +00:00
parent 19c7177e91
commit e37b922e8e
2 changed files with 184 additions and 178 deletions
@@ -338,6 +338,18 @@ class AdminEmployeesControllerCore extends AdminController
}
return parent::postProcess();
}
public function initProcess()
{
// If employee is editing its own entry, its ok
if ($this->tabAccess['edit'] !== '1'
&& $this->table == 'employee'
&& $this->context->employee->id == Tools::getValue('id_employee')
&& Tools::isSubmit('updateemployee'))
$this->tabAccess['edit'] = 1;
parent::initProcess();
}
}