So, I have a client that wants to automatically HIDE inactive accounts in the small list panel. I can see that you can use the FILTER tool to do this, but she wants it to be done automatically.
Here's the code I found that needs to be modified:
namespace Espo\Modules\Crm\AclPortal;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class Contact extends \Espo\Core\AclPortal\Base
{
public function checkIsOwnContact(User $user, Entity $entity)
{
$contactId = $user->get('contactId');
if ($contactId) {
if ($entity->id === $contactId) {
return true;
}
***** INSERT CODE HERE*****
}
return false;
}
}
I'm thinking that this will work:
*********
if ($contactNotActive === true) {
return false;
}
***********
Do I need to change any other code? Maximus , you have been my rock, does this look right to you???
Here's the code I found that needs to be modified:
namespace Espo\Modules\Crm\AclPortal;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class Contact extends \Espo\Core\AclPortal\Base
{
public function checkIsOwnContact(User $user, Entity $entity)
{
$contactId = $user->get('contactId');
if ($contactId) {
if ($entity->id === $contactId) {
return true;
}
***** INSERT CODE HERE*****
}
return false;
}
}
I'm thinking that this will work:
*********
if ($contactNotActive === true) {
return false;
}
***********
Do I need to change any other code? Maximus , you have been my rock, does this look right to you???
Comment