group email account is system read only field
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**LICENSE**/
|
||||
|
||||
namespace Espo\Classes\FieldProcessing\InboundEmail;
|
||||
|
||||
use Espo\Core\FieldProcessing\Loader;
|
||||
use Espo\Core\FieldProcessing\Loader\Params;
|
||||
use Espo\Core\Utils\Config;
|
||||
use Espo\Entities\InboundEmail;
|
||||
use Espo\ORM\Entity;
|
||||
|
||||
/**
|
||||
* @implements Loader<InboundEmail>
|
||||
*/
|
||||
class IsSystemLoader implements Loader
|
||||
{
|
||||
public function __construct(
|
||||
private Config $config,
|
||||
) {}
|
||||
|
||||
public function process(Entity $entity, Params $params): void
|
||||
{
|
||||
$isSystem = $entity->getEmailAddress() === $this->config->get('outboundEmailFromAddress');
|
||||
|
||||
$entity->set('isSystem', $isSystem);
|
||||
}
|
||||
}
|
||||
@@ -40,9 +40,11 @@
|
||||
"fromName": "From Name",
|
||||
"smtpIsShared": "SMTP Is Shared",
|
||||
"smtpIsForMassEmail": "SMTP Is for Mass Email",
|
||||
"groupEmailFolder": "Group Email Folder"
|
||||
"groupEmailFolder": "Group Email Folder",
|
||||
"isSystem": "Is System"
|
||||
},
|
||||
"tooltips": {
|
||||
"isSystem": "Is the system email account.",
|
||||
"useSmtp": "The ability to send emails.",
|
||||
"reply": "Notify email senders that their emails has been received.\n\n Only one email will be sent to a particular recipient during some period of time to prevent looping.",
|
||||
"createCase": "Automatically create case from incoming emails.",
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
[
|
||||
{"name":"addAllTeamUsers"},
|
||||
{"name": "excludeFromReply"}
|
||||
],
|
||||
[
|
||||
{"name":"isSystem"},
|
||||
false
|
||||
]
|
||||
],
|
||||
"tabBreak": true,
|
||||
|
||||
@@ -73,6 +73,13 @@
|
||||
"tooltip": true,
|
||||
"default": true
|
||||
},
|
||||
"isSystem": {
|
||||
"type": "bool",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"directAccessDisabled": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"sentFolder": {
|
||||
"type": "varchar",
|
||||
"view": "views/inbound-email/fields/folder",
|
||||
|
||||
@@ -12,5 +12,8 @@
|
||||
],
|
||||
"updateInputFilterClassNameList": [
|
||||
"Espo\\Classes\\Record\\InboundEmail\\PasswordsInputFilter"
|
||||
],
|
||||
"readLoaderClassNameList": [
|
||||
"Espo\\Classes\\FieldProcessing\\InboundEmail\\IsSystemLoader"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user