public function viewAccess($disable = false) { global $cookie; if (!Module::isInstalled('agilemultipleseller')) { return parent::viewAccess($disable); } $eaccess = AgileSellerManager::get_entity_access($this->table); if ($this->is_seller and $objid = intval(Tools::getValue('id_' . $this->table))) { if ($objid == $cookie->id_employee and $this->table == 'employee') { return true; } $id_owner = AgileSellerManager::getObjectOwnerID($this->table, $objid); if ($id_owner > 0 or $eaccess['is_exclusive']) { if (!AgileSellerManager::hasOwnership($this->table, $objid)) { return false; } } else { if (isset($_GET['update' . $this->table])) { return false; } } } return parent::viewAccess($disable); }