Added access wise permission on the IMAP edit process

This commit is contained in:
vishalsingh.qlo325
2024-07-10 16:02:14 +05:30
parent 9590e3f871
commit 584eed90c2

View File

@@ -318,14 +318,20 @@ class AdminCustomerThreadsControllerCore extends AdminController
public function postProcess()
{
// using this to separate the saving process for the both option fields
$fields = $this->fields_options;
if (Tools::isSubmit('submitOptionsCustomerService')) {
unset($this->fields_options['general']);
$this->processUpdateOptions();
} else if (Tools::isSubmit('submitOptionsIMAPConfig')) {
unset($this->fields_options['contact']);
$this->processUpdateOptions();
if ($this->tabAccess['edit'] === '1') {
// using this to separate the saving process for the both option fields
$fields = $this->fields_options;
if (Tools::isSubmit('submitOptionsCustomerService')) {
unset($this->fields_options['general']);
$this->processUpdateOptions();
} else if (Tools::isSubmit('submitOptionsIMAPConfig')) {
unset($this->fields_options['contact']);
$this->processUpdateOptions();
}
$this->fields_options = $fields;
} else {
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
}
$this->fields_options = $fields;