From d228fd5fbf1faf663148b1759da63bfed06f6406 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 20 Jan 2014 18:14:37 +0200 Subject: [PATCH] inbound email --- .../Modules/Crm/Controllers/InboundEmail.php | 8 ++++ .../Modules/Crm/Entities/InboundEmail.php | 13 ++++++ .../layouts/InboundEmail/detail.json | 44 ++++++++++++++++++- .../metadata/entityDefs/InboundEmail.json | 10 +++-- 4 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 application/Espo/Modules/Crm/Controllers/InboundEmail.php create mode 100644 application/Espo/Modules/Crm/Entities/InboundEmail.php diff --git a/application/Espo/Modules/Crm/Controllers/InboundEmail.php b/application/Espo/Modules/Crm/Controllers/InboundEmail.php new file mode 100644 index 0000000000..05a51e1885 --- /dev/null +++ b/application/Espo/Modules/Crm/Controllers/InboundEmail.php @@ -0,0 +1,8 @@ +getUser()->isAdmin()) { + throw new Forbidden(); + } + } +} diff --git a/application/Espo/Modules/Crm/Resources/layouts/InboundEmail/detail.json b/application/Espo/Modules/Crm/Resources/layouts/InboundEmail/detail.json index 3b2b8b365d..97bc47a8b3 100644 --- a/application/Espo/Modules/Crm/Resources/layouts/InboundEmail/detail.json +++ b/application/Espo/Modules/Crm/Resources/layouts/InboundEmail/detail.json @@ -1 +1,43 @@ -[{"label":"Main","rows":[[{"name":"name"},{"name":"status"}]]},{"label":"IMAP","rows":[[{"name":"serverAddress"},{"name":"username"}],[{"name":"serverPort"},{"name":"password"}],[{"name":"monitoredFolders"},{"name":"removeMessagesFromServer"}],[{"name":"trashFolder"},false]]},{"label":"Actions","rows":[[{"name":"createCase"},false],[{"name":"caseDistribution"},{"name":"replyFromAddress"}],[{"name":"caseEmailTemplate"},{"name":"replyFromName"}]]}] \ No newline at end of file +[ + { + "label":"Main", + "rows":[ + [ + {"name":"name"}, + {"name":"status"} + ] + ] + }, + { + "label":"IMAP", + "rows":[ + [ + {"name":"serverAddress"},{"name":"username"} + ], + [ + {"name":"serverPort"},{"name":"password"}], + [{"name":"monitoredFolders"},{"name":"removeMessagesFromServer"}], + [{"name":"trashFolder"},false] + ] + }, + { + "label":"Actions", + "rows": [ + [ + {"name":"createCase"},{"name":"reply"} + ], + [ + {"name":"caseDistribution"}, + {"name":"replyEmailTemplate"} + ], + [ + false, + {"name":"replyFromAddress"} + ], + [ + false, + {"name":"replyFromName"} + ] + ] + } +] diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/InboundEmail.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/InboundEmail.json index fa0656d7bd..5d2e9da9c6 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/InboundEmail.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/InboundEmail.json @@ -45,12 +45,14 @@ "type": "enum", "options": ["Round-Robin", "Least-Busy"] }, - "caseEmailTemplate": { + "reply": { + "type": "bool" + }, + "replyEmailTemplate": { "type": "link" }, "replyFromAddress": { - "type": "varchar", - "required": true + "type": "varchar" }, "replyFromName": { "type": "varchar" @@ -86,7 +88,7 @@ "entity": "Team", "relationName": "EntityTeam" }, - "caseEmailTemplate": { + "replyEmailTemplate": { "type": "belongsTo", "entity": "EmailTemplate" }