Compare commits

...

1619 Commits

Author SHA1 Message Date
yuri 4d5f3bcbfe v 2016-12-08 11:41:55 +02:00
yuri 339e1dc897 defaultSidePanelFieldList 2016-12-07 17:32:43 +02:00
yuri c4e617f18e css 2016-12-07 15:48:35 +02:00
yuri 89bc329ea6 css 2016-12-07 13:21:47 +02:00
yuri eee49b215e portal user field show up 2016-12-07 11:32:22 +02:00
yuri d9a8b83268 remove isToSelf not used field 2016-12-07 10:56:32 +02:00
yuri def7abe3ba fix mention notification 2016-12-07 10:55:33 +02:00
yuri 75e64b3836 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-12-06 15:52:56 +02:00
yuri efb106c597 fix translated options 2016-12-06 15:50:48 +02:00
Taras Machyshyn 5e1087c6b4 Cache in language 2016-12-06 13:18:06 +02:00
yuri 5f8800defa fix css 2016-12-06 13:08:06 +02:00
yuri 445c0b3834 integration check 2016-12-06 12:24:07 +02:00
yuri 61c1e5ab6c fix mass action list 2016-12-06 11:37:40 +02:00
yuri 2502cad0c1 settings activityEntityList no emails 2016-12-05 14:20:50 +02:00
yuri 76032493b9 fix 2016-12-01 12:33:34 +02:00
yuri 0a3a6b3773 load users config params after login 2016-12-01 12:29:26 +02:00
yuri 014d47d017 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-12-01 11:45:00 +02:00
Taras Machyshyn 8bd7734ae3 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-12-01 11:22:48 +02:00
Taras Machyshyn 7aa2ba917f Added 'userItems' 2016-12-01 11:21:20 +02:00
yuri 96f0ce2381 fix template 2016-11-30 17:41:30 +02:00
yuri f1eb5b9862 email notification about email received 2016-11-30 15:54:23 +02:00
yuri 45cb5a6e38 Merge branch 'master' of https://github.com/espocrm/espocrm 2016-11-30 11:13:43 +02:00
ayman-alkom 4131ea54ae remove decleration duplicate (#319) 2016-11-30 11:12:56 +02:00
yuri 3806affe1b add industry 2016-11-30 10:58:17 +02:00
yuri 6ea3a03de3 readme change 2016-11-29 17:55:59 +02:00
yuri 5b25e8b7e6 fix address validate error 2016-11-29 17:04:27 +02:00
yuri 60c96ba5f7 import status colors 2016-11-29 15:29:09 +02:00
yuri 9732852891 job search fix 2016-11-29 15:27:28 +02:00
yuri 326b46a6e6 fix setting max records per page and int max length 2016-11-29 15:18:31 +02:00
yuri 29924ea3b1 css fix 2016-11-29 12:37:47 +02:00
yuri 434506699b fix list width 2016-11-29 12:00:13 +02:00
yuri eeaaaf7af1 deferred filter 2016-11-29 11:19:32 +02:00
yuri 3f5dab0680 fix task date end field 2016-11-29 11:03:51 +02:00
yuri dd69658f2a css change 2016-11-29 10:37:23 +02:00
yuri 3c2d998a30 added industries 2016-11-28 16:54:09 +02:00
yuri a0ead9d774 fix css 2016-11-25 16:24:39 +02:00
yuri 4460a105a8 dynamic logic ID field and mass email duplicate fix 2016-11-25 15:52:05 +02:00
yuri c6b369587d fix css 2016-11-25 12:46:13 +02:00
yuri 8c19ad5f7f fix warning 2016-11-25 12:22:48 +02:00
yuri 1824e0d0a6 version 2016-11-22 14:29:35 +02:00
yuri 404bb0c3cd layout panel colors 2 2016-11-22 12:27:03 +02:00
yuri 7fd6b16cf3 fix color panels 2016-11-22 10:39:28 +02:00
yuri 47abd1ab52 middle panel styles 2016-11-21 15:32:10 +02:00
yuri 5c8d728ac5 cleanup 2016-11-21 15:09:55 +02:00
yuri 2706bc461e fix error 2016-11-21 15:09:36 +02:00
yuri 91f52e4f42 panel color and sidePanels Small layout 2016-11-21 14:58:08 +02:00
yuri 5538dd45d3 preferences: reload page after theme or language changed 2016-11-21 11:00:06 +02:00
yuri 105205a9aa change in record base 2016-11-21 10:59:50 +02:00
yuri e3547717a0 change varchar filter type order 2016-11-21 10:35:09 +02:00
yuri 1714e0e9a0 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-21 10:30:50 +02:00
yuri afdd15ac44 text field: contains filter by default 2016-11-21 10:28:54 +02:00
yuri 09097dba4a cleanup 2016-11-21 10:28:23 +02:00
yuri 01a8fbd5b1 fix label 2016-11-21 10:27:21 +02:00
yuri f2d5eed7e3 company entity: check for duplicates 2016-11-21 10:26:27 +02:00
Taras Machyshyn cfae3cde1d Label correction 2016-11-18 18:18:01 +02:00
Taras Machyshyn 87a0c1b293 Installer bug fixes 2016-11-18 18:17:37 +02:00
Taras Machyshyn 486c8c8f37 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-18 17:33:45 +02:00
Taras Machyshyn ea99ca3d38 FileManager: bug fixes 2016-11-18 17:33:29 +02:00
yuri 2069a25f30 b2c mode in settings 2016-11-18 11:31:25 +02:00
yuri baf3493044 show up date time on mouse over shortened dates 2016-11-18 11:23:12 +02:00
yuri 543a12a475 note post textarea height 2016-11-18 11:11:00 +02:00
yuri a73f97744a fix email address add 2016-11-18 10:58:59 +02:00
yuri ae135ab678 fix mention text 2016-11-17 17:25:08 +02:00
yuri 96366548a3 fix avatar for deleted user and campaign tracker 1px 2016-11-17 10:49:00 +02:00
yuri 54cdd5180d industry 2016-11-17 10:25:56 +02:00
yuri 0a5ce2a4d4 industries 2016-11-16 17:09:50 +02:00
yuri a4e1ccc4bb fix label 2016-11-16 15:28:30 +02:00
Taras Machyshyn 55c632979e Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-16 15:25:01 +02:00
Taras Machyshyn b1208a449e Integration tests: added tests for upgrade, extension installation 2016-11-16 15:24:48 +02:00
Taras Machyshyn 9e2b329beb Integration tests improvements 2016-11-16 15:23:49 +02:00
Taras Machyshyn 10d329094c Added 'deleteBeforeCopy' for upgrade/extensions 2016-11-16 15:21:39 +02:00
yuri 38f44b3e5f cases layout change 2016-11-16 13:06:42 +02:00
yuri c99a1261d5 lead industry field 2016-11-16 11:54:17 +02:00
yuri 4e2e344892 industry field additions 2016-11-16 11:45:31 +02:00
yuri e0128bf54f contact-document relation 2016-11-16 11:17:46 +02:00
yuri a683e6bdf8 improve export 2016-11-15 12:15:01 +02:00
yuri bc64effb14 cleanup 2016-11-14 13:23:22 +02:00
yuri 6b0a280e2c fix layout swaping 2016-11-14 12:44:36 +02:00
yuri ddf25e02e3 email: has attachment filter 2016-11-14 10:39:18 +02:00
yuri 967d5a6387 addition to about page 2016-11-11 16:46:11 +02:00
yuri a5137b85af downgrade zendservicemanager 2016-11-11 16:34:38 +02:00
yuri 1ed79fedf0 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-10 14:44:40 +02:00
yuri 8a8cb08b99 order export 2016-11-10 14:41:39 +02:00
yuri b49aaa69cc fix audited 2016-11-10 14:14:46 +02:00
yuri 015357d551 industries 2016-11-10 13:19:34 +02:00
yuri 5419d76080 link field empty name and audited note change 2016-11-10 12:58:54 +02:00
yuri 21e1422994 filed manager hook change 2016-11-09 11:43:30 +02:00
yuri dafb076659 field manager inficate that field is readOnly 2016-11-09 10:56:19 +02:00
Taras Machyshyn 491f3d27ff Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-08 12:13:35 +02:00
Taras Machyshyn 3be58d5d09 Integration test improvements 2016-11-08 12:13:25 +02:00
yuri 8aeb23a985 version 2016-11-08 11:46:19 +02:00
yuri fa99040232 downgrade zend 2016-11-08 11:45:32 +02:00
yuri 2e928f2442 clenup 2016-11-08 11:33:51 +02:00
yuri 8ebb35c0d5 my activities dashlet entity list 2016-11-07 17:18:04 +02:00
yuri 7d17bee201 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-07 16:06:12 +02:00
yuri 5c345fb4d9 import: idle mode 2016-11-07 16:01:52 +02:00
yuri d2cd098ab0 fix record view readOnly 2016-11-07 15:09:15 +02:00
yuri f4a88df067 import: skip search for duplicates 2016-11-07 12:54:14 +02:00
yuri 8f4917eb24 delete duplicates before import 2016-11-07 11:46:09 +02:00
yuri a9310b108a fix warning 2016-11-07 10:45:52 +02:00
Taras Machyshyn 8c638dffd4 commented out sendRequest tests 2016-11-04 18:56:07 +02:00
yuri 0151273a75 cleanup 2016-11-04 17:39:00 +02:00
yuri b10dc8128c conrollerManager in container 2016-11-04 17:32:58 +02:00
yuri 476d36c9c5 comment sendRequest tests 2016-11-04 17:22:55 +02:00
yuri 64087defd0 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-04 17:21:18 +02:00
yuri 807b7bc349 tooltip 2016-11-04 16:57:18 +02:00
yuri 3018c345fa entity manager tooltips 2016-11-04 16:34:12 +02:00
yuri 8f35c59943 ckeanup 2016-11-04 15:34:49 +02:00
yuri 348332f7ca entity manager: fix loading after creation 2016-11-04 12:52:24 +02:00
yuri 9ebd992222 default status styles 2016-11-04 12:43:49 +02:00
yuri 9597ea0dbd stream messages improvements 2016-11-04 12:29:39 +02:00
yuri 23fb6c6e1f status field in entity manager 2016-11-04 11:36:28 +02:00
Taras Machyshyn ddb5033de8 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-11-03 18:00:15 +02:00
Taras Machyshyn 43a49e3c31 Integration tests: added 'createUser' method, portal support 2016-11-03 18:00:03 +02:00
yuri 5a06ee50d8 fix notice 2016-11-03 16:19:43 +02:00
yuri c02f65ef81 audited relations 2016-11-03 16:14:19 +02:00
yuri dbb9b20b7f fix case compose email 2016-11-03 11:37:39 +02:00
yuri 3bfd540f53 kb: move to top move to bottom 2016-11-03 11:11:03 +02:00
yuri a971f7357f fix dynamic logic 2016-11-02 16:31:04 +02:00
yuri 4918f8f985 task reminders 2016-11-02 16:30:56 +02:00
Taras Machyshyn 988388ed16 Added 'sendRequest' possibility 2016-11-02 15:52:38 +02:00
yuri f1de9deb80 event entity: reminders 2016-11-02 12:08:01 +02:00
yuri 2642a6ea6e fix notice 2016-11-02 11:52:42 +02:00
yuri 74b82c92d8 fix default layout detailSmall 2016-11-02 11:15:38 +02:00
yuri ded3d112b2 created and modified fields fixes 2016-11-02 11:11:51 +02:00
yuri c9e7f02b23 cut text columns 2016-11-01 15:07:18 +02:00
yuri c7fb864e04 email changes and test 2016-11-01 12:54:51 +02:00
yuri 16d300445c fix emails 2016-11-01 12:43:20 +02:00
yuri edc24621a6 fix php mime mail parser 2016-10-31 15:52:38 +02:00
yuri 17b48c0e4c fix wysywyg issue with base tags 2016-10-31 15:52:29 +02:00
yuri 771d58f425 phpmimemailparser 2016-10-31 11:30:14 +02:00
Felix Kaechele fd76459077 Fix de_DE translation (#269)
* Fix escape symbols in translations

Signed-off-by: Felix Kaechele <felix@kaechele.ca>

* Update German translation

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
2016-10-28 15:21:27 +03:00
yuri 1955dff68e manual merge 2016-10-28 14:50:48 +03:00
yuri 730b5fb8a9 fix calendar dashlet 2016-10-28 14:46:37 +03:00
yuri c1a115e2b0 reminders: skip if declined 2016-10-21 15:55:03 +03:00
yuri 7773e41ad4 convert lead changes 2016-10-21 14:48:58 +03:00
yuri 304bbb62ad fix naming 2016-10-21 12:05:36 +03:00
yuri 7b439ace04 cleanup 2016-10-21 11:32:10 +03:00
yuri d9ef87fb90 fix naming 2016-10-21 11:30:21 +03:00
yuri 2333b7a1ef user permission = all by default 2016-10-21 11:21:03 +03:00
yuri 1a00932c63 Merge branch 'hotfix/4.2.7' 2016-10-20 15:48:49 +03:00
yuri 1f09015c86 fix ids 2016-10-20 15:48:33 +03:00
yuri 5d79d8520f email: show group email account if email address matches 2016-10-20 15:04:26 +03:00
yuri dde044d8c5 imptove email/phone filters 2016-10-20 14:53:47 +03:00
yuri aeeb84b626 fix text and varchar 2016-10-20 14:47:18 +03:00
yuri ccb9022e16 fix email address search 2016-10-20 12:47:44 +03:00
yuri a9e783b5f1 email autocomplete: users first 2016-10-20 11:36:52 +03:00
yuri 46190df6ff fix notice 2016-10-20 11:30:19 +03:00
yuri 1eb258cab7 email filtering fix 2016-10-20 11:26:48 +03:00
yuri a3836b0091 email fix 2016-10-19 16:38:27 +03:00
yuri 7fbc9fbac8 email fix 2016-10-19 16:38:00 +03:00
yuri d0b5e2188b add marketing industry 2016-10-19 16:13:01 +03:00
yuri dfa2d6be89 email notifications related to parent 2016-10-19 16:04:43 +03:00
yuri 276941197f email importer refactoring 2016-10-19 15:46:07 +03:00
yuri 20569e4252 fix notices 2016-10-19 12:47:54 +03:00
yuri 3b7f99daa1 fix import 2016-10-19 12:14:21 +03:00
Taras Machyshyn 5ee30d9f3f Integration test improvements 2016-10-17 17:35:44 +03:00
yuri 3cde7fa5e3 company type fix 2016-10-11 15:11:36 +03:00
yuri aecb9bbdf4 lang 2016-10-11 15:11:25 +03:00
yuri 1a95e14ee8 entity manager improvements 2016-10-11 12:32:28 +03:00
yuri 83aa07b918 entity manager remove layouts 2016-10-11 11:30:53 +03:00
yuri 4f8eea59fe removeDir method 2016-10-11 11:28:45 +03:00
yuri 248280e086 fix entity manager 2016-10-11 11:28:38 +03:00
yuri 02b465ab8c company entity type 2016-10-11 11:22:48 +03:00
yuri c9d26dc1d8 base plus entity template 2016-10-10 17:32:03 +03:00
yuri 389b158134 look up email address in custom entities 2016-10-10 16:35:30 +03:00
yuri 312af9befb change person layouts 2016-10-10 16:19:34 +03:00
yuri b7f22bf687 Merge branch 'stable' 2016-10-10 15:33:27 +03:00
yuri f062ac255a version 2016-10-10 15:19:14 +03:00
yuri dd8082244c activities and tasks for person type 2016-10-10 12:37:21 +03:00
yuri 25ff7e17c1 activities dashlet change 2016-10-07 15:27:17 +03:00
yuri f4b3071a92 change readme 2016-10-07 14:50:34 +03:00
yuri 0c7b182215 Merge branch 'stable' 2016-10-07 14:36:32 +03:00
yuri 2223a1ecf4 getActivitiesQuery change 2016-10-07 12:54:10 +03:00
yuri 3a24784980 fix email filter 2016-10-07 12:46:46 +03:00
yuri f86564a580 tests 2016-10-07 12:46:27 +03:00
yuri 58897949eb fix email filter 2016-10-07 12:46:19 +03:00
yuri 2dee859b2a fix link field 2016-10-07 12:10:57 +03:00
yuri b1dbd173ad fix mail filters 2016-10-07 11:14:37 +03:00
yuri a9fc290627 mail filter test 2016-10-07 11:14:15 +03:00
yuri 12794968fc fix mail filters 2016-10-07 11:14:02 +03:00
yuri 1b4cbb91ee activities refactor additional 2016-10-06 17:26:51 +03:00
yuri 62f1362cf6 activities big refactor 2016-10-06 16:46:52 +03:00
yuri 49031d0b33 fix orm 2016-10-06 11:49:57 +03:00
yuri 22fea07b0a fix orm 2016-10-05 17:54:00 +03:00
yuri 81692371ec search by hasOne link 2016-10-05 15:35:53 +03:00
yuri a96314f0f0 Merge branch 'hotfix/4.2.6' 2016-10-05 12:37:45 +03:00
yuri a92c294255 fix layout manager reset to default 2016-10-05 12:37:38 +03:00
yuri 7c554a605e originalLead field 2016-10-05 12:07:08 +03:00
yuri 57eeec63c1 remove opportunities link from lead 2016-10-05 11:44:07 +03:00
yuri bd158008b2 update tcpdf 2016-10-04 12:58:24 +03:00
yuri c0ae8d5cdd Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-10-03 12:17:33 +03:00
yuri 78347920aa fix settings entityDefs 2016-10-03 12:17:26 +03:00
yuri c88e662a30 mass email: massEmailDisableMandatoryOptOutLink 2016-10-03 12:03:28 +03:00
yuri 5ae57ff5f6 fix campaign log percentage 2016-10-03 11:32:06 +03:00
Taras Machyshyn 7c74c85a66 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-29 17:48:00 +03:00
Taras Machyshyn 07fc2123e7 Added testData cache folder to gitignore 2016-09-29 17:47:46 +03:00
yuri afdb47b601 fix test email 2016-09-29 17:35:57 +03:00
yuri 5ea437afbb Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-29 17:30:49 +03:00
yuri c7041546c4 fix number test 2016-09-29 17:27:26 +03:00
yuri 1d2fd21a06 Merge branch 'hotfix/4.2.6' 2016-09-29 17:25:35 +03:00
yuri 27624ead8d number fix 2 2016-09-29 17:25:25 +03:00
Taras Machyshyn fefc003984 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-29 17:21:23 +03:00
Taras Machyshyn 70d3bf9fff Integration tests: rename method to 'createApplication' 2016-09-29 17:21:05 +03:00
yuri 4a64c4b648 Merge branch 'hotfix/4.2.6' 2016-09-29 17:21:01 +03:00
yuri 15c980e57f rename number to number util 2016-09-29 17:20:52 +03:00
yuri 9d8fc5b8ea sort by address field 2016-09-28 17:46:14 +03:00
yuri 8184221d2b Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-28 16:15:31 +03:00
yuri 5786983d8b add team to roles 2016-09-28 16:13:53 +03:00
yuri 1e1468ab68 acl changes and user role 2016-09-28 15:36:41 +03:00
yuri e3f0177759 role changes 2016-09-27 16:46:14 +03:00
yuri f1fc6160fe fix typo 2016-09-27 16:30:59 +03:00
yuri 38d4a39014 campaign log to target list 2016-09-27 15:13:25 +03:00
yuri 566d0c1aa0 fix orm query in array 2016-09-27 12:35:40 +03:00
yuri ce752b32fd naming fix 2016-09-27 11:15:59 +03:00
Taras Machyshyn a61553d08b Improved tests 2016-09-26 16:36:47 +03:00
yuri daacb026d8 panel actions changes 2016-09-26 16:16:40 +03:00
yuri 0ae637fba2 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-26 12:50:41 +03:00
yuri b81fd66b85 remove note with parent remval 2016-09-26 12:48:57 +03:00
yuri 071e94ac97 Merge branch 'hotfix/4.2.6' 2016-09-26 12:04:32 +03:00
yuri a98465f30e skip notification checking while upgrade 2016-09-26 12:04:10 +03:00
yuri e949a0bae6 dashboard: ability to rename tabs 2016-09-26 11:31:29 +03:00
yuri f7f9e2fda0 fix export 2016-09-23 11:37:21 +03:00
yuri 80a0571b0c export: skip attributes 2016-09-23 11:31:38 +03:00
yuri d91897a922 fix export 2016-09-22 17:31:42 +03:00
Taras Machyshyn 05180ece92 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-22 17:25:40 +03:00
Taras Machyshyn ee8e960ce4 Added integration tests 2016-09-22 17:25:26 +03:00
yuri 5b4a8666cd Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-22 17:17:21 +03:00
yuri 7240757a28 export field list 2016-09-22 17:15:27 +03:00
yuri 2a8baa2f34 export: use POST request 2016-09-22 14:54:35 +03:00
yuri 0c44e0d101 duplicate target list only not opted out 2016-09-22 12:45:23 +03:00
yuri 63ab5b77f3 relationship copy change 2016-09-22 12:32:53 +03:00
yuri 300198c9fa duplicate with links 2016-09-22 11:24:21 +03:00
yuri 340af18beb Merge branch 'hotfix/4.2.6' 2016-09-20 15:58:34 +03:00
yuri 8862fd279e fix language enum translation 2016-09-20 15:47:58 +03:00
Taras Machyshyn 83cff1bc42 Added favicon to installator 2016-09-20 11:54:51 +03:00
yuri a75534e32a Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-20 11:52:07 +03:00
Taras Machyshyn 462eb8792c Added test cache to gitignore 2016-09-20 11:51:57 +03:00
yuri 19f29c0401 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-20 11:49:41 +03:00
Taras Machyshyn 27657260fc Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-20 11:47:40 +03:00
yuri c17fb9ab1e Merge branch 'hotfix/4.2.6' 2016-09-16 17:46:31 +03:00
yuri bd6eafd291 version 2016-09-16 17:44:26 +03:00
yuri a63306603a fix email filter 2016-09-16 17:44:10 +03:00
yuri d3b1114b1e filters refactor 2016-09-16 16:38:10 +03:00
yuri 87340e29e8 base field: search data 2016-09-16 15:38:21 +03:00
yuri 4f1f8d9301 lead: created fields filter populate 2016-09-16 14:51:20 +03:00
yuri 664b294471 bool notNull 2016-09-16 11:23:44 +03:00
yuri 7774c12ab2 lang 2016-09-16 11:02:14 +03:00
yuri 6592dfc4da mass retrive from trash 2016-09-16 11:00:19 +03:00
yuri e823ecc178 user: create portal user fix 2016-09-15 12:59:06 +03:00
yuri 74d5a737db int/float: isEmpty, isNotEmpty filters 2016-09-15 12:07:26 +03:00
yuri bf9799af66 fix markdown link syntax 2016-09-14 17:09:10 +03:00
yuri fc9b67672f date: isEmpty filter 2016-09-14 16:14:06 +03:00
yuri 6e8342511f lang 2016-09-14 16:01:29 +03:00
yuri da2cebd765 fix orm 3 2016-09-14 14:03:30 +03:00
yuri ef19dc3330 fix orm 2 2016-09-14 13:53:11 +03:00
Taras Machyshyn 2f73a2d19b Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-09-14 13:25:07 +03:00
yuri fab257eb97 fix orm 2016-09-14 13:07:32 +03:00
yuri 850c3fd696 orm: get parent relation 2016-09-14 13:00:22 +03:00
yuri a619738652 fix dashboard javascript error 2016-09-13 16:53:06 +03:00
Taras Machyshyn 395c575f78 Moved tests into 'unit' folder 2016-09-13 16:20:42 +03:00
yuri ecf8256b14 fix textFilterFields list 2016-09-13 15:26:51 +03:00
yuri 2d6d6a2b19 link parent: search by parent type 2016-09-13 15:17:49 +03:00
yuri ee404fa400 parentType = null if empty 2016-09-13 15:05:38 +03:00
yuri 10fc546369 Merge branch 'hotfix/4.2.5' 2016-09-13 13:13:00 +03:00
yuri 0ea0c09007 fix acl 2016-09-13 13:12:39 +03:00
yuri 85b2dbac11 Merge branch 'hotfix/4.2.5' 2016-09-13 10:28:39 +03:00
yuri d69f994f4c fix insert template issue with signature 2016-09-13 10:28:24 +03:00
yuri 12a368054a dynamic logic options 2016-09-12 17:27:39 +03:00
yuri 7a2a9de174 Merge branch 'hotfix/4.2.5' of ssh://172.20.0.1/var/git/espo/backend into hotfix/4.2.5 2016-09-12 11:17:15 +03:00
yuri 0e14f2b987 fix dynamic logic save 2016-09-12 11:16:36 +03:00
yuri a50d97adf5 cleanup 2016-09-09 16:36:57 +03:00
yuri 62e9138cf1 minor core changes, metadata delete fix 2016-09-09 16:33:43 +03:00
yuri 657e7f0e37 email sender: define sender header 2016-09-08 15:05:58 +03:00
yuri 66d648c7d4 hack zend messageId bug 2016-09-08 12:42:53 +03:00
yuri 08dd77a6b6 metadata refactoring 2016-09-08 11:59:33 +03:00
yuri 037f0d4db1 dynamicLogic edit 3 2016-09-07 17:18:40 +03:00
yuri 19ff591105 fix date field default null 2016-09-07 15:17:00 +03:00
Taras Machyshyn 7d2655f757 Fixed warnings on PHP 7 2016-09-07 15:04:06 +03:00
yuri 7b1a1be366 dynamicLogic edit 2 2016-09-06 16:59:50 +03:00
yuri 1fc3ae72b5 dynamicLogic edit 1 2016-09-05 17:01:41 +03:00
yuri 991b864881 tabs fix 2016-09-05 11:35:04 +03:00
yuri f95fa96ae1 fix package.json 2016-09-05 11:13:23 +03:00
yuri e33cdf268a dynamicLogic change 2016-09-05 11:12:36 +03:00
yuri dcae13f4dc dynamicLogic string dev 2016-09-02 17:17:31 +03:00
yuri 96ac275970 client: fix naming 2016-09-02 16:17:09 +03:00
yuri e58a4c4bbf fix stream status update message 2016-09-02 12:43:26 +03:00
yuri c35985e658 Merge branch 'master' of https://github.com/espocrm/espocrm 2016-09-02 12:40:19 +03:00
yuri 4bc5a89ac2 fix stream status update message 2016-09-02 12:40:09 +03:00
yuri b7e14d60cc dynamicLogic string change 2016-09-02 12:31:45 +03:00
Mauricio Panuncio 7164a71d88 es_ES - Complete translations to today (#219)
* Translate es_ES: Globals. Admin.

* Tickets.

* Emails.

* New translations (missing).

* New translations (missing) II.

* Various.

* Opportunities: Improvement. Self-explanatory names.

* Some small fixes.

* Undo Tickets. Redo Casos.
2016-09-02 12:30:13 +03:00
yuri 6bedd86e08 dynamic logic development 2016-09-01 17:38:47 +03:00
yuri d39e99cbdd dynamic logic changes 2016-09-01 11:24:13 +03:00
yuri ab3134f44a dynamicLogic additional compare types 2016-08-31 17:23:00 +03:00
yuri 5aaca9921c dynamicLogic core 2 2016-08-31 16:28:25 +03:00
yuri 9223e43b7c htmlizer: format number fix 2016-08-31 14:55:12 +03:00
yuri 3766dd16e7 dynamicLogic core 1 2016-08-31 14:48:51 +03:00
yuri e53aff0031 fill primary account on selecting from account 2016-08-30 15:30:06 +03:00
yuri 4a40f1fba7 trim smtp credentials 2016-08-30 14:51:08 +03:00
yuri 8432e9dcc8 fix endWidth search 2016-08-30 13:05:41 +03:00
yuri 04e9bd9de3 fix endWidth search 2016-08-30 13:04:52 +03:00
yuri ed8ed591f7 user: search by position 2016-08-30 13:00:37 +03:00
yuri 34ff0218b9 email notifications about posts w/o parent 2016-08-29 17:12:42 +03:00
yuri 2f6c928077 fix notification parent not null 2016-08-29 16:40:24 +03:00
yuri eff0152f44 layout manager: Side Panels 2016-08-29 15:51:17 +03:00
yuri a3188ce694 preferences: doNotFillAssignedUserIfNotRequired 2016-08-29 12:36:21 +03:00
yuri 4bf81be56f fix naming 2016-08-29 12:22:37 +03:00
yuri 7c22960f42 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-26 17:44:40 +03:00
yuri 3d6f90ad93 fix field manager 2016-08-26 17:44:04 +03:00
yuri a02aebeed2 tooltips editable 2016-08-26 15:01:41 +03:00
Taras Machyshyn d06afd4def Deleted unnecessary file 2016-08-26 14:25:30 +03:00
Taras Machyshyn 88e148fca8 Possibility to redefine hooks 2016-08-26 14:23:41 +03:00
Taras Machyshyn 2d00ef314f Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-26 14:22:35 +03:00
yuri 0b6a29a035 field manager: reset to detault 2016-08-26 12:19:50 +03:00
yuri 5feb0eb7c7 fix FieldManager controller 2016-08-26 11:21:09 +03:00
yuri 48cb718fbe naming change 2016-08-26 10:51:09 +03:00
yuri 13ad6ec0d0 field manager: change tpl 2016-08-26 10:48:36 +03:00
yuri 9cfdb3a00b Merge branch 'master' of https://github.com/espocrm/espocrm 2016-08-25 17:24:16 +03:00
rodrigoscoelho b560254df2 Adding Home Page APP meta info for Android and IOS (#145)
This will allow the program to start as a separated program on Android and IOS. As a native program.
2016-08-25 17:23:44 +03:00
yuri 101ed19073 shortcut icon 2016-08-25 17:23:03 +03:00
yuri 65868fd26a fix unsubscribe 2016-08-25 17:07:30 +03:00
yuri d2e5b26765 update zend 2016-08-25 17:00:34 +03:00
yuri 2cac1ea608 unsubscribe changes 2016-08-25 16:54:30 +03:00
yuri 9d37e68e24 sync contact name on portal user update 2016-08-25 13:01:08 +03:00
yuri 290a1c5b31 php 5.4 drop 2 2016-08-25 13:00:50 +03:00
yuri ff924f666f drop php 5.4 support 2016-08-25 12:25:30 +03:00
yuri 8c5eb9c913 update zend 2016-08-25 12:19:06 +03:00
yuri 25e72fa6a5 Merge branch 'hotfix/4.2.5' 2016-08-25 11:58:24 +03:00
yuri 76602aede1 email import: fix for emails w/o subject header 2016-08-25 11:45:56 +03:00
Ayman Alkom 77411702a7 remove repeated key (#205) 2016-08-25 10:44:29 +03:00
Ayman Alkom 1aeee24d97 remove repeated key (#205) 2016-08-25 10:43:53 +03:00
yuri d8cd0d31db email template foreign fields and acl 2016-08-25 10:43:06 +03:00
yuri e72557bb59 Merge branch 'hotfix/4.2.5' 2016-08-24 11:09:41 +03:00
yuri 84e587fcaf mass email: automatically fill name 2016-08-24 10:49:53 +03:00
yuri f8e75dccdf version 2016-08-23 15:41:32 +03:00
yuri b6eca1db17 fix email entityDefs 2016-08-23 15:39:00 +03:00
yuri 6ff414ffcd fix users teams field 2016-08-23 15:26:00 +03:00
yuri b54c9a797d Merge branch 'hotfix/4.2.5' 2016-08-23 12:05:51 +03:00
yuri 7acbf3084d template: related attributes 2016-08-23 12:05:29 +03:00
yuri 87847446a8 css cleanup 2016-08-23 11:18:20 +03:00
yuri 59f250b386 allow template entity 2016-08-23 11:17:39 +03:00
yuri f93ce594d0 add mobile phone type to account 2016-08-23 11:13:58 +03:00
yuri c41f4e51e5 fix filter fields css 2016-08-23 11:01:17 +03:00
yuri 6efd355864 remove tabs 2016-08-23 10:11:37 +03:00
Ayman Alkom 7ee2ee9d35 small syntax fixes (#197)
* fix variable name

* init $number variable

* another fix
2016-08-23 10:09:15 +03:00
Ayman Alkom 737215c599 small syntax fixes (#197)
* fix variable name

* init $number variable

* another fix
2016-08-23 10:08:17 +03:00
Yuri Kuznetsov ced0c25a08 Merge pull request #194 from grzegorzgie/patch-3
Fix pl_PL
2016-08-22 19:51:22 +03:00
Yuri Kuznetsov 5e810d2aa3 Merge pull request #193 from grzegorzgie/patch-2
Fix pl_PL
2016-08-22 19:51:09 +03:00
Yuri Kuznetsov c9e27dd190 Merge pull request #192 from grzegorzgie/patch-2
Fix pl_PL
2016-08-22 19:50:12 +03:00
yuri 1f8a14aca0 fix warning 2016-08-22 15:50:21 +03:00
yuri f518ae59c0 activities small refactoring 2016-08-22 12:27:18 +03:00
Taras Machyshyn c5866f3d86 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-22 12:21:16 +03:00
yuri 4d4bde46f8 version 2016-08-22 11:02:41 +03:00
yuri cb89ad59af cleanup 2016-08-22 11:00:03 +03:00
yuri 092b5024fe it_IT language 2016-08-22 10:36:17 +03:00
grzegorzgie 8221f7182b Fix pl_PL 2016-08-21 13:21:43 +02:00
grzegorzgie ecee739b1a Fix pl_PL 2016-08-21 13:16:03 +02:00
grzegorzgie 702b47296c Fix pl_PL
Repair linguistic errors
2016-08-21 13:02:22 +02:00
yuri 517edf2ced undo comment 2016-08-19 17:52:09 +03:00
yuri 219c28313c fix mass select 2016-08-19 17:48:14 +03:00
Taras Machyshyn 656bba1d3f Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-19 17:34:57 +03:00
yuri 311d92202b fix assignment notification if user is removed 2016-08-19 14:43:44 +03:00
yuri 05cb2ee272 email: fix move to trash update counts 2016-08-18 17:07:16 +03:00
yuri f896a2d71a fix calendar range issue 2016-08-18 11:13:24 +03:00
yuri dd6704ace5 fix moving to trash 2016-08-18 10:40:16 +03:00
yuri 1dc4d44a65 es_ES lang fix 2016-08-17 17:52:22 +03:00
yuri bfb28ea178 Merge branch 'hotfix/4.2.3' of ssh://172.20.0.1/var/git/espo/backend into hotfix/4.2.3 2016-08-17 17:43:43 +03:00
yuri ec6f3a22f2 version 2016-08-17 17:30:34 +03:00
yuri 5a0c7c330c fix email imported error in php4 2016-08-17 17:28:17 +03:00
Taras Machyshyn f64df5af87 LDAP fixed admin login 2016-08-17 11:54:59 +03:00
Taras Machyshyn d4dc7a4051 LDAP fixes 2016-08-16 16:53:40 +03:00
Taras Machyshyn d676f85c8f LDAP fixes 2016-08-16 16:01:32 +03:00
Taras Machyshyn ab382f2387 LDAP: changed ldapUserObjectClass attribute. 2016-08-15 16:46:55 +03:00
yuri 206219c738 Merge branch 'hotfix/4.2.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/4.2.2 2016-08-15 15:51:40 +03:00
Taras Machyshyn 37d1c707cb LDAP: label corrections 2016-08-15 15:51:10 +03:00
Taras Machyshyn 93af1c9bfc LDAP improvements: added possibility to define user objectClass 2016-08-15 15:47:25 +03:00
yuri a021c4c8d5 open attachments in new window 2016-08-15 11:08:45 +03:00
yuri a125244cdf Merge branch 'hotfix/4.2.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/4.2.2 2016-08-15 10:50:10 +03:00
yuri 1cfd251c4c copy attachments for duplicate 2016-08-12 12:51:02 +03:00
Taras Machyshyn d2f4f312e5 Improvements 2016-08-11 16:21:35 +03:00
Taras Machyshyn c468b061d9 Bug fixes for installation 2016-08-11 16:21:03 +03:00
yuri 7bf945f0b6 v 2016-08-11 15:31:19 +03:00
yuri fecbb26cbf email acl fix 2016-08-11 15:30:47 +03:00
yuri a5ae33ab81 fix dateTime exception 2016-08-11 13:01:25 +03:00
yuri c6fa0e464e prevent stream request after remove record 2016-08-11 12:49:56 +03:00
yuri 38bae6238a portal: disable teams field 2016-08-11 12:28:14 +03:00
yuri 79de4c874f portal: follow created 2016-08-11 12:16:51 +03:00
yuri 814748ec61 fix map 2016-08-11 11:48:46 +03:00
yuri 1f0ad0cbec fix inbound email duplicate 2016-08-11 11:12:36 +03:00
yuri 7224f566d6 email import: bad date catch 2016-08-10 16:50:22 +03:00
yuri eefb01ec4f fix salesByMonth 2016-08-10 16:22:17 +03:00
yuri 24d46ed81d fix currency rates 2016-08-10 15:51:20 +03:00
yuri 37c749faf8 remove messageIdInternal index 2016-08-10 15:34:23 +03:00
yuri 4306a3131e fix inbound email ui 2016-08-10 15:32:59 +03:00
yuri 8fa95fcce3 email: fix whitespace subject 2016-08-09 11:12:30 +03:00
yuri b7c41ce640 email fix 2016-08-08 13:09:51 +03:00
yuri a21be94ed3 fix acl 2016-08-08 13:06:40 +03:00
yuri 9d59edcae2 v 2016-08-08 11:51:54 +03:00
yuri deaa26a355 es_ES lang fix 2016-08-08 10:29:49 +03:00
yuri 25d6fb6d82 theme fixes 2016-08-08 10:18:06 +03:00
yuri c1bcc44f04 fix error 2016-08-08 10:03:00 +03:00
yuri fdf8183385 fix massRemove acl check 2016-08-08 09:57:06 +03:00
yuri db40426f00 lang fix 2016-08-05 11:00:24 +03:00
yuri eb92e648a0 dashlet action url 2016-08-04 12:52:37 +03:00
yuri 5df26c324f fix scheduled job running 2016-08-04 12:30:26 +03:00
yuri c36a064fdc lang 2016-08-04 11:01:39 +03:00
yuri a28baa6a75 fix install footer date 2016-08-03 17:29:19 +03:00
yuri 27aed29ddf Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-03 17:26:43 +03:00
yuri 744fb176cc fix code to meet standards 2016-08-03 17:25:29 +03:00
Taras Machyshyn 5f8a0736e4 LDAP corrections 2016-08-03 16:25:33 +03:00
yuri 7fb179e769 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-03 16:09:55 +03:00
Taras Machyshyn 48239c53ca Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-03 12:41:50 +03:00
Taras Machyshyn 4e18afb80f LDAP: added 'Test Connection' button 2016-08-03 12:41:33 +03:00
yuri e9d3d7c807 fix date stringify 2016-08-03 12:23:58 +03:00
Taras Machyshyn 60923197e5 Ldap: added user teams, user default team 2016-08-03 10:56:08 +03:00
Taras Machyshyn a9f7c90323 Improvements 2016-08-03 10:37:48 +03:00
yuri cc723095c2 fix file manager 2016-08-02 15:04:53 +03:00
yuri 373b77f83f fix tests 2016-08-02 14:57:47 +03:00
Taras Machyshyn 68ab589f3e Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-02 13:09:26 +03:00
Taras Machyshyn 23ccbb226f Test fixes 2016-08-02 13:09:14 +03:00
yuri 48edf2a2b5 selectManager test 2016-08-02 13:03:56 +03:00
yuri 082c65ef05 fix unit test 2016-08-02 10:54:12 +03:00
yuri 6553d8ec6c Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-01 17:45:07 +03:00
yuri c54b6fcc7c test addition 2016-08-01 17:44:43 +03:00
yuri 655ee740e0 importer test 2016-08-01 17:40:47 +03:00
Taras Machyshyn b02f77b8f9 LDAP improvements 2016-08-01 16:29:26 +03:00
yuri 351c46af06 fix kb order 2016-08-01 15:36:24 +03:00
yuri d3db25d98a fix portal user password email 2016-08-01 15:24:01 +03:00
yuri ef1fe1bd1d Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-08-01 11:12:51 +03:00
Taras Machyshyn 6c2cd93826 Default config 2016-08-01 11:12:26 +03:00
yuri 4859f54f42 email import: get rid of file manager 2016-08-01 10:16:09 +03:00
Taras Machyshyn 749c2dc1e9 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-07-29 17:54:02 +03:00
Taras Machyshyn 3d13026084 LDAP fixes 2016-07-29 17:53:49 +03:00
yuri 6cf66aa88e account: recently created filter 2016-07-29 11:51:23 +03:00
yuri d10ef7038b meetings and assignmentPermissions 2016-07-29 11:41:37 +03:00
yuri cda612810d Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-07-28 11:31:42 +03:00
yuri a7aaac513d composer.lock 2016-07-28 11:30:57 +03:00
yuri 329dbdf408 it_IT lang 2016-07-28 11:28:47 +03:00
Taras Machyshyn 007f705904 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-07-27 16:53:24 +03:00
Taras Machyshyn 36cddbe0cf Fixed LDAP authorization 2016-07-27 16:53:11 +03:00
yuri e9409ccf72 remove tab 2016-07-27 16:44:46 +03:00
yuri b5a1ede962 Merge branch 'hotfix/4.1.7' 2016-07-27 11:26:28 +03:00
yuri 2dc6951ef9 v 2016-07-27 11:26:07 +03:00
yuri 66f686c013 fix kb order 2016-07-27 10:56:20 +03:00
yuri 937aab2b1c massAction successMessage 2016-07-26 15:31:49 +03:00
yuri 43bee97055 massAction fix 2016-07-26 12:22:36 +03:00
yuri a31f5ea87a email address book filter by portal permissions 2016-07-26 12:06:50 +03:00
yuri 0c4d5f3405 mass action defs 2016-07-26 11:31:07 +03:00
yuri 4e70ea0586 fix email 2016-07-25 17:13:34 +03:00
yuri 7736f6cd76 fix email update 2016-07-25 17:07:14 +03:00
yuri 2db6eaa344 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-07-25 14:48:08 +03:00
Taras Machyshyn 38b6cbda0e Merge pull request #159 from ecm4u/master
Support AD with LDAP Auth
2016-07-25 14:47:36 +03:00
Taras Machyshyn 9292f18b5b WARNING fixes 2016-07-25 12:35:52 +03:00
Taras Machyshyn 193cf2438a Cron manager bug fixes 2016-07-25 12:31:27 +03:00
yuri 155e0e3841 import: allow created at and created by 2016-07-25 12:01:03 +03:00
yuri 019c03ed2f email-to-task name 2016-07-25 11:24:23 +03:00
yuri 316e54df92 fix message id issue 2016-07-25 11:17:00 +03:00
yuri 40691ae899 fix entity manager text filter list 2016-07-25 11:16:53 +03:00
yuri ab8ba168ac move kb articles 2016-07-22 14:50:09 +03:00
yuri b066d91cf5 fix warning 2016-07-21 15:24:01 +03:00
yuri 2833581cde email folders side panel: remove edit link 2016-07-21 13:28:53 +03:00
yuri 279c8b3188 email folder and email filter email link 2016-07-21 13:24:20 +03:00
yuri eca6408415 prevent changing users email address and phone numbers for non admins 2016-07-21 13:07:13 +03:00
yuri 35cfb1a480 scheduled job mass actions 2016-07-21 10:58:09 +03:00
yuri 30f3d4ab5e stream notifications 2016-07-20 16:40:21 +03:00
yuri 7e5424e40a activities and history listen to save 2016-07-19 12:23:46 +03:00
Heiko Robert 82612326bf fixed wrong method syntax 2016-07-18 09:04:41 +02:00
Heiko Robert da2e5c835a removed unnecessary comments 2016-07-14 15:06:31 +02:00
Heiko Robert af8eb51c76 fix: setting ldap user fields array after constructor in createUser to support getConfig() 2016-07-14 14:51:26 +02:00
Heiko Robert 7253e257f1 moved hard coded ldap config to conf.php, added default config for Active Directory (cn --> samaccountname) 2016-07-13 17:50:43 +02:00
Heiko Robert 37e93edf25 Merge pull request #2 from espocrm/master
Update from original
2016-07-13 17:40:48 +02:00
yuri 36a56f050f multiple smtp 2016-07-08 16:25:27 +03:00
yuri 31c2d1360d fix warnings 2016-07-08 11:18:28 +03:00
yuri 4addc48339 fix import 2016-07-08 11:00:19 +03:00
yuri a7267bc920 fix import of noJoin relations 2016-07-08 10:49:06 +03:00
yuri 93e94f40c3 fix move to folder 2016-07-07 17:36:58 +03:00
yuri bd75790c29 change email list layout 2016-07-07 17:26:43 +03:00
yuri f1cffcae38 email actions 2016-07-07 17:08:05 +03:00
yuri 9111bce47a move to folder email 2016-07-07 16:30:08 +03:00
yuri 73ec161ac4 fix RDB findRelated if new 2016-07-07 15:55:53 +03:00
yuri 495a07639e email folders dev 2016-07-07 15:55:37 +03:00
yuri 044223e70e fix RDB findRelated if new 2016-07-07 15:27:53 +03:00
yuri 42c9250995 email folders url 2016-07-07 12:07:51 +03:00
yuri 8b4a1d96fd replyInHtml 2016-07-07 11:32:42 +03:00
yuri fff06d7e92 email folder dev 2016-07-06 17:14:08 +03:00
yuri 726adc550c email folders 2016-07-06 16:38:29 +03:00
yuri f5bde670f6 fix mapper fatal error 2016-07-06 10:26:22 +03:00
yuri 050873dd3a Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-07-06 10:12:50 +03:00
yuri d3886c1c94 dev 2016-07-06 10:12:40 +03:00
yuri 84f03cf3f9 email improvements 2 2016-07-05 12:41:57 +03:00
yuri f8953d56f4 fix link multiple with role 2016-07-05 10:23:01 +03:00
yuri ebbf14160b email folder changes 2016-07-04 17:29:46 +03:00
yuri 4df0a09de0 lang 2016-07-04 10:22:58 +03:00
yuri c485aa9a62 email folder entity 2016-07-01 17:18:32 +03:00
yuri ae474022b9 email filters skip 2016-07-01 15:23:41 +03:00
yuri f994cdf7c4 email filter changes 2016-06-30 16:56:04 +03:00
yuri 7ff514e5a7 email sentBy field 2016-06-30 11:48:53 +03:00
yuri 344403de54 fix email sent filter 2016-06-30 11:18:15 +03:00
yuri 836243d170 fix email sent filter 2016-06-30 11:17:31 +03:00
yuri 0dc9129d79 notification improvements 2 2016-06-29 16:54:23 +03:00
yuri 61c9d07ad8 notifications improvements 2016-06-29 16:50:01 +03:00
yuri a238295ba8 control followers after reassignment 2016-06-29 16:23:30 +03:00
yuri dbabd0dd45 Merge branch 'hotfix/4.1.6' 2016-06-29 16:03:10 +03:00
yuri f87ff8db8a fix 2016-06-29 15:38:21 +03:00
yuri 60d121f1e1 portal acl fixes 2016-06-29 15:17:52 +03:00
yuri 1497abff07 v 2016-06-29 13:12:09 +03:00
yuri 935ba7d4e4 fix 2016-06-29 13:10:36 +03:00
yuri fba79cde8f notification chanfes 2016-06-29 11:51:30 +03:00
yuri ce79d14a29 duplicate by default 2016-06-28 15:53:18 +03:00
yuri 14b2083226 google maps key 2016-06-28 15:28:50 +03:00
yuri 779a841817 kba ordering 2016-06-28 11:56:29 +03:00
yuri 3647523150 naming fix 2016-06-28 10:59:32 +03:00
yuri eb5b941fe6 email accounts massUpdate 2016-06-28 10:56:25 +03:00
yuri c542d99536 fix stream header long texts 2016-06-27 10:50:48 +03:00
yuri 918031a9c6 fix long texts in stream 2016-06-27 10:49:00 +03:00
yuri 163e0cac2a drag and drop additional 2016-06-24 17:08:49 +03:00
Taras Machyshyn 95096dd8fd Correct translations for installer 2016-06-24 15:28:28 +03:00
yuri 67bd98bf4b iso week numbers 2016-06-24 15:22:03 +03:00
yuri ac434c00d6 stream drag and drop 2016-06-24 15:04:54 +03:00
yuri 0fb8330ecf preferenses: hide notifications if not enabled 2016-06-24 12:36:55 +03:00
yuri 3f969cee5b Merge branch 'hotfix/4.1.6' 2016-06-24 12:15:59 +03:00
yuri ea5f6300f3 fix text overflow in list expanded 2016-06-24 12:15:51 +03:00
yuri 0d5e75db23 activities dashlet: show only todays and next day 2016-06-23 17:18:49 +03:00
yuri 7d667a1d1b notification about mention 2016-06-23 16:18:32 +03:00
yuri 610922c8e0 fix client notification 2016-06-23 15:20:17 +03:00
yuri 36e0882542 rename method 2016-06-23 11:44:13 +03:00
yuri b9979e87af email notifications: dont notify old emails 2016-06-23 11:21:38 +03:00
yuri bcd38dd853 fix email filters 2016-06-23 10:52:22 +03:00
yuri b018580c0b fix email reminder 2016-06-23 10:36:08 +03:00
yuri 38a7f42a1e remove ob_clean and flush 2016-06-22 16:26:52 +03:00
yuri 1387d856ba remove ob_clean from installer 2016-06-22 16:20:11 +03:00
yuri f2bbc872d6 lang fixes 2016-06-22 16:00:45 +03:00
yuri c74e7b416e lang 2016-06-22 15:03:33 +03:00
yuri f008688c14 orm: fix order by list 2016-06-22 12:14:15 +03:00
yuri dff0d5a992 fix email notification from person 2016-06-22 12:01:38 +03:00
yuri 6fe6f8960f fix stream note.js 2016-06-22 10:28:25 +03:00
yuri 0b0184098d fix gender in stream 2016-06-21 17:25:18 +03:00
yuri 647515d21a gender support 2016-06-21 17:21:45 +03:00
yuri 2ee944ef7b change assignment templates 2016-06-21 12:23:51 +03:00
yuri f4d2325b8b reminder and invitations change 2016-06-21 12:08:55 +03:00
yuri c0904125eb notification changes and stream message changes 2016-06-20 17:35:57 +03:00
yuri 7dad30ad0c fix notices 2016-06-20 11:24:15 +03:00
yuri d6acb6dfdc fix notice 2016-06-20 11:06:26 +03:00
yuri b6da94fe2e fix modal backdrop close 2016-06-17 11:54:09 +03:00
yuri dc5e292a02 fix modal backdrop close 2016-06-17 11:53:30 +03:00
yuri 4bf938107d portal id 2016-06-16 16:59:10 +03:00
yuri ec7d49cdbc fix validate message if empty element 2016-06-15 17:20:19 +03:00
yuri 3c73062b91 email: is replied 2016-06-15 16:38:01 +03:00
yuri 5122f112d1 task dashlet: dont show if date start is future 2016-06-15 12:43:47 +03:00
yuri 5e20fa6717 orm: skip text fields param 2016-06-15 11:41:52 +03:00
yuri d4599d9377 fix mapper test 2016-06-15 11:40:26 +03:00
yuri adb9ce4d7e email: rename name label 2016-06-15 11:17:16 +03:00
yuri e777413a7b enum order 2016-06-15 11:15:02 +03:00
yuri 2cb0ac6221 email: forward info 2016-06-14 17:30:24 +03:00
yuri 8f7fafb990 email import: fetch parent from replied 2016-06-14 16:37:54 +03:00
yuri 158c911787 fix label 2016-06-14 13:01:58 +03:00
yuri aa67575ecb internal post dev 2016-06-14 12:56:18 +03:00
yuri 81cf82c99f fix stream posting 2016-06-14 11:56:42 +03:00
yuri e638bf2eec Merge branch 'hotfix/4.1.6' 2016-06-14 11:44:55 +03:00
yuri 6c9d1dbb3d fix notification sounds 2016-06-14 11:43:31 +03:00
yuri fbb034ef92 intenal post dev 2016-06-14 11:24:42 +03:00
yuri 335601d6b8 fix multienum validate message 2016-06-13 15:57:37 +03:00
yuri f6ad51ca74 fix calendar colors 2016-06-13 15:30:16 +03:00
yuri e119f8b008 fix entity manager tabList 2016-06-13 15:23:29 +03:00
yuri 5af0eeff3b entity manager: event type 2016-06-13 13:12:41 +03:00
yuri f685feb312 Merge branch 'hotfix/4.1.6' 2016-06-13 10:56:38 +03:00
yuri c78254a8fa no dashboard layout for portal useres 2016-06-13 10:52:20 +03:00
yuri 9c3758b92c Merge branch 'stable' 2016-06-10 16:10:48 +03:00
yuri 4ca2a7fa1a fix notice 2016-06-10 16:03:10 +03:00
yuri d6814b1601 Merge branch 'hotfix/4.1.5' 2016-06-10 15:55:57 +03:00
yuri 55e5a21dcd Merge branch 'hotfix/4.1.5' of ssh://172.20.0.1/var/git/espo/backend into hotfix/4.1.5 2016-06-10 15:54:14 +03:00
Taras Machyshyn 792f422f76 Bug fixing 2016-06-10 15:53:37 +03:00
yuri 8cac546087 merge with hotfix/4.1.5 2016-06-10 15:05:41 +03:00
yuri 0cfe91d960 loadAdditionalFieldsForPdf 2016-06-10 14:44:09 +03:00
yuri 4dea1762e8 stream textarea fix 2016-06-10 13:08:22 +03:00
Taras Machyshyn b1a9b8d8b1 Code improvement 2016-06-10 10:57:56 +03:00
yuri 6787acce61 fix next number 2016-06-10 10:50:40 +03:00
yuri eb0adf7c28 fix afterMassRemove 2016-06-09 14:03:23 +03:00
yuri 783cccaa1b Number field type 2016-06-09 12:47:17 +03:00
yuri 36a0a22996 naming fix 2016-06-09 10:49:56 +03:00
yuri a3f3357b2e Merge branch 'hotfix/4.1.5' 2016-06-08 17:58:29 +03:00
yuri cbbfa44174 fix field manager ui 2016-06-08 17:58:18 +03:00
yuri 812d2ec9bc fix field manager hook 2016-06-08 17:52:20 +03:00
yuri b51ba96bb7 number field type prepare 2016-06-08 17:38:12 +03:00
yuri 4c60cf79f6 rdb: rename methods 2016-06-08 15:56:04 +03:00
yuri 8451949805 database charset param 2016-06-08 11:47:52 +03:00
yuri af5750cdf6 color change 2016-06-07 19:00:57 +03:00
yuri 1a4dfd6f67 version 2016-06-07 12:29:29 +03:00
yuri 6aa800d453 fix fetchOnModelAfterRelate 2016-06-07 12:26:20 +03:00
yuri 82aa3b9508 fix massRelate 2016-06-07 12:15:04 +03:00
yuri 6910a113da email filter: filters 2016-06-06 16:49:07 +03:00
yuri bd20aaa577 fix htmlizer 2016-06-06 12:55:04 +03:00
yuri 0aef3c0b04 htmlizer and password 2016-06-06 12:53:10 +03:00
yuri 2f97010b54 htmlizer improvements 2016-06-06 12:31:26 +03:00
yuri 5bcdad2996 wysiwyg htmlToPlain fix 2016-06-06 11:59:49 +03:00
yuri 1e8a8d94c2 fix timeline timezone 2016-06-06 11:51:21 +03:00
yuri 9aeefd7685 contact: fix accounts field 2016-06-03 11:29:46 +03:00
yuri f72385471c naming fix 2016-06-03 11:27:41 +03:00
yuri f7a542560a check duplicates: all email 2016-06-03 11:19:03 +03:00
yuri 400f43447d v 2016-06-02 17:22:15 +03:00
yuri 866593a831 Storage Message: define ErrorHandler 2016-06-02 17:15:30 +03:00
yuri c90cdc62fb global search changes 2016-06-02 12:39:06 +03:00
yuri d5c93f21b5 audited for miltiEnum and arrays 2016-06-02 12:26:47 +03:00
yuri b58d78a29e preferences: dashboardLayout 2016-05-31 12:05:37 +03:00
yuri f5b41eb78b field manager: translatedOptions param 2016-05-31 11:01:17 +03:00
yuri c2a7d90944 fix view-helper options 2016-05-27 13:17:51 +03:00
yuri b2a4ec238c fix preferences fields 2016-05-27 12:11:17 +03:00
yuri df69584c7d v 2016-05-27 11:46:31 +03:00
yuri 574da55be7 Merge branch 'hotfix/4.1.3' of ssh://172.20.0.1/var/git/espo/backend into hotfix/4.1.3 2016-05-26 17:15:40 +03:00
Taras Machyshyn 52b808b902 Removed unnecessary debugging messages 2016-05-26 16:53:52 +03:00
Taras Machyshyn 714c7b0a33 Fixed an issue for MySQL 5.7 2016-05-26 16:41:50 +03:00
yuri 3d774e3afa fix wysywyg modals 2016-05-26 16:26:16 +03:00
yuri c91db1699b upgrade bootstrap 2016-05-26 15:39:04 +03:00
yuri 2b5695d8dc fix wysywig field detail view height 2016-05-26 12:23:52 +03:00
yuri b562fc33bd dont allow email to modify 2016-05-26 11:43:52 +03:00
yuri 425414b8f3 fix add email address 2016-05-26 11:24:21 +03:00
yuri 3b363d5ee3 cleanup 2016-05-26 11:10:34 +03:00
yuri 4fc3b9a99e fix kb massUpdate layout 2016-05-25 15:23:12 +03:00
yuri ab2b9bafeb fix meeting/call select manager 2016-05-24 15:53:09 +03:00
yuri e99fc6302f reminders for all users 2016-05-24 12:35:46 +03:00
yuri 82996a807f calendar: getCalendarSelectParams method 2016-05-24 11:38:14 +03:00
yuri 86b31b1f26 clear role cach if isAdmin changed 2016-05-23 17:25:58 +03:00
yuri 19c9b38f82 applicationName in settings 2016-05-23 12:24:18 +03:00
yuri b1d0d1cd27 activities: status not required 2016-05-23 11:47:04 +03:00
yuri c916011530 add id_ID language 2016-05-23 11:36:58 +03:00
yuri 5db6327272 de_DE 2016-05-23 11:10:03 +03:00
yuri 3c5fe4c778 v 2016-05-20 15:41:08 +03:00
yuri f6f3f05aa5 fix meeting acl 2016-05-20 15:39:51 +03:00
yuri 10f34564d0 load teams for user 2016-05-20 15:38:40 +03:00
yuri 216ec2329d fix record isPermittedTeams 2016-05-20 15:30:49 +03:00
yuri c3cb4619cf disable formatting for autoincrement 2016-05-20 11:21:06 +03:00
yuri fcf2929b5b fix record/base 2016-05-19 17:56:19 +03:00
yuri 15c10ca553 fix notice 2016-05-18 16:38:40 +03:00
yuri 9bb417ab38 v 2016-05-18 16:32:25 +03:00
yuri 5b110ee7b2 fix warning 2016-05-18 16:30:46 +03:00
yuri f3951966f3 fix popup 2016-05-18 16:25:20 +03:00
yuri f580f0ba60 namimng 2016-05-18 12:34:53 +03:00
yuri a9e4ad3833 sidePanels refactoring 2016-05-18 11:22:18 +03:00
yuri 3e6c88eb27 lead-document relationship 2016-05-17 17:16:33 +03:00
yuri 7c4ef3f00f query: use distinct instead of group by id 2016-05-17 15:51:08 +03:00
yuri 762d7f71c6 fix date time 2016-05-17 11:18:30 +03:00
yuri 50cc658c20 fix campaign image 2016-05-16 16:09:18 +03:00
yuri 21a59cb198 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-05-16 12:56:36 +03:00
Taras Machyshyn 38ba3461be Fixed SemVer for PHP 7 2016-05-16 12:55:51 +03:00
yuri f70ee27809 remove notes from user layout 2016-05-16 10:59:08 +03:00
yuri 674c1588d9 iOS 9 support 2016-05-13 12:40:26 +03:00
yuri e9eb5402cc fix selector 2016-05-11 17:35:55 +03:00
yuri 7f746a72bb ui performance oprtimization 2016-05-11 16:22:02 +03:00
yuri bde6a810c4 cleanup 2016-05-11 11:42:12 +03:00
yuri ff3e7d1c5b fit add dashlet modal height 2016-05-11 11:41:27 +03:00
yuri 7ecb63189a fix full form from quick edit 2016-05-11 10:56:33 +03:00
yuri eb1e16d6bd phone/email search more optimized way 2016-05-10 16:45:43 +03:00
yuri f17b5d7244 small fix in RDB 2016-05-10 13:04:04 +03:00
yuri a5b44e9fdf entity manager: text filter fields 2016-05-10 12:34:29 +03:00
yuri 734219dbd4 customUrl portal layout 2016-05-09 11:26:02 +03:00
yuri 45c351ab39 user entity small fixes 2016-05-09 11:22:06 +03:00
yuri 74aa55a8aa store sent emails 2016-05-09 11:19:14 +03:00
yuri 64b3a88ba0 fix shared calendar 2016-05-09 11:06:12 +03:00
yuri 08ff00f602 fix user select manager 2016-05-09 11:05:52 +03:00
yuri 0d9853311a inbox dashlet layout change 2016-05-06 12:54:24 +03:00
yuri b1d17f9e84 fix shared calendar store 2016-05-06 12:02:00 +03:00
yuri 3a6041a8df shared calendar improvements 2016-05-06 11:57:37 +03:00
yuri 023171f19e merge 2016-05-05 15:17:29 +03:00
yuri 546fed83c8 version 4.0.6 2016-05-05 15:15:54 +03:00
yuri 6b37ce80fd fix kb 2016-05-05 15:14:32 +03:00
yuri a98c8b3bcd naming 2016-05-05 13:08:28 +03:00
yuri 7bd3dd26cf notificationSoundsDisabled 2016-05-05 13:03:15 +03:00
yuri fe7684b46c naming 2016-05-05 12:56:16 +03:00
yuri ea5dcfe630 entity manager trimming 2016-05-05 12:12:40 +03:00
yuri ad5f29338b field manager: trim 2016-05-05 11:59:35 +03:00
yuri 89d2b26613 cleanup 2016-05-05 11:10:56 +03:00
yuri 7206dc38bc meeting/call acl fix: allow read own record if no assigned 2016-05-05 11:08:26 +03:00
yuri 4b9ff21743 version 4.2.0 2016-05-04 17:05:09 +03:00
yuri fbe7910349 merge 2016-05-04 16:32:19 +03:00
yuri 7b098095cb v 4.0.5 2016-05-04 16:18:36 +03:00
yuri 7966be90e7 fix acl 2016-05-04 16:18:12 +03:00
yuri b64db89307 fix acl 2016-05-04 16:17:25 +03:00
yuri cb9b7c3e72 code fix suite 2016-05-04 16:16:57 +03:00
yuri a268962c15 dont save email reminder 2016-05-04 15:16:29 +03:00
yuri 36c1b56916 scheduled job mass update 2016-05-04 14:51:49 +03:00
yuri 39a2e30e3f version 2016-05-04 11:29:12 +03:00
yuri b91d237f0b portal users activities 2016-05-04 11:25:12 +03:00
yuri f7a0a0daa0 config textFilterUseContainsForVarchar 2016-05-04 10:52:25 +03:00
yuri 4f270d003b linkParent field entityList filtered by disabled 2016-05-04 10:23:34 +03:00
yuri e3ebc8c2e2 portal customUrl and fix 2016-05-04 09:57:42 +03:00
yuri c31c5618dd fix portal user sendPassword 2016-05-04 09:47:10 +03:00
yuri 341d5f8d7c fix InboundEmail namespace 2016-05-04 09:45:24 +03:00
yuri 04d2bd69c1 fix jobs 2016-04-29 16:40:05 +03:00
yuri 47efa792ee kb/documents buttons 2016-04-29 12:15:04 +03:00
yuri a71c6789bc fix dateTimeOptional required 2016-04-29 11:49:50 +03:00
yuri 3a41aad935 fix job.php 2016-04-28 17:14:42 +03:00
yuri fad56c1c0a email craetedAt filter 2016-04-28 17:09:08 +03:00
yuri d6ad7f16c1 cron populate logic 2016-04-28 16:16:31 +03:00
yuri ae89a9216d fix email importer 2016-04-28 15:18:14 +03:00
yuri 6927c82a0f Application setupSystemUser 2016-04-28 11:00:12 +03:00
yuri e06b553653 fix avatar 2016-04-27 16:24:11 +03:00
yuri e9a63c0c36 merge all links 2016-04-27 12:26:06 +03:00
yuri 582c23ecf4 metadata get by array 2016-04-27 12:24:42 +03:00
yuri d86ff1e905 user mass update layout change 2016-04-27 11:43:33 +03:00
yuri 773bca8448 user mass update fix 2016-04-27 11:41:45 +03:00
yuri a6258cd334 afterMassUpdate afterMassRemove methods 2016-04-27 11:41:35 +03:00
yuri 1cdf88ef9b cleanup 2016-04-27 11:41:14 +03:00
yuri 58ffbad422 fix jobs 2016-04-27 11:40:57 +03:00
yuri aafcd5767e emails dashlet 2016-04-26 11:59:22 +03:00
yuri 2bfac8352b fix wysiwyg 2016-04-26 11:39:07 +03:00
yuri 954eff0c94 acl change 2016-04-26 11:36:42 +03:00
yuri 9692076ba8 int format 2016-04-26 11:08:30 +03:00
yuri 5ae64989eb system avatar color 2016-04-25 17:45:57 +03:00
yuri 3fd34fc48d show more after remove issue fix 2016-04-25 15:28:39 +03:00
yuri 94c207677f int count 2016-04-25 15:23:04 +03:00
yuri 39188f0b3a fix phone number import 2016-04-25 11:07:44 +03:00
yuri 7665ec2730 naming 2016-04-22 11:20:12 +03:00
yuri bc57ac3065 fix task dashlet 2016-04-22 11:20:07 +03:00
yuri 6cf62736bb wysiwyg fix base tag 2016-04-20 17:59:46 +03:00
yuri d5e78c1a7a field manager: foreign fielld 2016-04-20 15:37:18 +03:00
yuri 4a0aa1bca0 global search fix 2016-04-20 10:32:05 +03:00
yuri 2d06e8a801 calendar custom entity support 2016-04-19 16:32:40 +03:00
yuri 25b1479c23 fix layouts 2016-04-19 16:09:10 +03:00
yuri 09ab17f18b naming fix 2016-04-19 16:03:38 +03:00
yuri be438a2f18 pl_PL fix 2016-04-19 11:51:48 +03:00
yuri c9f91bb8da merge fix 2016-04-19 11:51:06 +03:00
yuri cd01178151 fix activities service 2016-04-19 11:48:09 +03:00
yuri 3e8ed72246 mass update keep emails and phones 2016-04-19 11:32:56 +03:00
yuri c500520130 remove dashlet confirmation 2016-04-18 16:45:48 +03:00
yuri 0fc2eb6817 fix lang 2016-04-18 16:42:43 +03:00
yuri 4db2f49233 fix json 2016-04-15 16:30:45 +03:00
yuri 8215c44be9 fix address format 2016-04-15 15:35:10 +03:00
yuri dbee926a94 address formats 2016-04-15 15:28:54 +03:00
yuri d85e13cae0 timeline today by default 2016-04-14 16:42:31 +03:00
yuri 370eee8d9d fix timeline lang 2016-04-14 16:34:26 +03:00
yuri 98f317cb1c calendar scope list for create 2016-04-14 12:43:17 +03:00
yuri 3ec9613b0e timeline and calendar less 2016-04-14 12:02:37 +03:00
yuri 8e27d50d5c about.tpl 2016-04-13 17:17:53 +03:00
yuri fc50991317 fix deprecated ajax usage 2016-04-13 16:37:19 +03:00
yuri 52382bb958 fix deprecated moment usage 2016-04-13 16:22:41 +03:00
yuri 66fdd40659 timeline dashlet fix 2016-04-13 15:50:20 +03:00
yuri f0f402a8b3 calendar timeline dashlet 2016-04-13 12:40:45 +03:00
yuri 591cbf4484 opp dashlet sorting 2016-04-13 10:00:10 +03:00
yuri 44d813bf5b fix person name template 2016-04-13 09:36:02 +03:00
yuri fceff4ad7f calendar changes 2016-04-12 17:19:15 +03:00
yuri f47b41928e fix view field 2016-04-12 17:14:58 +03:00
yuri c559a97953 timeline dev 2016-04-11 17:16:14 +03:00
yuri d1d64c84b0 fix typo 2016-04-11 12:46:16 +03:00
yuri cb1f32ec3a Merge branch 'hotfix/4.0.5' 2016-04-11 11:36:13 +03:00
yuri e76116810f fix calendar weekStart 2016-04-11 11:36:01 +03:00
yuri 974b69eed0 timeline dev 2016-04-08 17:20:38 +03:00
yuri bb379c7a0e fix invitation 2016-04-08 10:30:00 +03:00
yuri 5664ede648 fix invitation 2016-04-08 10:28:31 +03:00
yuri 881a3db412 dev timeline 2016-04-08 10:26:53 +03:00
yuri b74f1cc5d6 Merge branch 'hotfix/4.0.5' 2016-04-07 12:51:38 +03:00
yuri 265ec60614 remove empty side panel box 2016-04-07 12:51:22 +03:00
yuri d79d716612 download file name escape 2016-04-07 12:51:09 +03:00
yuri aa61f322bc fix email attachment filename parsing 2016-04-07 12:50:42 +03:00
yuri c8d2f08c13 fix naming 2016-04-07 10:41:36 +03:00
yuri 920b6e2eba dev 2016-04-06 16:09:11 +03:00
yuri 6e7908de52 timeline dev 1 2016-04-05 16:22:13 +03:00
yuri 10de6aedbd Merge branch 'hotfix/4.0.5' 2016-04-05 11:23:46 +03:00
yuri ce0efed7b8 fix calendar 2016-04-05 11:23:32 +03:00
yuri 204b9aa49d dev 2016-04-05 10:55:02 +03:00
yuri ae1db7990e Merge branch 'hotfix/4.0.5' 2016-04-04 16:37:11 +03:00
yuri 18f13acfa9 assigner user field: dont display avatar in list view 2016-04-04 16:10:06 +03:00
yuri a15b247952 fix lang 2016-04-01 16:34:00 +03:00
yuri 2e457e1f6f fix entity manager link conflicts 2016-04-01 16:30:53 +03:00
yuri e0375a52f9 fix relationship manager ui 2016-04-01 16:30:38 +03:00
yuri 351a70015a fix email address and phone number duplicates 2016-04-01 12:27:52 +03:00
yuri 8faa001a56 use teams view 2016-04-01 11:34:48 +03:00
yuri 182fc8b65e Merge branch 'hotfix/4.0.5' 2016-04-01 11:16:34 +03:00
yuri 49b581dafd assigned user view 2016-04-01 11:16:25 +03:00
yuri 1319c54365 fix assignment permission no 2016-04-01 11:12:33 +03:00
yuri c9db2687f5 fetch only header for emails w/ exceeding size 2016-03-31 12:38:37 +03:00
yuri 21252a6eb7 Merge branch 'hotfix/4.0.5' 2016-03-31 11:27:21 +03:00
yuri 1054050542 fix list modal 2 2016-03-31 11:27:12 +03:00
yuri 90e2d7ef0b cleanup 2016-03-31 11:24:56 +03:00
yuri de9c1e7a20 merge 2016-03-31 11:24:30 +03:00
yuri 08b5f09c55 fix list modal 2016-03-31 11:21:46 +03:00
yuri 23a0ed86e0 cleanup 2016-03-31 10:34:50 +03:00
yuri 0ca7da454b fix notice 2016-03-31 10:33:16 +03:00
yuri ffc22673f7 Merge branch 'hotfix/4.0.5' 2016-03-30 14:59:08 +03:00
yuri 1faa75c303 add email to quick create list 2016-03-30 12:30:01 +03:00
yuri 8136eed152 orm improvements 2016-03-30 12:29:07 +03:00
yuri 13dc6f0d76 email quick create 2016-03-30 11:19:46 +03:00
yuri dd55141422 Merge branch 'hotfix/4.0.5' 2016-03-30 10:36:14 +03:00
yuri d3bcadce13 fix contact filter is empty account 2016-03-30 10:36:06 +03:00
yuri 99533a5416 dont show notification about note if no access to entity 2016-03-29 16:20:05 +03:00
yuri 4a288434bc lead - case 2016-03-29 16:00:40 +03:00
yuri 9218bce3e4 kb email addition 2016-03-29 15:36:50 +03:00
yuri b566413b78 Merge branch 'hotfix/4.0.5' 2016-03-29 15:30:46 +03:00
yuri f624b441e4 KB: send email 2016-03-29 15:30:01 +03:00
yuri ebe7834092 error message if restore password with empty smtp 2016-03-28 15:34:34 +03:00
yuri 9c8f54fd24 fix send test email button 2016-03-28 15:34:01 +03:00
yuri 4a20d74258 Merge branch 'hotfix/4.0.4' 2016-03-25 16:02:53 +02:00
yuri f47915d077 fix list 2016-03-25 15:20:19 +02:00
yuri eb2305712a user smtp info 2016-03-25 12:30:10 +02:00
yuri f75414a5d2 fix intaller 2016-03-25 12:30:02 +02:00
yuri a88cb05897 fix installer 2016-03-25 11:55:30 +02:00
yuri 2435ae67c9 v 2016-03-25 11:51:02 +02:00
yuri 4c49be5203 installer fix 2016-03-25 11:50:58 +02:00
yuri 2d8a1dad80 fix installer 2016-03-25 05:30:16 -04:00
yuri a15b009133 user filters 2016-03-25 05:11:11 -04:00
yuri 25d2033b7c user select default filter active 2016-03-25 05:08:08 -04:00
yuri 9abeb6aec8 Merge branch 'hotfix/4.0.4' 2016-03-25 05:01:28 -04:00
yuri c509eeae49 fix notices 2016-03-25 05:01:05 -04:00
yuri 2a4b0dbcb4 remove task dublicate index 2016-03-25 04:56:47 -04:00
yuri e45a863e8d fix invitation 2016-03-24 11:27:53 +02:00
yuri 2ca40a6b4e Merge branch 'hotfix/4.0.4' 2016-03-23 17:01:30 +02:00
yuri c4819e29e0 fix inv email date time 2016-03-23 17:01:00 +02:00
yuri 176fae228c Merge branch 'hotfix/4.0.4' 2016-03-23 16:57:33 +02:00
yuri c0242a18e3 fix invitation email and email template 2016-03-23 16:57:18 +02:00
yuri 7a953c9a47 use word-break for long field 2016-03-23 16:09:07 +02:00
yuri 27cc0d812e url field title 2016-03-23 16:06:45 +02:00
Yuri Kuznetsov 2a1df998eb Merge pull request #123 from ecm4u/master
allow "Ends With" and "Like (%)" on varchar field
2016-03-23 14:59:56 +02:00
yuri 78573b85b5 Merge branch 'hotfix/4.0.4' 2016-03-23 14:59:09 +02:00
yuri 7a433c1890 fix list remove 2016-03-23 13:03:44 +02:00
yuri de26d87400 list title 2016-03-23 12:02:03 +02:00
yuri 07da707503 Record controller fix sort 2016-03-23 11:40:24 +02:00
yuri b473b19b45 fix opportunity dashlet acl 2016-03-22 16:19:44 +02:00
yuri 6c291999f4 keep meeting duration if rescheduled 2016-03-22 13:07:14 +02:00
yuri 2e92d0d3a5 case email compose fix 2016-03-22 12:03:21 +02:00
yuri 2ac5695e45 case email compose fix 2016-03-22 12:02:44 +02:00
yuri 0af4ab54f9 calendar quick view 2016-03-22 11:50:46 +02:00
yuri 8da92966de Merge branch 'hotfix/4.0.4' 2016-03-22 10:41:47 +02:00
yuri bc3dfc7ff9 fix warnings 2016-03-18 16:05:41 +02:00
yuri e81d5707f2 fix warnings 2016-03-18 15:26:04 +02:00
yuri 4cb42f8762 Merge branch 'hotfix/4.0.4' 2016-03-18 14:47:51 +02:00
yuri 1d2e3aff89 fix job rep 2016-03-18 14:47:21 +02:00
yuri e36c8d6053 change year 2016-03-18 11:25:45 +02:00
yuri 4ea1d50caf fix detail getFieldViews 2016-03-18 11:19:14 +02:00
yuri a50361126f Merge branch 'hotfix/4.0.4' 2016-03-17 12:32:49 +02:00
yuri 865a8e2abc fix E_STRICT notices 2016-03-16 17:34:50 +02:00
yuri 037ef7ea78 Merge branch 'hotfix/4.0.4' 2016-03-16 12:49:17 +02:00
yuri 5783f4e708 fix autoincrement 2016-03-16 12:48:44 +02:00
yuri 9991dd350f fix autoincrement 2016-03-16 12:48:18 +02:00
yuri 557a48ec6a isDraggable 2016-03-15 16:01:43 +02:00
yuri d5fa18975e try catch for send password 2016-03-14 16:54:35 +02:00
yuri 23ee06e123 hide panels and buttons from portal user 2016-03-14 16:50:44 +02:00
yuri e47eab0ce7 fix select manager 2016-03-14 15:52:06 +02:00
yuri 17ae5b6b5a fix file permissions 2016-03-14 15:51:58 +02:00
yuri fa29bf3309 v 2016-03-14 11:43:24 +02:00
Heiko Robert e839e505c8 en localisation for new search filter 2016-03-11 15:50:47 +01:00
Heiko Robert 7dc9c3e6b6 added search filter "Ends With", "Like" for varchar fields 2016-03-11 15:46:15 +01:00
yuri 684585278d fix email import 2016-03-11 12:02:21 +02:00
yuri e303be8155 fix german salutations 2016-03-10 15:17:40 +02:00
yuri f1285f0615 fix default side panel tpl 2016-03-10 12:46:21 +02:00
yuri 3fd1974d86 fix build permissions 2016-03-09 15:57:13 +02:00
yuri d48716e65a account: text search by email address 2016-03-09 11:20:57 +02:00
yuri a0432051f4 fix lead service 2016-03-09 11:03:56 +02:00
yuri 076c3aa65b trim search 2016-03-09 10:44:32 +02:00
yuri 92abd16032 remove notification if record removed 2016-03-04 12:40:30 +02:00
yuri e6632066a6 aclPortal case: default status readOnly 2016-03-04 12:28:43 +02:00
yuri e2deaf57dd fix portal account contact select acl 2016-03-03 13:02:10 +02:00
yuri 0530d9deb8 fix case compose email 2016-03-03 12:30:58 +02:00
yuri b57ccf0c6a fix case assigned status 2016-03-03 12:27:01 +02:00
yuri 9ea9cf693d v 2016-03-03 12:19:44 +02:00
yuri 3460931fba fix portal windows issue 2016-03-03 12:19:05 +02:00
yuri b743d113cc fix acl 2016-03-03 12:12:13 +02:00
yuri f810371e70 fix tabbing 2016-03-03 12:12:07 +02:00
yuri bc525f3047 fetchOnModelAfterRelate 2016-03-02 13:21:19 +02:00
yuri 6809181adf mass email: dont store test email 2016-03-02 13:02:44 +02:00
yuri 2c71a28421 fix use 2016-03-02 11:49:47 +02:00
yuri 82162e4fe6 fix select manager 2016-03-01 17:25:11 +02:00
yuri 03454bc309 fix portal log 2016-03-01 16:40:23 +02:00
yuri d975501f29 fix warnings 2016-03-01 16:32:37 +02:00
yuri 761356adda fix mention 2016-03-01 12:23:37 +02:00
yuri 824835a28c email template: array fields 2016-03-01 12:01:27 +02:00
yuri 252ce15973 fix email template 2016-03-01 11:55:37 +02:00
yuri 7f25dba917 v 2016-03-01 10:57:31 +02:00
yuri b5d4b8aa5a fix warning 2016-03-01 10:20:07 +02:00
yuri 39a136295a repository default options 2016-02-29 17:45:39 +02:00
yuri 6d674c007e php 7 compatibility 2016-02-29 17:01:18 +02:00
yuri 31f380a03a russian lang 2016-02-29 12:03:38 +02:00
yuri 7e23960196 v 2016-02-26 17:11:36 +02:00
yuri d3b9f2479b fix export 2016-02-26 17:11:32 +02:00
yuri c211842b52 fix metadata 2016-02-26 15:17:33 +02:00
yuri 3e11c0cfc1 fix loader 2016-02-26 12:23:53 +02:00
yuri 6747440b00 document folder customizable 2016-02-26 12:09:30 +02:00
yuri dc1c4b1e78 fix lang 2016-02-26 10:48:01 +02:00
yuri 26f2fba3ac cleanyp 2016-02-25 16:17:55 +02:00
yuri eb481c689b fix warnings 2016-02-25 16:16:40 +02:00
yuri 88c3984d35 date: ever filter 2016-02-25 13:07:50 +02:00
yuri 4eae088973 fix flotr2: remove underscore 2016-02-25 12:19:11 +02:00
yuri 60ae0fb365 fix 2016-02-25 10:28:21 +02:00
yuri ab36f41fc3 duration notStorable 2016-02-24 17:51:13 +02:00
yuri 98de243e37 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-02-24 15:31:45 +02:00
yuri 0c6ccabbeb fix checkEntityForDuplicate 2016-02-24 15:31:26 +02:00
yuri a66e6111cb fix detail view buttons fixed possition 2016-02-24 12:11:00 +02:00
yuri caf5c8806a chart outlineColor 2016-02-24 11:43:48 +02:00
yuri 0154dfd6a1 view naming fix 2016-02-24 11:36:43 +02:00
yuri e545e68877 version 2016-02-24 10:43:43 +02:00
yuri fa24c2b7fe fix array field 2016-02-23 16:43:02 +02:00
Taras Machyshyn df2b7d9659 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2016-02-23 15:58:24 +02:00
Taras Machyshyn cc395232ff Fixed ukrainian translation 2016-02-23 15:58:10 +02:00
yuri 47afb83536 fix datetime 2016-02-23 15:48:13 +02:00
yuri 02d1b50b59 view naming 2016-02-23 15:42:05 +02:00
yuri bd86eb08fa fix account list layout 2016-02-23 15:10:47 +02:00
yuri b3c1a45b72 task: add parent to filters layout 2016-02-23 12:41:34 +02:00
yuri 15678e59e2 fix search frontend 2016-02-23 12:41:00 +02:00
yuri 6fe379bab3 link multiple and attachment multiple listLayoutDisabled 2016-02-23 11:54:48 +02:00
yuri 39ecb2fd37 cleanup 2016-02-23 11:51:36 +02:00
yuri 988c0059ff import language file 2016-02-23 11:34:15 +02:00
yuri 61ff31b3b7 trim 2016-02-23 11:17:05 +02:00
yuri 7c1a098b89 change account layouts 2016-02-22 16:47:52 +02:00
yuri f843593843 add country to lead small view 2016-02-22 16:38:22 +02:00
yuri c34eb915bc fix email draft 2016-02-22 15:54:37 +02:00
yuri 9508432294 opportunity set probability if empty 2016-02-22 15:00:40 +02:00
yuri 0959962269 version 2016-02-22 14:53:05 +02:00
yuri e39a91bde6 fix view naming 2016-02-22 12:42:09 +02:00
yuri 51f5dbe25c address list view 2016-02-22 11:47:45 +02:00
yuri 6fd5c6cbe7 fix view naming 2016-02-22 11:18:07 +02:00
yuri 6622b09eaa fix issue that search input not stored 2016-02-22 11:16:47 +02:00
yuri 9bb9f066cd fix dashboard 2016-02-19 18:15:28 +02:00
yuri 03110b47df change account list layout 2016-02-19 17:41:15 +02:00
yuri 034e532e05 change contact list layout 2016-02-19 17:35:07 +02:00
yuri c306af8b4c readable date formats according to selecred date format 2016-02-19 12:21:23 +02:00
yuri bd4a784676 move readable date formats to date-time.js 2016-02-19 12:10:55 +02:00
yuri 4ca0a9dc5f fix german salutations 2016-02-19 12:03:15 +02:00
yuri c6816b01b5 bool field filter: checked by default 2016-02-19 11:51:27 +02:00
yuri bc7583ccb4 improve role table ui 2016-02-19 11:32:16 +02:00
yuri 318e43aca3 json formating 2016-02-19 10:38:05 +02:00
yuri ea992f727b admin page: move user interface upper 2016-02-18 18:19:03 +02:00
yuri 5bdb16f98c fix home icon position 2016-02-18 18:09:27 +02:00
yuri faa06993e6 cacheTimestamp fix for no cache 2016-02-18 18:06:50 +02:00
yuri f6e0d017b2 change home icon 2016-02-18 18:03:16 +02:00
yuri 8ea56a74b0 code style link 2016-02-18 17:23:18 +02:00
yuri d4c9666f85 contributing file 2016-02-18 17:19:43 +02:00
yuri 5f376304ce portal entryPoint changes 2016-02-18 11:41:56 +02:00
yuri dbb29f25ab portal fixes 2016-02-17 17:31:10 +02:00
yuri da059b2589 portal changes 2016-02-17 16:54:53 +02:00
yuri fee64fd5ac fix lang 2016-02-17 12:48:30 +02:00
yuri 85de9f7a6f entryPoint data 2016-02-17 12:47:16 +02:00
yuri 5beb7641af portal folder 2016-02-17 12:35:19 +02:00
yuri 249852c3d7 baseBath 2016-02-16 17:27:45 +02:00
yuri 223d07579b display total count by default 2016-02-16 12:01:20 +02:00
yuri 74fb359740 pdf fontface in config 2016-02-16 10:48:40 +02:00
yuri f7ffadc76f fix template vars sorting 2016-02-16 10:40:19 +02:00
yuri fc03141dee calendar: fix issue with date w/o time 2016-02-16 10:25:38 +02:00
yuri 8d29014811 added cs_CZ lang 2016-02-15 16:18:52 +02:00
yuri 7dcbbcb98d version 2016-02-15 12:36:33 +02:00
yuri 60b9200247 fix vertical theme pagination issue 2016-02-15 12:19:02 +02:00
yuri fa4d1d70d5 naming fix 2016-02-15 12:01:05 +02:00
yuri de6cc1f9bb currency rounding 2016-02-15 11:52:20 +02:00
yuri 5fb6abe0e1 keep history in converted laed 2016-02-15 11:41:38 +02:00
yuri 94073b8aad account filters layout change 2016-02-15 11:16:40 +02:00
yuri 0e83e21aa0 use wildcard in address search 2016-02-15 11:14:56 +02:00
yuri 63bbf72942 fix company logo 403 error 2016-02-15 11:12:54 +02:00
yuri dbaa41b161 refresh list view after create / edit 2016-02-15 10:53:25 +02:00
yuri ed673dbe0d fix portal isDefault 2016-02-15 10:39:18 +02:00
yuri d54ccb0c9e fix config 2016-02-12 18:40:23 +02:00
yuri b29cbec3a1 kb fix 2016-02-12 12:33:19 +02:00
yuri edc967c118 campaign: dont count test in statistics 2016-02-12 11:40:45 +02:00
yuri e80681da22 change password url 2016-02-12 10:44:05 +02:00
yuri 03ec9c9378 attachment related field 2016-02-11 14:26:11 +02:00
yuri 6c54306cd6 fix email template 2016-02-11 12:48:33 +02:00
yuri db49af84f4 kb portals 2016-02-11 12:29:12 +02:00
yuri 79a29531e9 fix import 2016-02-10 14:45:12 +02:00
yuri c3de7f022e stream dashlet view list 2016-02-10 12:55:27 +02:00
yuri 59a3111596 fix acl 2016-02-10 12:49:06 +02:00
yuri cf8dfadbdf dont display global search if no acl access 2016-02-10 11:58:07 +02:00
yuri e500b2c906 user filters 2016-02-10 11:25:02 +02:00
yuri 0d9417cc3e create portal user 2016-02-10 11:21:50 +02:00
yuri eb57d70182 fix lang 2016-02-10 10:27:37 +02:00
yuri 215b572d70 color fix 2016-02-10 10:01:46 +02:00
yuri bc72f7f3e6 record dachlet check access 2016-02-09 16:18:09 +02:00
yuri b449473f10 fix typo 2016-02-09 15:45:44 +02:00
yuri 6f23362bfd record dashlet url 2016-02-09 15:32:54 +02:00
yuri 074d2cc119 fix role 2016-02-09 12:33:20 +02:00
yuri 725cd224c1 fix portal html and 2016 2016-02-09 11:55:21 +02:00
yuri 2baee2398b fix portal html 2016-02-09 11:44:17 +02:00
yuri 1a8f8875fd fix show hide field 2016-02-09 10:46:40 +02:00
yuri 9cecea8317 theme in diff 2016-02-09 10:45:53 +02:00
yuri 05ac6ea0b8 fix cache 2016-02-08 18:22:56 +02:00
yuri cce8186ccf fix dashlet 2016-02-08 17:39:19 +02:00
yuri b143d1a30e show hide field for middle record 2016-02-08 17:09:50 +02:00
yuri 4c5f2e6b40 fixes 2016-02-08 16:54:58 +02:00
yuri 6bc2c7a576 theme manager fix 2016-02-08 16:03:09 +02:00
yuri 2412c7521b theme css use cacheTimestamp 2016-02-08 15:59:07 +02:00
yuri c964897c59 fix list view show more 2016-02-08 13:00:47 +02:00
yuri 6abdc001e5 attachment: forbid parent 2016-02-08 11:56:47 +02:00
yuri 83943d1daa fix auto follow notification 2016-02-08 11:06:52 +02:00
yuri eedd54d10a fix email modal 2016-02-05 16:40:03 +02:00
yuri c8a3736816 attachment: small changes 2016-02-05 16:31:31 +02:00
yuri e727196424 email address search check email create access 2016-02-05 16:06:07 +02:00
yuri d0f715863c cleanup attachments w/o parent 2016-02-05 15:57:29 +02:00
yuri ae94113370 attachment set size if empty 2016-02-05 12:43:16 +02:00
yuri 3fbe4970b2 clientDefs compose modal view 2016-02-05 12:31:54 +02:00
yuri 54e6e3bf39 fix mail sender 2016-02-05 12:16:17 +02:00
yuri f2a7d3ae86 fix array 2016-02-05 11:06:31 +02:00
yuri 3799dd739b Attachment Multiple: sourceList to field manager 2016-02-05 10:55:16 +02:00
yuri 3161419682 fix pdf 2016-02-04 17:41:50 +02:00
yuri bdc277e557 fix pdf 2016-02-04 17:39:38 +02:00
yuri a515cd29a0 fix pdf 2016-02-04 17:38:26 +02:00
yuri 770a2b83f0 Pdf service 2016-02-04 17:35:48 +02:00
yuri f9df8a757d attachment getFilePath method 2016-02-04 15:57:53 +02:00
yuri 6d17017c2d wysiwyg: auto height 2016-02-04 13:08:18 +02:00
yuri 9fea9d46fb fix attachment entry point 2016-02-04 12:44:37 +02:00
yuri 3925d83b68 when select display only not empty categories 2016-02-04 12:30:43 +02:00
yuri ca23f1d58e add document 2016-02-04 12:15:28 +02:00
yuri 4492293464 new view naming 2016-02-03 15:30:33 +02:00
yuri cd0a32846c added theme 2016-02-03 11:52:16 +02:00
yuri f5d0a80626 impoty: empty assigned user 2016-02-03 10:43:42 +02:00
yuri 1b0fdad357 chache user layout 2016-02-02 17:03:28 +02:00
yuri 9ea5e3f4d0 email-to-case: no distribution 2016-02-02 15:58:40 +02:00
yuri 79416d7ac5 fix note error 2016-02-02 15:54:35 +02:00
yuri 52c6ecbcb6 new view name standard 2016-02-02 15:37:09 +02:00
yuri f6732e72d2 notification: related id 2016-02-02 12:48:31 +02:00
yuri bbf2128c8a fix notification all read 2016-02-02 12:19:01 +02:00
yuri d5ba8058e4 notification list view link 2016-02-02 11:28:32 +02:00
yuri 926e243aa3 Notification remove 2016-02-01 17:36:53 +02:00
yuri ed7d24bc8f notification fronend refactor 2016-02-01 17:09:45 +02:00
yuri 4f4069c3d7 case distribution small change 2016-02-01 15:49:03 +02:00
yuri 9426a09a40 fix stream post view 2016-02-01 11:51:53 +02:00
yuri bfd9b40a5b fix email create contact 2016-02-01 11:04:39 +02:00
yuri e94da5c189 select manager: addAndWhere addOrWhere 2016-01-29 16:56:51 +02:00
yuri 36847497fc fix case assignment if email is duplicate 2016-01-29 16:30:09 +02:00
yuri 0bb52a11ea fix email sent filter 2016-01-29 15:08:34 +02:00
yuri 9f7043a85d isFromTeams filter 2016-01-29 14:54:46 +02:00
yuri eafb8bd2cb fix portal auth 2016-01-29 11:36:17 +02:00
yuri 63eeea7b26 lang 2016-01-29 11:29:07 +02:00
yuri eac2372e00 edit dd for stream panel 2016-01-29 11:26:04 +02:00
yuri d9e972684c change portal user name autofill 2016-01-29 11:12:39 +02:00
yuri aaa9d1a7b4 add items to default filter layouts 2016-01-29 10:46:57 +02:00
yuri df9a778ba0 portal dev 2016-01-28 17:55:28 +02:00
yuri 68612cf9d1 fux uk_UA 2016-01-28 16:26:07 +02:00
yuri 26b72ea73d Added Mass Email link 2016-01-28 16:19:59 +02:00
yuri e8c570f5df fix emailReplyToAllByDefault 2016-01-28 16:10:29 +02:00
yuri abbf601325 Preferences: replyEmailToAllByDefault 2016-01-28 15:57:23 +02:00
yuri 1cd73e2f50 fix lang 2016-01-28 15:33:11 +02:00
yuri 4b49bf280b portalUserLimit 2016-01-28 15:23:44 +02:00
yuri 48302fae95 code improvements 2016-01-28 13:00:39 +02:00
yuri c525698427 fix reply cc 2016-01-27 16:29:47 +02:00
yuri 64738979e3 fix campaign revenue sum 2016-01-27 16:17:06 +02:00
yuri bed7434cd0 Settings: added readableDateFormatDisabled 2016-01-27 15:42:19 +02:00
yuri 95f23863d4 attachment: sourceId 2016-01-27 11:56:22 +02:00
yuri 1406527755 text field parameters added 2016-01-27 11:08:16 +02:00
yuri 78395407e3 load jsLibs before login 2016-01-27 10:53:28 +02:00
yuri 26e5c802b6 portal dev 2016-01-26 16:26:10 +02:00
yuri 2f5f64e53c added d/m/y date format 2016-01-26 11:17:22 +02:00
yuri a1c95fe0e9 kb changes 2016-01-26 11:17:09 +02:00
yuri eb17c54dd6 opportunity assigned user not required 2016-01-25 15:58:51 +02:00
yuri f3207a271a fix acl delete own record 2016-01-25 11:25:55 +02:00
yuri ea76104b80 role: change order 2016-01-25 11:25:39 +02:00
yuri 3d5be39d46 fix quick create acl 2016-01-25 11:25:19 +02:00
yuri 1678bb070e dashlets changes 2016-01-22 16:52:08 +02:00
yuri 470a49d6cd fix record list dashlet 2016-01-22 16:04:02 +02:00
yuri bb11a26816 role: clear cache on team change 2016-01-22 16:01:17 +02:00
yuri 06e6b19c40 siteUrl and text search filters 2016-01-22 15:43:37 +02:00
yuri f085bf5e58 dashlet layouts dev 2016-01-22 15:01:30 +02:00
yuri 2437388bf0 dashboard improvements 2016-01-21 17:47:45 +02:00
yuri fb70c9dce6 calendar size fix 2016-01-21 10:35:28 +02:00
yuri 30384a713e calendar dashlet size 2016-01-20 18:12:17 +02:00
yuri cc26345db6 Merge branch 'master' of https://github.com/espocrm/espocrm 2016-01-20 18:03:45 +02:00
yuri f29534531d dashboard improvements 2016-01-20 18:03:37 +02:00
Yuri Kuznetsov 00a2eae74e Merge pull request #82 from alasdaircr/PATCH_warning
Typo in variable name
2016-01-20 15:19:51 +02:00
Alasdair Campbell 283cac586d PATCH: warning 2016-01-20 11:03:20 +00:00
yuri ca33cab247 fix currency change trigger 2016-01-20 12:51:09 +02:00
yuri 52fb9f8b0a increase max lenngth of attachment field 2016-01-18 16:54:49 +02:00
yuri 10fee4d974 after relate event 2016-01-18 16:48:00 +02:00
yuri 6edf6ae9f2 refactor stream query 2016-01-18 16:23:54 +02:00
yuri 58e0ee5721 portal dev 2016-01-18 15:35:23 +02:00
yuri 6354c72334 knowledge base dev 2016-01-15 16:36:20 +02:00
yuri f93e6c03c9 knowledge base dev 2016-01-15 15:23:49 +02:00
yuri ef5fec4282 portal dev 2016-01-15 14:41:58 +02:00
yuri 6dc13f229e is not read 2016-01-15 13:27:49 +02:00
yuri f148bb0089 email: is read and is important filters 2016-01-15 13:24:06 +02:00
yuri 9b9a472dd5 portal dev 2016-01-15 12:52:23 +02:00
yuri f965acf384 kb fixes 2016-01-14 17:12:36 +02:00
yuri f7e3fb3e15 knowledge base 2016-01-14 16:41:27 +02:00
yuri a8396df545 document folder acl 2016-01-14 12:02:29 +02:00
yuri 3cd91ba15e cleanup 2016-01-13 17:39:05 +02:00
yuri 2433f0d626 document changes 2016-01-13 17:30:24 +02:00
yuri c0b5661ef4 fix list tree 2016-01-13 17:30:09 +02:00
yuri ff81306e90 fix list and list tree views 2016-01-13 16:40:27 +02:00
yuri d51e38bb6e portal dev 2016-01-13 13:08:35 +02:00
yuri 5c1ae72bc6 fix text fields undefined 2016-01-13 11:16:46 +02:00
yuri b1ada57d93 portal dev 2016-01-12 15:51:30 +02:00
yuri e7afe68868 dev 2016-01-11 16:02:03 +02:00
yuri f6f58c679d fixes 2016-01-08 15:18:48 +02:00
yuri 4b4f8d2cc4 dev and fix 2016-01-08 14:50:46 +02:00
yuri 7dc230d731 portal development 2016-01-08 14:39:59 +02:00
yuri db7e33fa61 development 2016-01-05 18:04:15 +02:00
yuri e4d6b13d27 fixes 2016-01-05 13:00:30 +02:00
yuri 3177945146 portal auth 2016-01-05 11:49:14 +02:00
yuri ef9c5da2d6 portal development 2016-01-04 16:14:18 +02:00
yuri 18423c0ba1 acl portal 2015-12-29 15:16:49 +02:00
yuri f629cb3af6 role appearance change 2015-12-29 12:09:58 +02:00
yuri d081d6b2d9 portal dev 2015-12-28 17:37:17 +02:00
yuri ab3dfe4bf6 portal dev 2015-12-28 16:58:16 +02:00
yuri a472e6d348 Portal Roles 2015-12-28 14:43:10 +02:00
yuri fa014bb232 modal fixes 2015-12-25 18:31:20 +02:00
yuri bdee4068c0 fixes 2015-12-25 18:01:02 +02:00
yuri 025e7134fc acl changes and portal entity 2015-12-25 17:01:50 +02:00
yuri a388638a91 fix field readOnly 2015-12-25 15:52:30 +02:00
yuri e7b8283fdc modals fixes 2015-12-25 12:30:56 +02:00
yuri d7172f8ebe acl changes and fixes 2015-12-25 12:04:41 +02:00
yuri bc0ea9ab3a readOnly attributes 2015-12-25 10:59:28 +02:00
yuri 838f8ba3b3 fix contact layout 2015-12-24 18:03:24 +02:00
yuri 4da13a55cf hasOne link and portal user fields 2015-12-24 18:01:59 +02:00
yuri 8489bca8c0 portal fields 2015-12-24 14:59:01 +02:00
yuri d620b36dd1 Merge branch 'hotfix/3.9.3' 2015-12-23 12:37:19 +02:00
yuri 89b5daebee fix ua lang 2015-12-23 12:37:05 +02:00
yuri fdea3231e9 acl and search 2015-12-23 12:09:42 +02:00
yuri 882b74a31f fix acl and relogin issue 2015-12-23 10:43:49 +02:00
yuri 181a680296 acl and export 2015-12-23 10:06:35 +02:00
yuri d7d93e6a79 role panels 2015-12-22 16:59:52 +02:00
yuri d6ee607b9d fix email save 2015-12-22 15:57:01 +02:00
yuri 75f26e3ecc navigate in quick view 2 2015-12-22 15:43:35 +02:00
yuri e959bcb369 trim 2015-12-22 11:28:56 +02:00
yuri c9eea8796f next prev title 2015-12-21 17:28:38 +02:00
yuri 8d44e0b1ad next prev in preview 2015-12-21 17:26:37 +02:00
yuri 947f47ef25 role add field translte 2015-12-21 16:03:32 +02:00
yuri 27e5df5367 field level acl frontend 2 2015-12-21 15:15:06 +02:00
yuri b7b64d7b32 duplicate changes 2015-12-21 11:25:23 +02:00
yuri 4f9a6a0dd0 acl table change 2015-12-18 18:00:49 +02:00
yuri bb5543fc81 role field security detail view 2015-12-18 17:45:42 +02:00
yuri 8b1ffaac3f disable template 2015-12-18 11:46:06 +02:00
yuri 0961ceb203 field level client side 1 2015-12-17 16:44:32 +02:00
yuri 96ca44f91b fix acl table 2015-12-17 15:14:23 +02:00
yuri 869bf46070 attributes instead of fields; server side field level security 2015-12-17 14:58:19 +02:00
yuri af039971a6 fix acl 2015-12-16 17:44:39 +02:00
yuri 5b614691fd acl table refactor 2015-12-16 17:36:11 +02:00
yuri 39295d2d6f merge 2015-12-16 11:27:24 +02:00
yuri 51952a9283 fix issue that email reply stylesheet was broken 2015-12-16 11:26:16 +02:00
yuri e88ffc1270 wyywyg full screen button 2015-12-15 18:23:08 +02:00
yuri c7fccac10c summernote upgrade 2015-12-15 18:18:23 +02:00
yuri cdb4b4e7bd summernote upgrade 2015-12-15 18:18:02 +02:00
yuri 3fa6ac5042 Merge branch 'master' of https://github.com/espocrm/espocrm 2015-12-15 15:59:04 +02:00
Yuri Kuznetsov 47e52b6670 Merge pull request #73 from ayman-alkom/master
Translate Turkish dates
2015-12-15 15:58:45 +02:00
yuri 461eb480f1 move populate assigned user and assigned teams to view 2015-12-15 14:49:55 +02:00
yuri b73cbef3d4 Merge branch 'hotfix/3.9.3' 2015-12-15 11:03:16 +02:00
yuri c6abb0a531 fix stream list 2015-12-15 11:03:03 +02:00
yuri 7227122fd8 Merge branch 'hotfix/3.9.3' 2015-12-15 11:01:18 +02:00
yuri cf3228466d fix list 2015-12-15 11:01:06 +02:00
yuri 4452db65ed Merge branch 'hotfix/3.9.3' 2015-12-15 10:30:33 +02:00
yuri 635f0d4891 fix remove from list 2015-12-15 10:30:23 +02:00
yuri 3da60c1ada rdb before after methods added 2015-12-14 17:39:43 +02:00
yuri 7187156390 rdb relate methods 2015-12-14 17:34:20 +02:00
yuri b764fd8da2 fix email select manager 2015-12-14 15:44:04 +02:00
yuri da6d590cc1 select manager change 2015-12-14 15:43:33 +02:00
Ayman Alkom 3b265056c2 Translate Turkish dates 2015-12-14 15:11:39 +02:00
yuri 7fe08f1669 acl fixes 2015-12-14 11:58:14 +02:00
yuri dc0a616ec8 select manager changes 2015-12-11 14:43:02 +02:00
yuri 7dc43e5ccc entity class fixes 2015-12-11 12:50:23 +02:00
yuri 9a78cf2389 acl changes 2015-12-11 12:17:15 +02:00
yuri b0e050ceac email assignedUsers 2015-12-10 18:05:37 +02:00
yuri 90f06fc532 setReadOnly locked 2015-12-10 16:45:13 +02:00
yuri 6d3d922290 hide show field changhe 2015-12-10 16:04:02 +02:00
yuri 3c2bc8871e fix 2015-12-10 16:01:43 +02:00
yuri 16399bf71d acl email 2015-12-10 15:48:11 +02:00
yuri abf963099c acl load and promises 2015-12-10 12:01:01 +02:00
yuri b7ab6953cd fixes in record view 2015-12-09 18:53:13 +02:00
yuri 1628821cdd changes in record 2015-12-09 18:46:05 +02:00
yuri fbf98e9754 frontend client refactor 2015-12-09 17:21:05 +02:00
yuri b4ec610fc2 record fixes 2015-12-09 17:20:53 +02:00
yuri e2a63729b6 record view refactor 2015-12-09 12:58:45 +02:00
yuri b72924c126 panel view disabled check 2015-12-08 17:15:04 +02:00
yuri 115bcc626a Merge branch 'stable' 2015-12-08 17:05:48 +02:00
yuri 083e248f21 fix logo 2 2015-12-08 16:56:14 +02:00
yuri df422f6365 v 2015-12-08 16:51:10 +02:00
yuri 47a2fee51d fix logo 2015-12-08 16:50:35 +02:00
yuri 3fabdc1d44 Merge branch 'hotfix/3.9.2' 2015-12-08 16:23:20 +02:00
yuri 4b0be0137c fix user detail view 2015-12-08 16:23:12 +02:00
yuri 7fdb40b44e more view refactoring 2015-12-08 16:21:35 +02:00
yuri 929eeddce7 grand record view refactor 2015-12-08 12:59:19 +02:00
yuri ea5d27a87f detail view refactor 2015-12-07 17:08:17 +02:00
yuri 0da898a242 show hide field method changes 2015-12-04 16:16:10 +02:00
yuri 4a14cb0e8c showPanel hidePanel methods 2015-12-04 15:55:41 +02:00
yuri 509c7f3989 stream acl 2015-12-04 15:22:18 +02:00
yuri 38514941b8 clearfix 2015-12-04 14:24:03 +02:00
yuri 3212f59cf2 fix css 2015-12-04 14:12:59 +02:00
yuri ad25e13cf0 acl view change 2015-12-04 12:42:36 +02:00
yuri fadd4ffe42 refactor acl table 2015-12-04 12:02:38 +02:00
yuri 7a3e36c092 notifications suprt parent 2015-12-04 11:10:34 +02:00
yuri 730e8143e7 scope disabled check 2015-12-03 15:37:59 +02:00
yuri a401c4cd4c set is fetched 2015-12-03 15:34:59 +02:00
yuri 51bf1343c8 notifications and acl 2015-12-03 15:32:35 +02:00
yuri 343986bf83 email notificator acl check 2015-12-03 14:46:46 +02:00
yuri d0b3ab57de Merge branch 'hotfix/3.9.2' 2015-12-03 14:26:04 +02:00
yuri d79993ba11 phone field type fix 2015-12-03 14:25:37 +02:00
yuri 6ca6f45b58 stream and acl 2015-12-03 13:54:07 +02:00
yuri d3b50c077b ability to disable scope 2015-12-03 12:42:25 +02:00
yuri 2c4ba8c1b5 lang 2015-12-03 11:08:29 +02:00
yuri a8e00dda0b fix main view $el emptyied 2015-12-02 13:22:27 +02:00
yuri 7b88c008de fix naming 2015-12-02 13:09:20 +02:00
yuri 2c251133af naming fix 2015-12-02 13:07:48 +02:00
yuri c079b256f0 fix naming 2015-12-02 12:40:27 +02:00
yuri 6a9abab7ea refactor settings views 2015-12-02 12:23:10 +02:00
yuri f59c217053 fields/base small change 2015-12-02 11:18:51 +02:00
yuri 57008f834a Merge branch 'hotfix/3.9.2' 2015-12-02 10:47:36 +02:00
yuri 7b90e74b97 view refactoring 2015-12-02 10:47:28 +02:00
yuri da62759130 destroy popover on remove 2015-11-30 16:40:01 +02:00
yuri 7cfae284ae remove main.html 2015-11-30 15:25:18 +02:00
yuri d946eed86a html folder 2015-11-30 15:22:52 +02:00
yuri 030e4ac7ab Merge branch 'hotfix/3.9.2' 2015-11-30 14:23:22 +02:00
yuri 2e04fd5a3b style 2015-11-30 14:14:29 +02:00
yuri 6174245b22 cleanup 2015-11-30 12:22:48 +02:00
yuri 9b9d3d9634 ORM: ability to join children 2015-11-30 11:15:21 +02:00
yuri f98d5a4ee9 fix typo 2015-11-30 10:26:08 +02:00
yuri c653d731cc fix readme 2015-11-27 17:14:07 +02:00
yuri f4582ac3a6 change readme 2015-11-27 17:11:14 +02:00
yuri 5bb7842585 client manager 2015-11-27 16:58:05 +02:00
yuri e13a722dca cleanup and style fix 2015-11-27 16:03:27 +02:00
yuri dba325aa61 join conditions and alias 2015-11-27 12:21:40 +02:00
yuri 59dccbedbd fix activities queries 2015-11-27 12:05:48 +02:00
yuri df32edf85f version 2015-11-27 11:47:15 +02:00
yuri 0385513f0e rename checkPemission and fix calendar 2015-11-27 11:46:52 +02:00
yuri 710fdebbec email account small fixes 2015-11-27 11:02:49 +02:00
yuri 7b707716f9 scheduled jobs ui changes 2015-11-27 10:35:54 +02:00
yuri 8cdb2df433 email template: assignmed user not required 2015-11-27 10:28:58 +02:00
yuri 6c1fb42f59 exclude by email address 2015-11-26 15:04:30 +02:00
yuri 233da7a0be mass email: dont send twice 2015-11-26 12:24:14 +02:00
yuri 612f73dac9 link Parent filters 2015-11-26 11:48:40 +02:00
yuri 3ae7634b15 campaign log lan 2015-11-26 11:10:27 +02:00
yuri 9cfabebdad fix default config 2015-11-25 16:01:57 +02:00
yuri 0522796fe3 po lang fix 2015-11-25 12:46:20 +02:00
yuri 261e76458a fix lang 2015-11-25 12:45:36 +02:00
yuri 4f2d218a82 improve po and lang 2015-11-25 12:22:46 +02:00
yuri 4f531da9f5 de_DE 2015-11-25 10:33:39 +02:00
yuri c8adb52b7a dashlet calendar and scopeList from metadata 2015-11-24 13:13:35 +02:00
yuri 5152e1ff36 po.js code style 2015-11-24 12:55:50 +02:00
yuri 5b1cfbdcfc fix lang 2015-11-24 12:34:13 +02:00
yuri 00b690da99 notification enhancement 2015-11-24 12:21:33 +02:00
yuri ed63848efa fix lang 2015-11-24 11:37:15 +02:00
yuri d174fe3e6f fix activities 2015-11-23 18:19:54 +02:00
yuri e1a505955e calendar metadata 2015-11-23 17:49:20 +02:00
yuri a30b638a8d personal email accounts link on admin panel 2015-11-23 16:57:22 +02:00
yuri c37fb02b9e record view impovements 2015-11-23 16:44:40 +02:00
yuri 3fc5b08969 form leave off confirmation while inline edit 2015-11-23 16:06:43 +02:00
yuri 0209bc3cd3 Merge branch 'master' of https://github.com/espocrm/espocrm 2015-11-23 12:52:12 +02:00
yuri db02fc4e55 refactor calendar backend 2015-11-23 12:52:05 +02:00
yuri d7787a829e refactor activities backend 2015-11-23 12:25:31 +02:00
Yuri Kuznetsov acdea144bc Merge pull request #70 from PanuWeb/translateES
New Translations ES
2015-11-22 16:23:17 +02:00
PanuWeb 700bb150bb Remaking translations II. Translations dumped and not know why. 2015-11-20 22:56:12 -03:00
PanuWeb 9a22ed262b Remaking translations. Translations dumped and not know why. 2015-11-20 22:52:44 -03:00
PanuWeb 65827b2c02 Fix 'options'. 2015-11-20 22:38:59 -03:00
PanuWeb e23e80347b Difficult words translated. 2015-11-20 22:29:05 -03:00
PanuWeb ddedbfc999 Fix missing 'Save'. Add missing translations. 2015-11-20 21:55:32 -03:00
yuri d6144f777c cleanup 2015-11-20 16:58:43 +02:00
yuri a328eff3ae fix package.json 2015-11-20 16:43:59 +02:00
yuri 45bc019967 ver 2015-11-20 16:43:21 +02:00
yuri 2aafca7ae4 fix in about 2015-11-20 16:35:06 +02:00
yuri 13a38f9767 fix in about 2015-11-20 16:32:18 +02:00
yuri fcf07cdf7c additions in about page 2015-11-20 16:29:30 +02:00
yuri 723a01c12d fix warning 2015-11-20 15:53:50 +02:00
yuri 0c1526cb69 fix notices and logging 2015-11-20 15:47:45 +02:00
yuri e25cd0c1a5 jobSchedulingMap 2015-11-20 15:21:33 +02:00
yuri a3683b76b8 authTokenControl job 2015-11-20 15:02:13 +02:00
yuri e4e56489d7 fix notice 2015-11-20 13:13:04 +02:00
yuri 1db01f1b5f naming fix 2015-11-19 16:38:37 +02:00
yuri d9a134bb3a logo refactoring 2015-11-19 15:09:11 +02:00
yuri 1cb762fae7 map field 2015-11-19 11:25:33 +02:00
yuri 16e57e38a3 fix image preview 2015-11-18 17:38:21 +02:00
yuri 42cb6fff5c navigate through image attachments 2015-11-18 16:55:01 +02:00
yuri 55239615ef email trash 2015-11-18 12:45:47 +02:00
yuri 6083531c4a record list changes 2015-11-18 12:45:07 +02:00
yuri 65cae656c3 fix stream note rowActions 2015-11-18 10:43:17 +02:00
yuri ab928c56ad list view improvement: keep selection after return 2015-11-17 17:15:58 +02:00
yuri 884a135397 email is read fix 2015-11-17 16:54:28 +02:00
yuri da2baec89d improve list layout load 2015-11-17 16:03:29 +02:00
yuri 59dfa99ff3 inbound email: addAllTeamUsers field 2015-11-17 15:44:50 +02:00
yuri e15c748470 ics cleanup 2015-11-17 12:12:07 +02:00
yuri 51fc8ac9b1 fix linkMultiple field 2015-11-17 12:08:12 +02:00
yuri a4c0d7874f link fields create attributes 2015-11-17 11:46:26 +02:00
yuri 2f62a455a3 email: change list layout 2015-11-16 18:41:40 +02:00
yuri a7a3d8a0a7 fix record tree 2015-11-16 17:40:36 +02:00
yuri 1a7774341a fix 2015-11-16 17:33:51 +02:00
yuri 0d4565962f email template editQuick is wide 2015-11-16 17:28:05 +02:00
yuri a2ff2e2f5e Email: show replied field after reply 2015-11-16 17:22:07 +02:00
yuri b038a9449f Email Template: one-off field added 2015-11-16 16:52:14 +02:00
yuri 160d10c5d1 opt out in ui 2015-11-16 13:11:29 +02:00
yuri 4eb842d37d fix linkMultiple edit html 2015-11-16 12:47:30 +02:00
yuri 7fd78a71fd cleanup 2015-11-16 12:45:41 +02:00
yuri 88fb06d982 fix documents 2015-11-16 12:43:20 +02:00
yuri c8a208db4b documents: account panel by default 2015-11-16 12:27:38 +02:00
yuri 2aaec4ea99 documents navigation fix 2015-11-16 12:22:05 +02:00
yuri b64c897f33 email template filters 2015-11-13 16:52:59 +02:00
yuri 64bf4b8296 change order of email dropdown 2015-11-13 16:35:25 +02:00
yuri 52bb6d10be sort email templates by date created 2015-11-13 15:32:53 +02:00
yuri 3527abb171 tagetLists field for Account 2015-11-13 12:08:41 +02:00
yuri 8bdbac85a8 configurable notification sound 2015-11-13 11:46:10 +02:00
yuri 13eb8630ca try catch for email sendings 2015-11-12 17:47:43 +02:00
yuri e749ec6943 Merge branch 'hotfix/3.8.1' 2015-11-12 15:29:36 +02:00
yuri c0d0c72392 fix email filter 2015-11-12 15:29:25 +02:00
yuri f1834147c7 is on of filter 2015-11-12 12:21:33 +02:00
yuri e044d34abd entity manager: dont allow to change linkMultipleField if not custom 2015-11-12 10:37:20 +02:00
yuri bfcc5b0b14 spelling fix 2015-11-11 17:42:04 +02:00
yuri 7a5b3b23e6 varchar filters added 2015-11-11 16:50:15 +02:00
yuri 9e15565227 linkMultiple in Entity Manager 2015-11-11 15:21:18 +02:00
yuri 79e6befdf4 commit fix link manager view 2015-11-11 11:06:47 +02:00
yuri 07ff4cb3d1 refactoring and modal fix 2015-11-11 10:41:08 +02:00
yuri 961a5bb8a0 entityManager relationName 2015-11-10 18:26:10 +02:00
yuri bf5f0e0e7f cleanup 2015-11-10 16:15:05 +02:00
yuri 329f05fd5b email attachment encoded fix 2015-11-10 12:42:57 +02:00
yuri 2661511bbc silent email notification param 2015-11-10 11:46:55 +02:00
yuri cea3c8609b email failed 2015-11-10 10:40:35 +02:00
yuri 35cbbb06ce remove stream from default tabList 2015-11-10 10:31:02 +02:00
yuri 1383a5d5da fix warning 2015-11-10 10:30:14 +02:00
yuri 67857ef93c fix warning 2 2015-11-09 17:07:56 +02:00
yuri f93cc5b472 fix warning 2015-11-09 17:06:19 +02:00
yuri e9df433b27 gruntfile fix 2015-11-09 15:59:37 +02:00
yuri dc300dbbe0 mass email schedule each hour 2015-11-09 12:20:09 +02:00
yuri c6b905d503 fix import rn 2015-11-09 11:38:07 +02:00
yuri 73c1cc40eb version 2015-11-06 11:36:53 +02:00
yuri 38cf2d8500 email: change row-action 2015-11-05 17:20:39 +02:00
yuri 747c7742da email improvements: isUsers field 2015-11-05 16:57:08 +02:00
yuri 5365818d82 fix show/hide fields 2015-11-05 16:07:18 +02:00
yuri eddc32ebd7 fix bad comments 2015-11-05 16:01:40 +02:00
yuri 7ae41e414b email selectManager changes 2015-11-05 15:56:42 +02:00
yuri 6572d2a998 no disconnect for smtp 2015-11-05 11:39:43 +02:00
yuri 6a2314060f force to close sockets for emails 2015-11-05 11:20:24 +02:00
yuri 6a5e22eaa0 cleanup 2015-11-04 17:10:47 +02:00
yuri 98f77041e8 cleanup 2015-11-04 17:09:11 +02:00
yuri 5fb0ddb1d2 fix in export 2015-11-04 16:24:52 +02:00
yuri 7bfedff3c8 export refactor 2015-11-04 16:23:48 +02:00
yuri cc364bc088 summernote insertText 2015-11-04 15:25:51 +02:00
yuri 81fd286834 trim 2015-11-04 12:05:52 +02:00
yuri 7d3af14f4d date sent for inbound email 2015-11-04 11:41:39 +02:00
yuri 37f5244790 fix warning in language 2015-11-04 11:02:54 +02:00
yuri 61fd827dca email template label fix 2015-11-04 10:58:44 +02:00
yuri de68abfbb4 license 2015-11-04 10:56:15 +02:00
yuri 03ecfdb805 fix lang 2015-11-04 10:55:22 +02:00
yuri 2061bf68af Merge branch 'master' of https://github.com/espocrm/espocrm 2015-11-03 17:25:09 +02:00
yuri 79f9aae744 Merge branch 'hotfix/3.7.5' 2015-11-03 17:24:43 +02:00
yuri d6fe7b59eb fix campaign statistics 2015-11-03 17:24:37 +02:00
yuri 7287854cc0 silent and noStream 2015-11-03 15:43:44 +02:00
Yuri Kuznetsov dd5a395061 Merge pull request #64 from PanuWeb/translateES
Updated Spanish translation
2015-11-03 10:21:33 +02:00
PanuWeb da1b92fdd4 Complete missing translations. 2015-11-02 18:48:38 -03:00
PanuWeb f1f23b37c4 Improved some translations. 2015-11-02 18:30:58 -03:00
yuri fea5669078 improve navigate 2015-10-30 17:57:56 +02:00
yuri 9fb88a6b92 changes for navigation buttons 2015-10-30 17:48:48 +02:00
yuri 3eb6648d2b prevNextButtons in detail view 2015-10-30 17:30:01 +02:00
yuri 7e8f0db610 change lang 2015-10-30 12:26:51 +02:00
yuri 6c57d9c658 fix calendar ratio 2015-10-30 12:24:47 +02:00
yuri bc3e873ef7 upgrade fullcalendar 2015-10-30 12:00:10 +02:00
yuri 50105087cc stream filters and panel filters 2015-10-30 11:41:29 +02:00
yuri f3406f1fcd stream filters 2015-10-30 11:17:29 +02:00
yuri 8e105205a4 fix small 2015-10-29 16:43:42 +02:00
yuri 6a496be1fa exportSkipFieldList 2015-10-29 15:50:24 +02:00
yuri ecc6e9f4ec restrict access to mention 2015-10-29 15:20:55 +02:00
yuri deee30eb3e entity manager: no stream for user 2015-10-29 11:26:50 +02:00
yuri c92ba7f8f6 stream tab 2015-10-29 11:20:47 +02:00
yuri 5f46b2f74a user stream 2015-10-29 11:03:32 +02:00
yuri 5c642f93e9 notifications about post to all 2015-10-28 17:33:52 +02:00
yuri 915c58e9ab revert comment 2015-10-28 17:28:19 +02:00
yuri ff437c204f notifications about post 2015-10-28 17:27:42 +02:00
yuri e25bfbf1d7 license fix 2015-10-28 16:39:05 +02:00
yuri ab4e16e9e7 post to users 2015-10-28 16:22:07 +02:00
yuri d60d8bdcae user stream 2015-10-28 12:19:49 +02:00
yuri a1f641af7a stream post for user 2015-10-28 11:17:38 +02:00
yuri 5cae8f359a fix installer jquery 2015-10-27 17:39:26 +02:00
yuri 19e10aa748 stream post 2015-10-27 17:12:27 +02:00
yuri 0e24774fb9 stream post 2015-10-27 16:14:46 +02:00
yuri 31d31fca73 fix strem acl 2015-10-27 12:48:59 +02:00
yuri f874aed44f stream post client 2015-10-27 12:37:58 +02:00
yuri 04ce825191 stream post 2 2015-10-26 17:14:33 +02:00
yuri 516f2218d4 stream post 2015-10-26 12:54:59 +02:00
yuri 3cbf1447c9 Merge branch 'hotfix/3.7.5' 2015-10-26 11:10:22 +02:00
yuri 1c3ca4aa5a fix vertical navbar scroll 2015-10-26 11:09:57 +02:00
yuri 143ab06a74 error messages 2015-10-26 10:44:38 +02:00
yuri c9609bf707 stream internal posts 3 2015-10-23 16:28:28 +03:00
yuri 291380c6b4 stream internal posts 2 2015-10-23 15:55:49 +03:00
yuri 74edceaf67 stream internal posts 1 2015-10-23 14:59:22 +03:00
yuri 84754077c5 calendar scope list configuranle 2015-10-22 17:12:34 +03:00
yuri e2dae62fa9 fix panel filters 2015-10-22 15:50:37 +03:00
yuri e0d475e2da fix panel filters 2015-10-22 15:50:09 +03:00
yuri 02cdf522f6 campaign tooltips 2 2015-10-22 15:01:00 +03:00
yuri 8345307760 campaign tooltips 2015-10-22 14:59:36 +03:00
yuri 888bb9d3db Merge branch 'hotfix/3.7.4' 2015-10-22 11:35:50 +03:00
yuri 0a0f8da2f4 fix auth for 5.5 2015-10-22 10:41:07 +03:00
yuri bb5d5a0ccf text filter default search by email address 2015-10-21 17:14:57 +03:00
yuri 1bd5eac103 ver 2015-10-21 10:09:21 +03:00
yuri 61957e628b fix optOut 2015-10-21 10:07:15 +03:00
yuri 97aab07d77 merge 2015-10-20 17:55:54 +03:00
yuri c5296bf906 typo 2015-10-20 17:52:26 +03:00
yuri 707f1a0b5c fix typo 2015-10-20 17:48:41 +03:00
yuri 5ffa68bee1 Merge branch 'hotfix/3.7.4' 2015-10-20 17:38:11 +03:00
yuri a16919f10b fix typo 2015-10-20 17:38:04 +03:00
yuri 7050757e4e fix campaign type 2015-10-20 17:22:52 +03:00
yuri cbd7ef4737 merge 2015-10-20 15:48:48 +03:00
yuri d27e9c91e7 import: dont import if no fields 2015-10-20 15:47:42 +03:00
yuri 5e1c7bce33 leads actual filter 2015-10-20 15:38:25 +03:00
yuri a23ac54da0 email template: translate enum 2015-10-20 15:32:01 +03:00
yuri 260c050f36 fix email address 2 2015-10-20 13:01:14 +03:00
yuri fc5c07927f fix email address case 2015-10-20 12:57:42 +03:00
yuri d321f0d701 email invitees duplicates 2015-10-20 12:32:50 +03:00
yuri dddedcf088 Merge branch 'hotfix/3.7.4' 2015-10-20 12:27:13 +03:00
yuri 95cbc138f7 meeting/call/task and converted leads 2015-10-20 12:27:05 +03:00
yuri 395063ea35 order global search 2015-10-20 11:42:16 +03:00
yuri 835f95eb52 email template list layout 2015-10-20 11:29:05 +03:00
yuri c0f6c91a0e fix email draft 2015-10-20 11:26:09 +03:00
yuri b410d0e66f todays task 2015-10-19 17:43:32 +03:00
yuri 52853a4dc4 Merge branch 'stable' 2015-10-19 16:18:24 +03:00
yuri d04f72cfd8 vers 2015-10-19 16:14:44 +03:00
yuri a9203b8e22 fix global search 2015-10-19 16:13:52 +03:00
yuri 31c7fdcfa6 manual merge 2015-10-19 15:37:41 +03:00
yuri e89c7c9328 email filter improvement 2015-10-19 15:36:22 +03:00
yuri 7808865080 import csv label 2015-10-19 15:27:09 +03:00
yuri 5283d1b6ae Merge branch 'master' of https://github.com/espocrm/espocrm 2015-10-16 17:20:47 +03:00
yuri da6546779a Merge branch 'hotfix/3.7.3' 2015-10-16 17:20:25 +03:00
yuri 404e2de3b6 fix email isRead 2015-10-16 17:19:51 +03:00
Yuri Kuznetsov 9ba2611f3f Update README.md 2015-10-16 14:22:49 +03:00
yuri f02dabc540 industry list 2015-10-16 13:50:42 +03:00
yuri c29da46a97 fix client side access denied 2015-10-16 13:07:37 +03:00
yuri b7702d2418 order fields in entity manager 2015-10-16 12:40:15 +03:00
yuri 2bc56db4c6 fix edit view link to detail 2015-10-16 12:33:59 +03:00
yuri dd0ef5455e fix 2015-10-16 10:40:45 +03:00
Yuri Kuznetsov 7cffefff1c Update README.md 2015-10-15 12:50:19 +03:00
yuri a8396df12a Merge branch 'hotfix/3.7.2' 2015-10-15 12:06:44 +03:00
yuri 901bee6d3f fix campaign 2015-10-15 11:52:25 +03:00
yuri 3375eff719 Merge branch 'hotfix/3.7.2' 2015-10-14 15:13:59 +03:00
yuri 72a0415207 fix orderBy by alias 2015-10-14 13:03:08 +03:00
yuri de69652137 fix id in model.set 2015-10-14 11:35:21 +03:00
yuri f6b696aad6 Merge branch 'master' of https://github.com/espocrm/espocrm 2015-10-13 15:57:43 +03:00
yuri e7018965c9 ajaxCall and Import not Duplicate 2015-10-13 15:57:30 +03:00
Yuri Kuznetsov 126eaed2ca Merge pull request #62 from PanuWeb/translateES
Spanish translations - es_ES (Complete)
2015-10-12 16:40:59 +03:00
yuri 8916b5eca8 Merge branch 'hotfix/3.7.2' 2015-10-12 15:17:43 +03:00
yuri dda34dce5f notImportable linkMultiple 2015-10-12 10:45:33 +03:00
yuri 1cd2d6b35e target lists field not importable 2015-10-12 10:43:50 +03:00
yuri 9888ec8a6f fix global searct 2015-10-12 10:30:16 +03:00
PanuWeb e2d5592d0a Spanish translations - es_ES (Complete) 2015-10-10 14:37:31 -03:00
PanuWeb 242d1fcfe5 Spanish translations - es_ES (90/100) 2015-10-10 13:32:46 -03:00
PanuWeb 77b0ebfa76 Spanish translations - es_ES (80/100) 2015-10-09 22:24:24 -03:00
yuri ea5321577a fix target list import 2015-10-08 17:55:48 +03:00
yuri 89508ccc3e change email labels 2015-10-08 10:54:33 +03:00
yuri 24d80f86e5 Merge branch 'hotfix/3.7.2' 2015-10-07 16:53:34 +03:00
yuri 23c772e029 fix config 2015-10-07 16:53:22 +03:00
yuri e0b6c2cf6f Merge branch 'hotfix/3.7.2' 2015-10-07 15:00:31 +03:00
yuri e67387d9ea additionalSelectColumns 2015-10-07 15:00:03 +03:00
yuri aac356d2a3 Merge branch 'hotfix/3.7.2' 2015-10-07 12:22:21 +03:00
yuri 2156094407 cleanup 2015-10-07 12:21:59 +03:00
yuri 54a6bc9c87 Merge branch 'hotfix/3.7.2' 2015-10-07 12:18:10 +03:00
yuri 03d5bf1ef2 tree impr 2015-10-07 12:18:01 +03:00
yuri b12b3895ec Merge branch 'hotfix/3.7.2' 2015-10-07 12:08:21 +03:00
yuri 42f57409c8 list tree imp 2015-10-07 12:08:11 +03:00
yuri 69d7ce408d fix preferences layout 2015-10-07 11:24:52 +03:00
yuri 15b3c0440c lead converted panel change 2015-10-07 10:56:56 +03:00
yuri e1f0715c4d email import: relate to converted entity if lead is converted 2015-10-07 10:35:07 +03:00
yuri 15aec72e97 fix double quick view 2015-10-07 10:33:47 +03:00
yuri 66eade5db7 v 2015-10-07 10:20:37 +03:00
yuri ea733bb48e versuin 2015-10-07 10:05:31 +03:00
yuri 83d9d1d924 campaign statystic percentage 2015-10-06 13:19:30 +03:00
yuri 5935bb012d stream entity type capitalized 2015-10-06 12:05:34 +03:00
yuri 48139b2be8 fix nl_NL 2015-10-06 11:52:36 +03:00
yuri 415babde64 excluding target list 2015-10-06 11:28:57 +03:00
yuri f5f5f46c75 unsubscribe entirely 2015-10-05 14:58:45 +03:00
yuri 3d89e25349 label 2015-10-05 14:36:52 +03:00
yuri 1f57a01d5d linkMultiple field for search 2015-10-05 14:34:16 +03:00
yuri 7c890aa83a fix empty tablist 2015-10-02 17:23:02 +03:00
yuri 62a29c86ab fix record controller 2015-10-02 15:27:34 +03:00
yuri bd57b6bb8e detailLayout param 2 2015-10-02 15:10:13 +03:00
yuri 9ab1d16ea0 detailLayout param 2015-10-02 15:09:39 +03:00
yuri 435aa28ca2 iconHtml for menu items 2015-10-01 13:11:05 +03:00
yuri 4bd375f154 fix notice 2015-09-30 17:22:15 +03:00
yuri d6521f9176 de_DE 2015-09-30 15:07:20 +03:00
yuri f8e0e4955a fix meeting onlymy 2015-09-30 15:06:34 +03:00
yuri 7957359c15 fix prev 2015-09-30 11:41:53 +03:00
yuri bdc3731b9a fix select manager 2015-09-30 11:39:11 +03:00
yuri 6b8af1220b opp lost filter 2015-09-30 10:24:39 +03:00
yuri 58fffeaa84 fix typo 2015-09-29 17:56:35 +03:00
yuri 5806785286 fix email notification dups 2015-09-29 11:56:15 +03:00
yuri 2f2d9b5f6f fix roles 2015-09-29 10:27:02 +03:00
yuri 5af20c1ee0 merge targetLists 2015-09-28 16:41:28 +03:00
yuri 7620be3b40 ve 2015-09-28 14:26:20 +03:00
yuri 86f591b409 trim emails when search 2015-09-28 11:18:12 +03:00
yuri 533dfe24d0 default dashlet options 2015-09-28 11:08:13 +03:00
yuri 10c51dc46e target lists panels 2015-09-28 10:55:58 +03:00
yuri a9d24a1e09 fix mass update 2015-09-28 10:45:30 +03:00
yuri 0cfe093701 fix german language 2015-09-28 10:29:50 +03:00
yuri 11ec99fe6a duplicate email template 2015-09-28 10:26:59 +03:00
yuri b07e5a6da2 campaign list layout 2015-09-28 10:24:10 +03:00
yuri 151738f896 fix tracking img 2015-09-28 10:23:20 +03:00
yuri 075a370e7a fix log opened 2015-09-25 16:46:55 +03:00
yuri e7aa147b90 fix import 2015-09-25 15:41:38 +03:00
yuri 2e988fab6d css fiux 2015-09-25 14:51:56 +03:00
yuri b38e03a53a cleanup 2015-09-25 11:32:17 +03:00
yuri 68e01f9e6f fix backbone id 2015-09-25 11:25:24 +03:00
yuri 4d32955e28 wysywyg field 2015-09-24 17:30:39 +03:00
yuri 13a2aa7f03 decrease wysywyg height 2015-09-24 17:17:17 +03:00
yuri ac91087b82 header menu improvements 2015-09-24 12:55:47 +03:00
yuri 57a4a30402 updade history panel on activities changes 2015-09-24 12:26:27 +03:00
yuri dd3ee8d69a update backbone and improve list view listening 2015-09-24 12:05:22 +03:00
yuri accbc9582e add email settings 2015-09-24 10:47:26 +03:00
yuri 4a2845d7a5 showNewRecords stream panel 2015-09-23 15:41:13 +03:00
yuri 9b2ae8992f stream fetch new 2015-09-23 15:26:20 +03:00
yuri 1bb0038be8 dont reset filters if primary filter changed 2015-09-23 11:32:38 +03:00
yuri 6c4e73f1c4 created by field in export 2015-09-23 09:53:02 +03:00
yuri 72f5dbea87 created fields in export 2015-09-23 09:52:10 +03:00
yuri aeb8411695 de_DE 2015-09-23 09:49:47 +03:00
yuri df6db9bd47 changes in mass email 2015-09-22 16:26:13 +03:00
yuri ab17044da9 grunt 2015-09-22 15:41:38 +03:00
yuri 7356bd98ab fix filter 2015-09-22 13:23:44 +03:00
yuri a631e52f63 fix usubscribe email link 2015-09-22 12:50:23 +03:00
yuri b925100df7 fix importer 2015-09-22 12:49:47 +03:00
yuri eeba65440c email template info 2015-09-22 11:46:02 +03:00
yuri 95f72933a4 fix header menu 2015-09-22 11:28:20 +03:00
yuri 4b03e74662 update zend 2015-09-22 10:27:20 +03:00
yuri b316eeb3eb fix attachment download 2015-09-21 18:44:03 +03:00
yuri 53e6904ce1 fix campaign 2015-09-21 12:38:26 +03:00
yuri e2b9647cf1 not render list after sync if modal is opened 2015-09-21 12:02:50 +03:00
yuri 1145406531 remove queue after mass email remove 2015-09-21 11:41:14 +03:00
yuri 9ce65c9a2b fix email account 2015-09-18 17:20:43 +03:00
yuri 2ec1db8379 refactor select manager 2 2015-09-18 17:19:23 +03:00
yuri 8074baef56 activities dashlet 2015-09-18 15:44:19 +03:00
yuri 4584211c04 select manager refactoring 2015-09-18 13:51:00 +03:00
yuri 290099641b dont show declined meetings/calls in only my 2015-09-18 12:00:49 +03:00
yuri d0c3044e8e dont show declined in calendar 2015-09-18 11:58:44 +03:00
yuri 4e983ff440 user calendar 2015-09-17 17:38:48 +03:00
yuri 9aba8b0d8f format address in js 2015-09-17 15:26:08 +03:00
yuri ee6ef6694f custom tab list 2015-09-17 15:01:11 +03:00
yuri 8330137c4e fixes with assignment in mass update and autopopulate 2015-09-17 13:18:05 +03:00
yuri bd420ad963 clear roles cache on team change 2015-09-17 12:18:12 +03:00
yuri e03bedf439 job improvement 2015-09-17 11:46:05 +03:00
yuri 5cba246bb2 improve link 2 2015-09-17 11:21:26 +03:00
yuri 3490c16285 link select improvements 2015-09-17 11:19:33 +03:00
yuri 957fda9e8e clear cache if user changed roles 2015-09-17 11:00:21 +03:00
yuri b940adc341 clear roles cache after role change 2015-09-17 10:46:18 +03:00
yuri f44a093ea9 acl for activities 2015-09-16 15:53:21 +03:00
yuri 0b6dc1ff5f acl attendees 2015-09-16 15:41:28 +03:00
yuri 907eb5feb5 opted out remove 2015-09-16 15:17:14 +03:00
yuri 17a339c318 target list no remove 2015-09-16 14:24:49 +03:00
yuri 3bea161618 tooltip 2015-09-16 12:50:57 +03:00
yuri b39a4a3624 track opened 2015-09-16 12:46:28 +03:00
yuri 2530d13d25 mass email test send 2015-09-16 12:26:19 +03:00
yuri 67e152c923 mass email dev 2015-09-15 15:38:58 +03:00
yuri 4934d4ad95 cleanup 2015-09-15 15:17:34 +03:00
yuri 9a072949fd lead listSmall change 2015-09-15 15:15:55 +03:00
yuri 6e5f8676a1 campaign dev 2015-09-15 14:59:03 +03:00
yuri 5a52484295 panel filters 2015-09-15 12:41:30 +03:00
yuri a3338b0db7 mass email dev 2015-09-15 11:40:27 +03:00
yuri d212d4a193 dev 2015-09-11 17:45:49 +03:00
yuri e3f9a0f607 dev 2015-09-11 17:02:01 +03:00
yuri 91b7635d26 dev 2015-09-11 16:47:50 +03:00
yuri 532581cb50 small change 2015-09-11 11:47:19 +03:00
yuri 9b4a3a8ca9 fix lang 2015-09-11 11:43:01 +03:00
yuri 564c397258 Merge branch 'hotfix/3.6.3' 2015-09-11 11:27:45 +03:00
yuri 22e81898c0 fix external account 2015-09-11 11:27:30 +03:00
yuri ec863fe09a dev 2015-09-11 11:25:11 +03:00
yuri cb9a1d31d8 email account readOnl 2015-09-11 11:05:00 +03:00
yuri 0e8d0495a9 dev 2015-09-10 17:58:03 +03:00
yuri fa19e5ebce dev 2015-09-10 17:27:27 +03:00
yuri b67e8960fa Merge branch 'hotfix/3.6.3' 2015-09-10 11:02:06 +03:00
yuri 6efd697a1e fix email import counter 2015-09-10 10:57:48 +03:00
yuri a9379dcf0a Merge branch 'hotfix/3.6.3' 2015-09-10 10:41:44 +03:00
yuri 9798f399bd fix import time 2015-09-10 10:41:37 +03:00
yuri a520510f9b Merge branch 'hotfix/3.6.3' 2015-09-10 10:36:21 +03:00
yuri fbfe82870f fix import dates 2015-09-10 10:36:00 +03:00
yuri 3b668f4dbd dev 2015-09-10 10:22:19 +03:00
yuri 62eb54d853 dev 2015-09-09 17:03:37 +03:00
yuri 81335454fd fix insert template 2015-09-09 17:03:32 +03:00
yuri 1b33221fc1 autoincrement field change 2015-09-09 09:49:01 +03:00
yuri 152c96838f detailSmall layouts changes 2015-09-09 09:42:18 +03:00
yuri f78af9b204 dev 2015-09-08 17:51:00 +03:00
yuri 302b9e759f campaign log acl 2015-09-08 17:29:00 +03:00
yuri dab7e329df dev 2015-09-08 17:22:36 +03:00
yuri 6a93fe77ca dev 2015-09-08 15:56:00 +03:00
yuri 0e21a9bf91 dev 2015-09-08 15:18:44 +03:00
yuri 723f504a56 dev 2015-09-08 12:21:49 +03:00
yuri 121b324532 add activities and tasks actions 2015-09-07 11:21:56 +03:00
yuri c54a4eee95 varchar trim and system emails 2015-09-04 17:17:41 +03:00
yuri 2a03797436 return list fix 2015-09-04 16:11:49 +03:00
yuri 55dc4d1e77 loader change 2015-09-04 15:14:39 +03:00
yuri cb51feef48 fix email importer 2015-09-04 13:24:28 +03:00
yuri e75c957aad Merge branch 'hotfix/3.6.3' 2015-09-04 12:42:27 +03:00
yuri e08624fae3 fix preferences controler 2015-09-04 12:42:09 +03:00
yuri e8ac486d4a default select filters 2015-09-04 12:34:30 +03:00
yuri 1ded65b85d fix selectRelatedFilters 2015-09-04 12:14:23 +03:00
yuri 35b2f0e57e fix removeButton 2015-09-04 11:57:58 +03:00
yuri d6ef8e1b33 fix list view return 2015-09-04 11:36:19 +03:00
yuri 118025f646 fix currency 2015-09-03 16:31:41 +03:00
yuri 0888752e2a range fields 2015-09-03 15:59:13 +03:00
yuri df5177a565 activities panel change 2015-09-03 12:15:45 +03:00
yuri 3f03770b6e refactor activities service 2015-09-03 11:59:19 +03:00
yuri 27ebac0722 app status styles 2015-09-03 11:25:09 +03:00
yuri e5b46bc547 email replyTo 2015-09-03 11:05:20 +03:00
yuri 468a236ce1 fix edit layout column 2015-09-02 15:40:18 +03:00
yuri 6fda3dd147 mass update layout fix 2015-09-02 15:17:09 +03:00
yuri 9f0705c82d pass event obj to actions 2015-09-02 14:02:48 +03:00
yuri 0ab0de2371 fix linkMultipeCategoryTree 2015-09-02 13:18:47 +03:00
yuri ba7d79ef39 Merge branch 'master' of https://github.com/espocrm/espocrm 2015-09-02 11:56:39 +03:00
yuri c0e51d85b5 vertical theme width 2015-09-02 11:56:30 +03:00
yuri 80334d59ff back route and isReturn 2015-09-02 11:20:00 +03:00
yuri 759ad1a8d3 rename scheduled job 2015-09-02 10:05:44 +03:00
yuri 7c569d3880 fix global search padding 2015-09-02 10:03:14 +03:00
yuri 7b21b82a2e email to case fix 2015-09-02 10:00:15 +03:00
yuri 5e86c5da8c list view return imporovement 2015-09-02 09:40:17 +03:00
Yuri Kuznetsov 9998f82596 Update README.md 2015-09-01 21:42:29 +03:00
Yuri Kuznetsov 9cb3f5fb3a Update README.md 2015-09-01 21:40:40 +03:00
yuri dcce3335cd returnDispatchParams 2015-09-01 16:30:41 +03:00
yuri 5f9b4d99f3 list view stored 2015-09-01 16:02:39 +03:00
yuri a6f4111383 automatically accept meeting/call for current user 2015-09-01 12:58:37 +03:00
yuri 569180ed86 email important 2015-09-01 12:31:08 +03:00
yuri f9cc21a06d import update 2015-08-31 15:19:09 +03:00
yuri e5ad31a965 prevent loop 2015-08-31 12:24:46 +03:00
yuri 5252d63260 lastXDays and nextXDays filters 2015-08-31 12:10:44 +03:00
yuri a9fea0b9f5 change default jobs 2015-08-31 11:27:45 +03:00
yuri cee91eb6af email replied 2015-08-31 11:23:39 +03:00
yuri c61765cc31 Merge branch 'hotfix/3.6.3' 2015-08-28 15:50:28 +03:00
yuri 03d3884bf4 follow fix 2015-08-28 15:50:09 +03:00
yuri cb01caddd3 Merge branch 'hotfix/3.6.2' 2015-08-28 14:30:56 +03:00
yuri 45d2cec423 Merge branch 'hotfix/3.6.2' 2015-08-28 14:24:41 +03:00
yuri 6d86c65ea6 Merge branch 'hotfix/3.6.2' 2015-08-27 17:13:01 +03:00
yuri 2571f967b7 displayTotalCount option 2015-08-27 16:04:21 +03:00
yuri a93d5a0678 change email filter descriptipon 2015-08-27 16:00:21 +03:00
yuri be1647548a email filters final 2015-08-27 15:50:49 +03:00
yuri 91571fa47c fix readOnly and create 2015-08-27 15:43:05 +03:00
yuri cf3220581f Merge branch 'hotfix/3.6.2' 2015-08-27 15:29:37 +03:00
yuri 99b4f7eb5c email filters dev 2015-08-27 15:28:36 +03:00
yuri 803111b12f Merge branch 'hotfix/3.6.2' 2015-08-27 12:17:35 +03:00
yuri 2ceb686198 Merge branch 'hotfix/3.6.2' 2015-08-27 10:29:33 +03:00
yuri cefe304c2f filters 2 2015-08-26 16:30:45 +03:00
yuri cbe4f0009b Merge branch 'hotfix/3.6.2' 2015-08-26 12:09:12 +03:00
yuri 2d1aa77ddc email filter 2 2015-08-25 16:16:12 +03:00
yuri 5357061d52 campaign lead created change 2015-08-25 10:30:52 +03:00
yuri 13b7db63d0 add createdBy filters 2015-08-25 09:40:22 +03:00
yuri 62b0020c67 email filters dev 2015-08-24 17:33:43 +03:00
yuri 4512dfd420 refactor acl and assigmnent permissions, email filter entity 2015-08-24 16:50:54 +03:00
yuri b1303cb50e rename hasAttachments 2015-08-24 15:07:47 +03:00
yuri 3facbc782b Merge branch 'hotfix/3.6.2' 2015-08-24 14:50:05 +03:00
yuri dae249e4b2 Merge branch 'hotfix/3.6.2' 2015-08-24 12:10:29 +03:00
yuri 2497ab6a5e hasAttachments icon 2015-08-24 12:03:40 +03:00
yuri 2d00b27fb6 translatedOptions param 2015-08-24 11:48:45 +03:00
2670 changed files with 103975 additions and 23631 deletions
+9 -6
View File
@@ -6,14 +6,17 @@
/data/config.php
/build
/node_modules
/client
/test.php
/main.html
/frontend/client/css/espo.css
/frontend/client/css/espo-vertical.css
/frontend/client/css/sakura.css
/frontend/client/css/sakura-vertical.css
/tests/testData/cache/*
/client/css/espo.css
/client/css/espo-vertical.css
/client/css/sakura.css
/client/css/sakura-vertical.css
/client/css/violet.css
/client/css/violet-vertical.css
/tests/unit/testData/cache/*
!/tests/unit/testData/cache/.data
/tests/integration/config.php
composer.phar
vendor/
/custom/Espo/Custom/*
+3
View File
@@ -0,0 +1,3 @@
Before we can merge your pull request you need to accept our CLA [here](https://github.com/espocrm/cla). It's very simple to do.
[Code Style Guidelines](https://github.com/espocrm/espocrm/wiki/Code-Style-Guidelines).
+57 -21
View File
@@ -23,6 +23,7 @@ module.exports = function (grunt) {
var jsFilesToMinify = [
'client/lib/jquery-2.1.4.min.js',
'client/lib/underscore-min.js',
'client/lib/es6-promise.min.js',
'client/lib/backbone-min.js',
'client/lib/handlebars.js',
'client/lib/base64.js',
@@ -33,7 +34,7 @@ module.exports = function (grunt) {
'client/lib/jquery.autocomplete.js',
'client/lib/bootstrap.min.js',
'client/lib/bootstrap-datepicker.js',
'client/lib/bull.min.js',
'client/lib/bull.js',
'client/src/namespace.js',
'client/src/exceptions.js',
'client/src/loader.js',
@@ -46,7 +47,7 @@ module.exports = function (grunt) {
mkdir: {
tmp: {
options: {
mode: 0775,
mode: 0755,
create: [
'build/tmp',
]
@@ -64,39 +65,55 @@ module.exports = function (grunt) {
yuicompress: true,
},
files: {
'frontend/client/css/espo.css': 'frontend/less/espo/main.less',
},
},
sakura: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/sakura.css': 'frontend/less/sakura/main.less',
},
'client/css/espo.css': 'frontend/less/espo/main.less',
}
},
espoVertical: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
'client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
}
},
sakura: {
options: {
yuicompress: true,
},
files: {
'client/css/sakura.css': 'frontend/less/sakura/main.less',
}
},
sakuraVertical: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
'client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
}
},
violet: {
options: {
yuicompress: true,
},
files: {
'client/css/violet.css': 'frontend/less/violet/main.less',
}
},
violetVertical: {
options: {
yuicompress: true,
},
files: {
'client/css/violet-vertical.css': 'frontend/less/violet-vertical/main.less',
}
}
},
cssmin: {
minify: {
files: {
'build/tmp/client/css/espo.css': [
'frontend/client/css/espo.css',
'client/css/espo.css',
]
}
},
@@ -107,13 +124,13 @@ module.exports = function (grunt) {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
'build/tmp/client/espo.min.js': jsFilesToMinify.map(function (item) {
return 'frontend/' + item;
return '' + item;
})
},
copy: {
frontendFolders: {
expand: true,
cwd: 'frontend/client',
cwd: 'client',
src: [
'src/**',
'res/**',
@@ -128,13 +145,13 @@ module.exports = function (grunt) {
dest: 'build/tmp/client',
},
frontendHtml: {
src: 'frontend/html/reset.html',
src: 'frontend/reset.html',
dest: 'build/tmp/reset.html'
},
frontendLib: {
expand: true,
dot: true,
cwd: 'frontend/client/lib',
cwd: 'client/lib',
src: '**',
dest: 'build/tmp/client/lib/',
},
@@ -147,7 +164,9 @@ module.exports = function (grunt) {
'custom/**',
'data/.data',
'install/**',
'portal/**',
'vendor/**',
'html/**',
'bootstrap.php',
'cron.php',
'rebuild.php',
@@ -188,6 +207,19 @@ module.exports = function (grunt) {
'build/EspoCRM-<%= pkg.version %>/**/*.html',
'build/EspoCRM-<%= pkg.version %>/**/*.txt',
]
},
folders: {
options: {
mode: '755'
},
src: [
'build/EspoCRM-<%= pkg.version %>/install',
'build/EspoCRM-<%= pkg.version %>/portal',
'build/EspoCRM-<%= pkg.version %>/api',
'build/EspoCRM-<%= pkg.version %>/api/v1',
'build/EspoCRM-<%= pkg.version %>/api/v1/portal-access',
'build/EspoCRM-<%= pkg.version %>',
]
}
},
replace: {
@@ -202,8 +234,12 @@ module.exports = function (grunt) {
},
files: [
{
src: 'frontend/html/main.html',
dest: 'build/tmp/main.html'
src: 'build/tmp/html/main.html',
dest: 'build/tmp/html/main.html'
},
{
src: 'build/tmp/html/portal.html',
dest: 'build/tmp/html/portal.html'
}
]
},
+7 -7
View File
@@ -631,29 +631,29 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
EspoCRM - Open Source CRM
Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
EspoCRM is free software: you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
EspoCRM is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with EspoCRM. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
EspoCRM Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
EspoCRM comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
+12 -8
View File
@@ -8,14 +8,14 @@ Download the latest release from our [website](http://www.espocrm.com).
### Requirements
* PHP 5.4 or above (with pdo, json, gd, mcrypt extensions);
* PHP 5.5 or above (with pdo, json, gd, mcrypt extensions);
* MySQL 5.1 or above.
For more information about server configuration see [this article](http://blog.espocrm.com/administration/server-configuration-for-espocrm/).
### How to report bug
Create an issue [here](https://github.com/espocrm/espocrm/issues) or post on our [forum](http://forum.espocrm.com/bug-reports?routestring=forum/bug-reports).
Create an issue [here](https://github.com/espocrm/espocrm/issues) or post on our [forum](http://forum.espocrm.com/forum/bug-reports).
### How to get started (for developers)
@@ -26,9 +26,9 @@ Create an issue [here](https://github.com/espocrm/espocrm/issues) or post on our
Never update composer dependencies if you are going to contribute code back.
Now you can build.
Now you can build. Build will create compiled css files.
If your repository is accessible via a web server then you can run EspoCRM by url `http://PROJECT_URL/frontend`. To compose a proper config.php and populate database you can run install by opening `http(s)://{YOUR_CRM_URL}/install` location in a browser. Also you need to run build before to have compiled css.
To compose a proper config.php and populate database you can run install by opening `http(s)://{YOUR_CRM_URL}/install` location in a browser. Then open `data/config.php` file and add `isDeveloperMode => true`.
### How to build
@@ -40,20 +40,24 @@ You need to have nodejs and Grunt CLI installed.
The build will be created in the `build` directory.
### How to make translation
### How to contribute
Before we can merge your pull request you need to accept our CLA [here](https://github.com/espocrm/cla). It's very simple to do.
### How to make a translation
Build po file with command:
`node po.js en_EN`
(specify needed language instead of en_EN)
After that tranlate the generated po file.
After that translate the generated po file.
Build json files from the translated po file:
1. Put your po file espocrm-en_EN.po to the `build` directory
1. Put your po file espocrm-en_EN.po into `build` directory
2. Run `node lang.js en_EN`
The files will be created in build directory.
Json files will be created in build directory grouped by folders.
### License
+7
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
require_once('../../bootstrap.php');
+12
View File
@@ -0,0 +1,12 @@
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
@@ -18,23 +18,22 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
include "../bootstrap.php";
require_once('../../../bootstrap.php');
$app = new \Espo\Core\Application();
if (!empty($_GET['entryPoint'])) {
$app->runEntryPoint($_GET['entryPoint']);
exit;
if (!empty($_GET['portalId'])) {
$portalId = $_GET['portalId'];
} else {
$portalId = explode('/', $_SERVER['REQUEST_URI'])[count(explode('/', $_SERVER['SCRIPT_NAME'])) - 1];
}
$themeManager = $app->getContainer()->get('themeManager');
$runScript = "app.start();";
$html = file_get_contents("frontend/main.html");
$html = str_replace('{{stylesheet}}', $themeManager->getStylesheet() , $html);
$html = str_replace('{{runScript}}', $runScript , $html);
echo $html;
exit;
$app = new \Espo\Core\Portal\Application($portalId);
$app->run();
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1G" stopProcessing="true">
<match url="^" />
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
+93
View File
@@ -0,0 +1,93 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Acl;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class Attachment extends \Espo\Core\Acl\Base
{
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
{
if ($user->isAdmin()) {
return true;
}
if ($entity->get('parentType') === 'Settings') {
return true;
}
$parent = null;
$hasParent = false;
if ($entity->get('parentId') && $entity->get('parentType')) {
$hasParent = true;
$parent = $this->getEntityManager()->getEntity($entity->get('parentType'), $entity->get('parentId'));
} else if ($entity->get('relatedId') && $entity->get('relatedType')) {
$hasParent = true;
$parent = $this->getEntityManager()->getEntity($entity->get('relatedType'), $entity->get('relatedId'));
}
if ($hasParent) {
if ($parent) {
if ($parent->getEntityType() === 'Note') {
if ($parent->get('parentId') && $parent->get('parentType')) {
$parentOfParent = $this->getEntityManager()->getEntity($parent->get('parentType'), $parent->get('parentId'));
if ($parentOfParent && $this->getAclManager()->checkEntity($user, $parentOfParent)) {
return true;
}
} else {
return true;
}
} else {
if ($this->getAclManager()->checkEntity($user, $parent)) {
return true;
}
}
}
} else {
return true;
}
if ($this->checkEntity($user, $entity, $data, 'read')) {
return true;
}
return false;
}
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($user->id === $entity->get('createdById')) {
return true;
}
return false;
}
}
+58 -9
View File
@@ -18,17 +18,24 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Acl;
use \Espo\Entities\User;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class Email extends \Espo\Core\Acl\Base
{
public function checkEntityRead(User $user, Entity $entity, $data)
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
{
if ($this->checkEntity($user, $entity, $data, 'read')) {
return true;
@@ -37,8 +44,8 @@ class Email extends \Espo\Core\Acl\Base
if ($data === false) {
return false;
}
if (is_array($data)) {
if (empty($data['read']) || $data['read'] == 'no') {
if (is_object($data)) {
if ($data->read === false || $data->read === 'no') {
return false;
}
}
@@ -53,20 +60,62 @@ class Email extends \Espo\Core\Acl\Base
return false;
}
public function checkIsOwner(User $user, Entity $entity)
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($entity->has('assignedUserId')) {
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
if ($user->id === $entity->get('createdById')) {
return true;
}
if ($entity->hasLinkMultipleId('assignedUsers', $user->id)) {
return true;
}
return false;
}
public function checkEntityDelete(EntityUser $user, Entity $entity, $data)
{
if ($user->isAdmin()) {
return true;
}
if ($data === false) {
return false;
}
if ($data->delete === 'own') {
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
if ($user->id === $entity->get('createdById')) {
return true;
}
$assignedUserIdList = $entity->getLinkMultipleIdList('assignedUsers');
if (count($assignedUserIdList) === 1 && $entity->hasLinkMultipleId('assignedUsers', $user->id)) {
return true;
}
return false;
}
if ($this->checkEntity($user, $entity, $data, 'delete')) {
return true;
}
if ($data->edit !== 'no' || $data->create !== 'no') {
if ($entity->get('createdById') === $user->id) {
if ($entity->get('status') !== 'Sent' && $entity->get('status') !== 'Archived') {
return true;
}
}
}
return false;
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Acl;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class EmailFilter extends \Espo\Core\Acl\Base
{
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($entity->has('parentId') && $entity->has('parentType')) {
$parentType = $entity->get('parentType');
$parentId = $entity->get('parentId');
if (!$parentType || !$parentId) return;
$parent = $this->getEntityManager()->getEntity($parentType, $parentId);
if ($parent->getEntityType() === 'User') {
return $parent->id === $user->id;
}
if ($parent && $parent->has('assignedUserId') && $parent->get('assignedUserId') === $user->id) {
return true;
}
}
return;
}
}
+45
View File
@@ -0,0 +1,45 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Acl;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class Notification extends \Espo\Core\Acl\Base
{
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($user->id === $entity->get('userId')) {
return true;
}
return false;
}
}
+41
View File
@@ -0,0 +1,41 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Acl;
use \Espo\ORM\Entity;
class Team extends \Espo\Core\Acl\Base
{
public function checkInTeam(\Espo\Entities\User $user, Entity $entity)
{
$userTeamIdList = $user->getLinkMultipleIdList('teams');
return in_array($entity->id, $userTeamIdList);
}
}
+41
View File
@@ -0,0 +1,41 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Acl;
use \Espo\ORM\Entity;
class User extends \Espo\Core\Acl\Base
{
public function checkIsOwner(\Espo\Entities\User $user, Entity $entity)
{
return $user->id === $entity->id;
}
}
+93
View File
@@ -0,0 +1,93 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\AclPortal;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class Attachment extends \Espo\Core\AclPortal\Base
{
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
{
if ($user->isAdmin()) {
return true;
}
if ($entity->get('parentType') === 'Settings') {
return true;
}
$parent = null;
$hasParent = false;
if ($entity->get('parentId') && $entity->get('parentType')) {
$hasParent = true;
$parent = $this->getEntityManager()->getEntity($entity->get('parentType'), $entity->get('parentId'));
} else if ($entity->get('relatedId') && $entity->get('relatedType')) {
$hasParent = true;
$parent = $this->getEntityManager()->getEntity($entity->get('relatedType'), $entity->get('relatedId'));
}
if ($hasParent) {
if ($parent) {
if ($parent->getEntityType() === 'Note') {
if ($parent->get('parentId') && $parent->get('parentType')) {
$parentOfParent = $this->getEntityManager()->getEntity($parent->get('parentType'), $parent->get('parentId'));
if ($parentOfParent && $this->getAclManager()->checkEntity($user, $parentOfParent)) {
return true;
}
} else {
return true;
}
} else {
if ($this->getAclManager()->checkEntity($user, $parent)) {
return true;
}
}
}
} else {
return true;
}
if ($this->checkEntity($user, $entity, $data, 'read')) {
return true;
}
return false;
}
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($user->id === $entity->get('createdById')) {
return true;
}
return false;
}
}
+71
View File
@@ -0,0 +1,71 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\AclPortal;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class Email extends \Espo\Core\AclPortal\Base
{
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
{
if ($this->checkEntity($user, $entity, $data, 'read')) {
return true;
}
if ($data === false) {
return false;
}
if (is_object($data)) {
if ($data->read === false || $data->read === 'no') {
return false;
}
}
if (!$entity->has('usersIds')) {
$entity->loadLinkMultipleField('users');
}
$userIdList = $entity->get('usersIds');
if (is_array($userIdList) && in_array($user->id, $userIdList)) {
return true;
}
return false;
}
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($user->id === $entity->get('createdById')) {
return true;
}
return false;
}
}
@@ -0,0 +1,45 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\AclPortal;
use \Espo\Entities\User as EntityUser;
use \Espo\ORM\Entity;
class Notification extends \Espo\Core\AclPortal\Base
{
public function checkIsOwner(EntityUser $user, Entity $entity)
{
if ($user->id === $entity->get('userId')) {
return true;
}
return false;
}
}
+41
View File
@@ -0,0 +1,41 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\AclPortal;
use \Espo\ORM\Entity;
class User extends \Espo\Core\AclPortal\Base
{
public function checkIsOwner(\Espo\Entities\User $user, Entity $entity)
{
return $user->id === $entity->id;
}
}
+7
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+33 -3
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -28,19 +35,42 @@ class App extends \Espo\Core\Controllers\Base
{
public function actionUser()
{
$preferences = $this->getPreferences()->toArray();
$preferences = $this->getPreferences()->getValues();
unset($preferences['smtpPassword']);
$user = $this->getUser();
if (!$user->has('teamsIds')) {
$user->loadLinkMultipleField('teams');
}
if ($user->get('isPortalUser')) {
$user->loadAccountField();
$user->loadLinkMultipleField('accounts');
}
$userData = $user->getValues();
$emailAddressList = [];
foreach ($user->get('emailAddresses') as $emailAddress) {
if ($emailAddress->get('invalid')) continue;
if ($user->get('emailAddrses') === $emailAddress->get('name')) continue;
$emailAddressList[] = $emailAddress->get('name');
}
if ($user->get('emailAddrses')) {
array_unshift($emailAddressList, $user->get('emailAddrses'));
}
$userData['emailAddressList'] = $emailAddressList;
$settings = (object)[];
foreach ($this->getConfig()->get('userItems') as $item) {
$settings->$item = $this->getConfig()->get($item);
}
return array(
'user' => $user->toArray(),
'user' => $userData,
'acl' => $this->getAcl()->getMap(),
'preferences' => $preferences,
'token' => $this->getUser()->get('token')
'token' => $this->getUser()->get('token'),
'settings' => $settings
);
}
+18 -3
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -27,15 +34,23 @@ use \Espo\Core\Exceptions\BadRequest;
class Attachment extends \Espo\Core\Controllers\Record
{
public function actionUpload($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
list($prefix, $contents) = explode(',', $data);
$contents = base64_decode($contents);
if (!$this->getAcl()->checkScope('Attachment', 'create')) {
throw new Forbidden();
}
$arr = explode(',', $data);
if (count($arr) > 1) {
list($prefix, $contents) = $arr;
$contents = base64_decode($contents);
} else {
$contents = '';
}
$attachment = $this->getEntityManager()->getEntity('Attachment');
$this->getEntityManager()->saveEntity($attachment);
+13 -6
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -33,32 +40,32 @@ class AuthToken extends \Espo\Core\Controllers\Record
}
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
throw new Forbidden();
}
public function actionCreate($params, $data)
public function actionCreate($params, $data, $request)
{
throw new Forbidden();
}
public function actionListLinked($params, $data)
public function actionListLinked($params, $data, $request)
{
throw new Forbidden();
}
public function actionMassUpdate($params, $data)
public function actionMassUpdate($params, $data, $request)
{
throw new Forbidden();
}
public function actionCreateLink($params, $data)
public function actionCreateLink($params, $data, $request)
{
throw new Forbidden();
}
public function actionRemoveLink($params, $data)
public function actionRemoveLink($params, $data, $request)
{
throw new Forbidden();
}
+156 -18
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -25,12 +32,16 @@ namespace Espo\Controllers;
use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\NotFound;
class Email extends \Espo\Core\Controllers\Record
{
public function actionGetCopiedAttachments($params, $data, $request)
public function postActionGetCopiedAttachments($params, $data, $request)
{
$id = $request->get('id');
if (empty($data['id'])) {
throw new BadRequest();
}
$id = $data['id'];
return $this->getRecordService()->getCopiedAttachments($id);
}
@@ -41,47 +52,174 @@ class Email extends \Espo\Core\Controllers\Record
throw new BadRequest();
}
if (!$this->getAcl()->checkScope('Email')) {
throw new Forbidden();
}
if (is_null($data['password'])) {
if ($data['type'] == 'preferences') {
if (!$this->getUser()->isAdmin() && $data['id'] != $this->getUser()->id) {
if (!$this->getUser()->isAdmin() && $data['id'] !== $this->getUser()->id) {
throw new Forbidden();
}
$preferences = $this->getEntityManager()->getEntity('Preferences', $data['id']);
if (!$preferences) {
throw new Error();
throw new NotFound();
}
$data['password'] = $this->getContainer()->get('crypt')->decrypt($preferences->get('smtpPassword'));
if (is_null($data['password'])) {
$data['password'] = $this->getContainer()->get('crypt')->decrypt($preferences->get('smtpPassword'));
}
} else if ($data['type'] == 'emailAccount') {
if (!$this->getAcl()->checkScope('EmailAccount')) {
throw new Forbidden();
}
if (!empty($data['id'])) {
$emailAccount = $this->getEntityManager()->getEntity('EmailAccount', $data['id']);
if (!$emailAccount) {
throw new NotFound();
}
if (!$this->getUser()->isAdmin()) {
if ($emailAccount->get('assigniedUserId') !== $this->getUser()->id) {
throw new Forbidden();
}
}
if (is_null($data['password'])) {
$data['password'] = $this->getContainer()->get('crypt')->decrypt($emailAccount->get('smtpPassword'));
}
}
} else {
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
$data['password'] = $this->getConfig()->get('smtpPassword');
if (is_null($data['password'])) {
$data['password'] = $this->getConfig()->get('smtpPassword');
}
}
}
return $this->getRecordService()->sendTestEmail($data);
}
public function actionMarkAsRead($params, $data, $request)
public function postActionMarkAsRead($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
if (empty($data['ids']) || !is_array($data['ids'])) {
throw new BadRequest();
}
$ids = $data['ids'];
return $this->getRecordService()->markAsReadByIds($ids);
return $this->getRecordService()->markAsReadByIdList($ids);
}
public function actionMarkAllAsRead($params, $data, $request)
public function postActionMarkAsNotRead($params, $data, $request)
{
if (!$request->isPost()) {
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->markAsNotReadByIdList($ids);
}
public function postActionMarkAllAsRead($params, $data, $request)
{
return $this->getRecordService()->markAllAsRead();
}
public function postActionMarkAsImportant($params, $data, $request)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->markAsImportantByIdList($ids);
}
public function postActionMarkAsNotImportant($params, $data, $request)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->markAsNotImportantByIdList($ids);
}
public function postActionMoveToTrash($params, $data)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->moveToTrashByIdList($ids);
}
public function postActionRetrieveFromTrash($params, $data)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->retrieveFromTrashByIdList($ids);
}
public function getActionGetFoldersNotReadCounts(&$params, $request, $data)
{
return $this->getRecordService()->getFoldersNotReadCounts();
}
protected function fetchListParamsFromRequest(&$params, $request, $data)
{
parent::fetchListParamsFromRequest($params, $request, $data);
$folderId = $request->get('folderId');
if ($folderId) {
$params['folderId'] = $request->get('folderId');
}
}
public function postActionMoveToFolder($params, $data)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
if (empty($data['folderId'])) {
throw new BadRequest();
}
return $this->getRecordService()->markAllAsRead();
return $this->getRecordService()->moveToFolderByIdList($ids, $data['folderId']);
}
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+16 -1
View File
@@ -18,14 +18,29 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Forbidden;
class EmailAddress extends \Espo\Core\Controllers\Record
{
public function actionSearchInAddressBook($params, $data, $request)
{
if (!$this->getAcl()->checkScope('Email')) {
throw new Forbidden();
}
if (!$this->getAcl()->checkScope('Email', 'create')) {
throw new Forbidden();
}
$q = $request->get('q');
$limit = intval($request->get('limit'));
if (empty($limit) || $limit > 30) {
@@ -0,0 +1,36 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
class EmailFilter extends \Espo\Core\Controllers\Record
{
}
@@ -0,0 +1,63 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\BadRequest;
class EmailFolder extends \Espo\Core\Controllers\Record
{
public function postActionMoveUp($params, $data, $request)
{
if (empty($data['id'])) {
throw new BadRequest();
}
$this->getRecordService()->moveUp($data['id']);
return true;
}
public function postActionMoveDown($params, $data, $request)
{
if (empty($data['id'])) {
throw new BadRequest();
}
$this->getRecordService()->moveDown($data['id']);
return true;
}
public function getActionListAll()
{
return $this->getRecordService()->listAll();
}
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+68 -9
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -62,20 +69,29 @@ class EntityManager extends \Espo\Core\Controllers\Base
if (!empty($data['stream'])) {
$params['stream'] = $data['stream'];
}
if (!empty($data['disabled'])) {
$params['disabled'] = $data['disabled'];
}
if (!empty($data['sortBy'])) {
$params['sortBy'] = $data['sortBy'];
}
if (!empty($data['sortDirection'])) {
$params['asc'] = $data['sortDirection'] === 'asc';
}
if (isset($data['textFilterFields']) && is_array($data['textFilterFields'])) {
$params['textFilterFields'] = $data['textFilterFields'];
}
$result = $this->getContainer()->get('entityManagerUtil')->create($name, $type, $params);
if ($result) {
$tabList = $this->getConfig()->get('tabList', []);
$tabList[] = $name;
$this->getConfig()->set('tabList', $tabList);
$this->getConfig()->save();
if (!in_array($name, $tabList)) {
$tabList[] = $name;
$this->getConfig()->set('tabList', $tabList);
$this->getConfig()->save();
}
$this->getContainer()->get('dataManager')->rebuild();
} else {
@@ -158,15 +174,38 @@ class EntityManager extends \Espo\Core\Controllers\Base
'linkType'
];
$d = array();
$additionalParamList = [
'relationName',
];
$params = array();
foreach ($paramList as $item) {
if (empty($data[$item])) {
throw new BadRequest();
}
$d[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
}
$result = $this->getContainer()->get('entityManagerUtil')->createLink($d);
foreach ($additionalParamList as $item) {
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
}
if (array_key_exists('linkMultipleField', $data)) {
$params['linkMultipleField'] = $data['linkMultipleField'];
}
if (array_key_exists('linkMultipleFieldForeign', $data)) {
$params['linkMultipleFieldForeign'] = $data['linkMultipleFieldForeign'];
}
if (array_key_exists('audited', $data)) {
$params['audited'] = $data['audited'];
}
if (array_key_exists('auditedForeign', $data)) {
$params['auditedForeign'] = $data['auditedForeign'];
}
$result = $this->getContainer()->get('entityManagerUtil')->createLink($params);
if ($result) {
$this->getContainer()->get('dataManager')->rebuild();
@@ -192,12 +231,32 @@ class EntityManager extends \Espo\Core\Controllers\Base
'labelForeign'
];
$d = array();
$additionalParamList = [];
$params = array();
foreach ($paramList as $item) {
$d[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
}
$result = $this->getContainer()->get('entityManagerUtil')->updateLink($d);
foreach ($additionalParamList as $item) {
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
}
if (array_key_exists('linkMultipleField', $data)) {
$params['linkMultipleField'] = $data['linkMultipleField'];
}
if (array_key_exists('linkMultipleFieldForeign', $data)) {
$params['linkMultipleFieldForeign'] = $data['linkMultipleFieldForeign'];
}
if (array_key_exists('audited', $data)) {
$params['audited'] = $data['audited'];
}
if (array_key_exists('auditedForeign', $data)) {
$params['auditedForeign'] = $data['auditedForeign'];
}
$result = $this->getContainer()->get('entityManagerUtil')->updateLink($params);
if ($result) {
$this->getContainer()->get('dataManager')->clearCache();
+12 -5
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -87,17 +94,17 @@ class Extension extends \Espo\Core\Controllers\Record
return true;
}
public function actionCreate($params, $data)
public function actionCreate($params, $data, $request)
{
throw new Forbidden();
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
throw new Forbidden();
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
throw new Forbidden();
}
@@ -132,12 +139,12 @@ class Extension extends \Espo\Core\Controllers\Record
throw new Forbidden();
}
public function actionCreateLink($params, $data)
public function actionCreateLink($params, $data, $request)
{
throw new Forbidden();
}
public function actionRemoveLink($params, $data)
public function actionRemoveLink($params, $data, $request)
{
throw new Forbidden();
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -30,6 +37,13 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
{
public static $defaultAction = 'list';
protected function checkControllerAccess()
{
if (!$this->getAcl()->checkScope('ExternalAccount')) {
throw new Forbidden();
}
}
public function actionList($params, $data, $request)
{
$integrations = $this->getEntityManager()->getRepository('Integration')->find();
@@ -85,7 +99,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
public function actionPatch($params, $data, $request)
{
if (!$request->isPost() && !$request->isPatch()) {
if (!$request->isPut() && !$request->isPost() && !$request->isPatch()) {
throw new BadRequest();
}
+39 -7
View File
@@ -18,13 +18,21 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error,
\Espo\Core\Exceptions\Forbidden,
\Espo\Core\Exceptions\NotFound;
\Espo\Core\Exceptions\NotFound,
\Espo\Core\Exceptions\BadRequest;
class FieldManager extends \Espo\Core\Controllers\Base
{
@@ -37,19 +45,23 @@ class FieldManager extends \Espo\Core\Controllers\Base
public function actionRead($params, $data)
{
if (empty($params['scope']) || empty($params['name'])) {
throw new BadRequest();
}
$data = $this->getContainer()->get('fieldManager')->read($params['name'], $params['scope']);
if (!isset($data)) {
throw new NotFound();
throw new BadRequest();
}
return $data;
}
public function actionCreate($params, $data)
public function postActionCreate($params, $data)
{
if (empty($data['name'])) {
throw new Error("Field 'name' cannnot be empty");
if (empty($params['scope']) || empty($data['name'])) {
throw new BadRequest();
}
$fieldManager = $this->getContainer()->get('fieldManager');
@@ -65,8 +77,12 @@ class FieldManager extends \Espo\Core\Controllers\Base
return $fieldManager->read($data['name'], $params['scope']);
}
public function actionUpdate($params, $data)
public function putActionUpdate($params, $data)
{
if (empty($params['scope']) || empty($params['name'])) {
throw new BadRequest();
}
$fieldManager = $this->getContainer()->get('fieldManager');
$fieldManager->update($params['name'], $data, $params['scope']);
@@ -79,8 +95,12 @@ class FieldManager extends \Espo\Core\Controllers\Base
return $fieldManager->read($params['name'], $params['scope']);
}
public function actionDelete($params, $data)
public function deleteActionDelete($params, $data)
{
if (empty($params['scope']) || empty($params['name'])) {
throw new BadRequest();
}
$res = $this->getContainer()->get('fieldManager')->delete($params['name'], $params['scope']);
$this->getContainer()->get('dataManager')->rebuildMetadata();
@@ -88,5 +108,17 @@ class FieldManager extends \Espo\Core\Controllers\Base
return $res;
}
public function postActionResetToDefault($params, $data)
{
if (empty($data['scope']) || empty($data['name'])) {
throw new BadRequest();
}
$this->getContainer()->get('fieldManager')->resetToDefault($data['name'], $data['scope']);
$this->getContainer()->get('dataManager')->rebuildMetadata();
return true;
}
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -29,7 +36,7 @@ class GlobalSearch extends \Espo\Core\Controllers\Base
{
public function actionSearch($params, $data, $request)
{
$query = $params['query'];
$query = $request->get('q');
$offset = intval($request->get('offset'));
$maxSize = intval($request->get('maxSize'));
+7 -1
View File
@@ -18,13 +18,19 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
class I18n extends \Espo\Core\Controllers\Base
{
public function actionRead($params, $data)
{
return $this->getContainer()->get('language')->getAll();
+67 -5
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -36,12 +43,12 @@ class Import extends \Espo\Core\Controllers\Record
}
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
throw new BadRequest();
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
throw new BadRequest();
}
@@ -51,12 +58,12 @@ class Import extends \Espo\Core\Controllers\Record
throw new BadRequest();
}
public function actionCreateLink($params, $data)
public function actionCreateLink($params, $data, $request)
{
throw new BadRequest();
}
public function actionRemoveLink($params, $data)
public function actionRemoveLink($params, $data, $request)
{
throw new BadRequest();
}
@@ -120,8 +127,48 @@ class Import extends \Espo\Core\Controllers\Record
throw new BadRequest();
}
if (!isset($data['fieldDelimiter'])) {
throw new BadRequest();
}
if (!isset($data['textQualifier'])) {
throw new BadRequest();
}
if (!isset($data['dateFormat'])) {
throw new BadRequest();
}
if (!isset($data['timeFormat'])) {
throw new BadRequest();
}
if (!isset($data['personNameFormat'])) {
throw new BadRequest();
}
if (!isset($data['decimalMark'])) {
throw new BadRequest();
}
if (!isset($data['defaultValues'])) {
throw new BadRequest();
}
if (!isset($data['action'])) {
throw new BadRequest();
}
if (!isset($data['attachmentId'])) {
throw new BadRequest();
}
if (!isset($data['entityType'])) {
throw new BadRequest();
}
$importParams = array(
'headerRow' => $data['headerRow'],
'headerRow' => !empty($data['headerRow']),
'fieldDelimiter' => $data['fieldDelimiter'],
'textQualifier' => $data['textQualifier'],
'dateFormat' => $data['dateFormat'],
@@ -131,8 +178,14 @@ class Import extends \Espo\Core\Controllers\Record
'currency' => $data['currency'],
'defaultValues' => $data['defaultValues'],
'action' => $data['action'],
'skipDuplicateChecking' => !empty($data['skipDuplicateChecking']),
'idleMode' => !empty($data['idleMode'])
);
if (array_key_exists('updateBy', $data)) {
$importParams['updateBy'] = $data['updateBy'];
}
$attachmentId = $data['attachmentId'];
if (!$this->getAcl()->check($data['entityType'], 'edit')) {
@@ -141,5 +194,14 @@ class Import extends \Espo\Core\Controllers\Record
return $this->getService('Import')->import($data['entityType'], $data['fields'], $attachmentId, $importParams);
}
public function postActionUnmarkAsDuplicate($params, $data)
{
if (empty($data['id']) || empty($data['entityType']) || empty($data['entityId'])) {
throw new BadRequest();
}
$this->getService('Import')->unmarkAsDuplicate($data['id'], $data['entityType'], $data['entityId']);
return true;
}
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -60,6 +67,19 @@ class Integration extends \Espo\Core\Controllers\Record
$entity->set($data);
$this->getEntityManager()->saveEntity($entity);
$integrationsConfigData = $this->getConfig()->get('integrations');
if (!$integrationsConfigData || !($integrationsConfigData instanceof \StdClass)) {
$integrationsConfigData = (object)[];
}
$integrationName = $params['id'];
$integrationsConfigData->$integrationName = $entity->get('enabled');
$this->getConfig()->set('integrations', $integrationsConfigData);
$this->getConfig()->save();
return $entity->toArray();
}
}
+12 -5
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -34,17 +41,17 @@ class Job extends \Espo\Core\Controllers\Record
}
}
public function actionCreate($params, $data)
public function actionCreate($params, $data, $request)
{
throw new Forbidden();
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
throw new Forbidden();
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
throw new Forbidden();
}
@@ -59,12 +66,12 @@ class Job extends \Espo\Core\Controllers\Record
throw new Forbidden();
}
public function actionCreateLink($params, $data)
public function actionCreateLink($params, $data, $request)
{
throw new Forbidden();
}
public function actionRemoveLink($params, $data)
public function actionRemoveLink($params, $data, $request)
{
throw new Forbidden();
}
+7
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+8 -1
View File
@@ -18,7 +18,14 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+35 -4
View File
@@ -18,29 +18,35 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error;
class Notification extends \Espo\Core\Controllers\Base
class Notification extends \Espo\Core\Controllers\Record
{
public static $defaultAction = 'list';
public function actionList($params, $data, $request)
{
$scope = $params['scope'];
$id = $params['id'];
$userId = $this->getUser()->id;
$offset = intval($request->get('offset'));
$maxSize = intval($request->get('maxSize'));
$after = $request->get('after');
$params = array(
'offset' => $offset,
'maxSize' => $maxSize,
'after' => $after
);
$result = $this->getService('Notification')->getList($userId, $params);
@@ -62,5 +68,30 @@ class Notification extends \Espo\Core\Controllers\Base
$userId = $this->getUser()->id;
return $this->getService('Notification')->markAllRead($userId);
}
public function actionExport($params, $data, $request)
{
throw new Error();
}
public function actionMassUpdate($params, $data, $request)
{
throw new Error();
}
public function actionCreateLink($params, $data, $request)
{
throw new Error();
}
public function actionRemoveLink($params, $data, $request)
{
throw new Error();
}
public function actionMerge($params, $data, $request)
{
throw new Error();
}
}
+43
View File
@@ -0,0 +1,43 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Forbidden;
class Portal extends \Espo\Core\Controllers\Record
{
protected function checkControllerAccess()
{
$portalPermission = $this->getAcl()->get('portalPermission');
if (!$portalPermission || $portalPermission === 'no') {
throw new Forbidden();
}
}
}
@@ -0,0 +1,34 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
class PortalRole extends \Espo\Core\Controllers\Record
{
}
+21 -1
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -77,10 +84,18 @@ class Preferences extends \Espo\Core\Controllers\Base
$userId = $params['id'];
$this->handleUserAccess($userId);
if (!$request->isPost() && !$request->isPatch()) {
if (!$request->isPost() && !$request->isPatch() && !$request->isPut()) {
throw new BadRequest();
}
if ($this->getAcl()->getLevel('Preferences', 'read') === 'no') {
throw new Forbidden();
}
foreach ($this->getAcl()->getScopeForbiddenAttributeList('Preferences', 'edit') as $attribute) {
unset($data[$attribute]);
}
if (array_key_exists('smtpPassword', $data)) {
$data['smtpPassword'] = $this->getCrypt()->encrypt($data['smtpPassword']);
}
@@ -117,9 +132,14 @@ class Preferences extends \Espo\Core\Controllers\Base
$entity->set('smtpEmailAddress', $user->get('emailAddress'));
$entity->set('name', $user->get('name'));
$entity->set('isPortalUser', $user->get('isPortalUser'));
$entity->clear('smtpPassword');
foreach ($this->getAcl()->getScopeForbiddenAttributeList('Preferences', 'read') as $attribute) {
$entity->clear($attribute);
}
return $entity->toArray();
}
}
+8 -3
View File
@@ -18,12 +18,17 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
class Role extends \Espo\Core\Controllers\Record
{
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+34 -1
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -30,7 +37,11 @@ class Settings extends \Espo\Core\Controllers\Base
{
protected function getConfigData()
{
$data = $this->getConfig()->getData($this->getUser()->isAdmin());
if ($this->getUser()->id == 'system') {
$data = $this->getConfig()->getData();
} else {
$data = $this->getConfig()->getData($this->getUser()->isAdmin());
}
$fieldDefs = $this->getMetadata()->get('entityDefs.Settings.fields');
@@ -39,6 +50,9 @@ class Settings extends \Espo\Core\Controllers\Base
unset($data[$field]);
}
}
$data['jsLibs'] = $this->getMetadata()->get('app.jsLibs');
return $data;
}
@@ -80,4 +94,23 @@ class Settings extends \Espo\Core\Controllers\Base
return $this->getConfigData();
}
public function postActionTestLdapConnection($params, $data)
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
if (!isset($data['password'])) {
$data['password'] = $this->getConfig()->get('ldapPassword');
}
$ldapUtils = new \Espo\Core\Utils\Authentication\LDAP\Utils();
$options = $ldapUtils->normalizeOptions($data);
$ldapClient = new \Espo\Core\Utils\Authentication\LDAP\Client($options);
$ldapClient->bind(); //an exception if no connection
return true;
}
}
+8 -1
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -26,7 +33,7 @@ use \Espo\Core\Exceptions\Error;
class Stream extends \Espo\Core\Controllers\Base
{
const MAX_SIZE_LIMIT = 400;
const MAX_SIZE_LIMIT = 200;
public static $defaultAction = 'list';
+7
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
+20 -15
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Controllers;
@@ -48,22 +55,16 @@ class User extends \Espo\Core\Controllers\Record
return $this->getAclManager()->getMap($user);
}
public function actionChangeOwnPassword($params, $data, $request)
public function postActionChangeOwnPassword($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
if (!array_key_exists('password', $data) || !array_key_exists('currentPassword', $data)) {
throw new BadRequest();
}
return $this->getService('User')->changePassword($this->getUser()->id, $data['password'], true, $data['currentPassword']);
}
public function actionChangePasswordByRequest($params, $data, $request)
public function postActionChangePasswordByRequest($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
if (empty($data['requestId']) || empty($data['password'])) {
throw new BadRequest();
}
@@ -82,23 +83,27 @@ class User extends \Espo\Core\Controllers\Record
$this->getEntityManager()->removeEntity($p);
return $this->getService('User')->changePassword($userId, $data['password']);
if ($this->getService('User')->changePassword($userId, $data['password'])) {
return array(
'url' => $p->get('url')
);
}
}
public function actionPasswordChangeRequest($params, $data, $request)
public function postActionPasswordChangeRequest($params, $data, $request)
{
if (!$request->isPost()) {
throw new Forbidden();
}
if (empty($data['userName']) || empty($data['emailAddress'])) {
throw new BadRequest();
}
$userName = $data['userName'];
$emailAddress = $data['emailAddress'];
$url = null;
if (!empty($data['url'])) {
$url = $data['url'];
}
return $this->getService('User')->passwordChangeRequest($userName, $emailAddress);
return $this->getService('User')->passwordChangeRequest($userName, $emailAddress, $url);
}
}
+55 -5
View File
@@ -18,17 +18,27 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
use \Espo\ORM\Entity;
use \Espo\Entities\User;
class Acl
{
private $user;
private $aclManager;
public function __construct(AclManager $aclManager, \Espo\Entities\User $user)
public function __construct(AclManager $aclManager, User $user)
{
$this->aclManager = $aclManager;
$this->user = $user;
@@ -69,14 +79,54 @@ class Acl
return $this->getAclManager()->checkReadOnlyOwn($this->getUser(), $scope);
}
public function check($subject, $action = null, $isOwner = null, $inTeam = null)
public function check($subject, $action = null)
{
return $this->getAclManager()->check($this->getUser(), $subject, $action, $isOwner, $inTeam) ;
return $this->getAclManager()->check($this->getUser(), $subject, $action);
}
public function checkScope($scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
public function checkScope($scope, $action = null)
{
return $this->getAclManager()->checkScope($this->getUser(), $scope, $action, $isOwner, $inTeam, $entity) ;
return $this->getAclManager()->checkScope($this->getUser(), $scope, $action);
}
public function checkEntity(Entity $entity, $action = 'read')
{
return $this->getAclManager()->checkEntity($this->getUser(), $entity, $action);
}
public function checkUser($permission, User $entity)
{
return $this->getAclManager()->checkUser($this->getUser(), $permission, $entity);
}
public function checkIsOwner(Entity $entity)
{
return $this->getAclManager()->checkIsOwner($this->getUser(), $entity);
}
public function checkInTeam(Entity $entity)
{
return $this->getAclManager()->checkInTeam($this->getUser(), $entity);
}
public function getScopeForbiddenAttributeList($scope, $action = 'read', $thresholdLevel = 'no')
{
return $this->getAclManager()->getScopeForbiddenAttributeList($this->getUser(), $scope, $action, $thresholdLevel);
}
public function getScopeForbiddenFieldList($scope, $action = 'read', $thresholdLevel = 'no')
{
return $this->getAclManager()->getScopeForbiddenFieldList($this->getUser(), $scope, $action, $thresholdLevel);
}
public function checkUserPermission($target, $permissionType = 'userPermission')
{
return $this->getAclManager()->checkUserPermission($this->getUser(), $target, $permissionType);
}
public function checkAssignmentPermission($target)
{
return $this->getAclManager()->checkAssignmentPermission($this->getUser(), $target);
}
}
+128 -78
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Acl;
@@ -35,6 +42,8 @@ class Base implements Injectable
'aclManager'
);
protected $scope;
protected $injections = array();
public function inject($name, $object)
@@ -42,9 +51,10 @@ class Base implements Injectable
$this->injections[$name] = $object;
}
public function __construct()
public function __construct($scope)
{
$this->init();
$this->scope = $scope;
}
protected function init()
@@ -56,6 +66,13 @@ class Base implements Injectable
return $this->injections[$name];
}
protected function addDependencyList(array $list)
{
foreach ($list as $item) {
$this->addDependency($item);
}
}
protected function addDependency($name)
{
$this->dependencies[] = $name;
@@ -81,29 +98,36 @@ class Base implements Injectable
return $this->getInjection('aclManager');
}
public function checkReadOnlyTeam(User $user, $scope, $data)
public function checkReadOnlyTeam(User $user, $data)
{
if (empty($data) || !is_array($data) || !isset($data['read'])) {
if (empty($data) || !is_object($data) || !isset($data->read)) {
return false;
}
return $data['read'] === 'team';
return $data->read === 'team';
}
public function checkReadOnlyOwn(User $user, $scope, $data)
public function checkReadOnlyOwn(User $user, $data)
{
if (empty($data) || !is_array($data) || !isset($data['read'])) {
if (empty($data) || !is_object($data) || !isset($data->read)) {
return false;
}
return $data['read'] === 'own';
return $data->read === 'own';
}
public function checkEntity(User $user, Entity $entity, $data, $action)
{
return $this->checkScope($user, $data, $entity->getEntityType(), $action, null, null, $entity);
if ($user->isAdmin()) {
return true;
}
return $this->checkScope($user, $data, $action, $entity);
}
public function checkScope(User $user, $data, $scope, $action = null, $isOwner = null, $inTeam = null, Entity $entity = null)
public function checkScope(User $user, $data, $action = null, Entity $entity = null, $entityAccessData = array())
{
if ($user->isAdmin()) {
return true;
}
if (is_null($data)) {
return false;
}
@@ -113,82 +137,103 @@ class Base implements Injectable
if ($data === true) {
return true;
}
if (!is_null($action)) {
if (array_key_exists($action, $data)) {
$value = $data[$action];
if ($value === 'all' || $value === true) {
return true;
}
if (!$value || $value === 'no') {
return false;
}
if (is_null($isOwner)) {
if ($entity) {
$isOwner = $this->checkIsOwner($user, $entity);
} else {
return true;
}
}
if ($isOwner) {
if ($value === 'own' || $value === 'team') {
return true;
}
}
if (is_null($inTeam) && $entity) {
$inTeam = $this->checkInTeam($user, $entity);
}
if ($inTeam) {
if ($value === 'team') {
return true;
}
}
return false;
}
if (is_string($data)) {
return true;
}
return true;
}
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('assignedUserId')) {
if ($user->id === $entity->get('assignedUserId')) {
$isOwner = null;
if (isset($entityAccessData['isOwner'])) {
$isOwner = $entityAccessData['isOwner'];
}
$inTeam = null;
if (isset($entityAccessData['inTeam'])) {
$inTeam = $entityAccessData['inTeam'];
}
if (is_null($action)) {
return true;
}
if (!isset($data->$action)) {
return false;
}
$value = $data->$action;
if ($value === 'all' || $value === 'yes' || $value === true) {
return true;
}
if (!$value || $value === 'no') {
return false;
}
if (is_null($isOwner)) {
if ($entity) {
$isOwner = $this->checkIsOwner($user, $entity);
} else {
return true;
}
}
if ($entity->has('createdById')) {
if ($user->id === $entity->get('createdById')) {
if ($isOwner) {
if ($value === 'own' || $value === 'team') {
return true;
}
}
if (is_null($inTeam) && $entity) {
$inTeam = $this->checkInTeam($user, $entity);
}
if ($inTeam) {
if ($value === 'team') {
return true;
}
}
return false;
}
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->hasAttribute('assignedUserId')) {
if ($entity->has('assignedUserId')) {
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
}
} else if ($entity->hasAttribute('createdById')) {
if ($entity->has('createdById')) {
if ($user->id === $entity->get('createdById')) {
return true;
}
}
}
if ($entity->hasAttribute('assignedUsersIds') && $entity->hasRelation('assignedUsers')) {
if ($entity->hasLinkMultipleId('assignedUsers', $user->id)) {
return true;
}
}
return false;
}
public function checkInTeam(User $user, Entity $entity)
{
$userTeamIds = $user->get('teamsIds');
$userTeamIdList = $user->getLinkMultipleIdList('teams');
if (!$entity->hasRelation('teams') || !$entity->hasField('teamsIds')) {
if (!$entity->hasRelation('teams') || !$entity->hasAttribute('teamsIds')) {
return false;
}
if (!$entity->has('teamsIds')) {
$entity->loadLinkMultipleField('teams');
}
$entityTeamIdList = $entity->getLinkMultipleIdList('teams');
$teamIds = $entity->get('teamsIds');
if (empty($teamIds)) {
if (empty($entityTeamIdList)) {
return false;
}
foreach ($userTeamIds as $id) {
if (in_array($id, $teamIds)) {
foreach ($userTeamIdList as $id) {
if (in_array($id, $entityTeamIdList)) {
return true;
}
}
@@ -197,27 +242,32 @@ class Base implements Injectable
public function checkEntityDelete(User $user, Entity $entity, $data)
{
$result = $this->checkEntity($user, $entity, $data, 'delete');
if (!$result) {
if (is_array($data)) {
if ($data['edit'] != 'no') {
if ($entity->has('createdById') && $entity->get('createdById') == $user->id) {
if (!$entity->has('assignedUserId')) {
if ($user->isAdmin()) {
return true;
}
if ($this->checkEntity($user, $entity, $data, 'delete')) {
return true;
}
if (is_object($data)) {
if ($data->edit !== 'no' || $data->create !== 'no') {
if ($entity->has('createdById') && $entity->get('createdById') == $user->id) {
if (!$entity->has('assignedUserId')) {
return true;
} else {
if (!$entity->get('assignedUserId')) {
return true;
}
if ($entity->get('assignedUserId') == $entity->get('createdById')) {
return true;
} else {
if (!$entity->get('assignedUserId')) {
return true;
}
if ($entity->get('assignedUserId') == $entity->get('createdById')) {
return true;
}
}
}
}
}
}
return $result;
return false;
}
}
+560 -85
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Acl;
@@ -25,54 +32,114 @@ namespace Espo\Core\Acl;
use \Espo\Core\Exceptions\Error;
use \Espo\ORM\Entity;
use \Espo\Entities\User;
use \Espo\Core\Utils\Config;
use \Espo\Core\Utils\Metadata;
use \Espo\Core\Utils\FieldManager;
use \Espo\Core\Utils\File\Manager as FileManager;
class Table
{
private $data = array(
'table' => array()
protected $type = 'acl';
protected $defaultAclType = 'recordAllTeamOwnNo';
private $data = null;
protected $cacheFilePath;
protected $actionList = ['read', 'stream', 'edit', 'delete', 'create'];
protected $booleanActionList = ['create'];
protected $levelList = ['yes', 'all', 'team', 'own', 'no'];
protected $fieldActionList = ['read', 'edit'];
protected $fieldLevelList = ['yes', 'no'];
protected $valuePermissionList = ['assignmentPermission', 'userPermission', 'portalPermission'];
protected $valuePrtmissionHighestLevels = array(
'assignmentPermission' => 'all',
'userPermission' => 'all',
'portalPermission' => 'yes'
);
private $cacheFile;
private $fileManager;
private $actionList = ['read', 'edit', 'delete'];
private $metadata;
private $levelList = ['all', 'team', 'own', 'no'];
private $fieldManager;
protected $fileManager;
protected $forbiddenAttributesCache = array();
protected $metadata;
protected $forbiddenFieldsCache = array();
public function __construct(\Espo\Entities\User $user, $config = null, $fileManager = null, $metadata = null)
public function __construct(User $user, Config $config = null, FileManager $fileManager = null, Metadata $metadata = null, FieldManager $fieldManager = null)
{
$this->data = (object) [
'table' => (object) [],
'fieldTable' => (object) [],
'fieldTableQuickAccess' => (object) [],
];
$this->user = $user;
$this->metadata = $metadata;
if (!$this->user->isFetched()) {
throw new Error();
if ($fieldManager) {
$this->fieldManager = $fieldManager;
}
$this->user->loadLinkMultipleField('teams');
if (!$this->user->isFetched()) {
throw new Error('User must be fetched before ACL check.');
}
if ($fileManager) {
$this->fileManager = $fileManager;
}
$this->valuePermissionList = $this->metadata->get('app.' . $this->type . '.defs.valuePermissionList', $this->valuePermissionList);
$this->cacheFile = 'data/cache/application/acl/' . $user->id . '.php';
$this->initCacheFilePath();
if ($config && $config->get('useCache') && file_exists($this->cacheFile)) {
$cached = include $this->cacheFile;
if ($config && $config->get('useCache') && file_exists($this->cacheFilePath)) {
$cached = include $this->cacheFilePath;
$this->data = $cached;
$this->initSolid();
} else {
$this->load();
$this->initSolid();
if ($config && $fileManager && $config->get('useCache')) {
$this->buildCache();
}
}
}
protected function initCacheFilePath()
{
$this->cacheFilePath = 'data/cache/application/acl/' . $this->getUser()->id . '.php';
}
protected function getUser()
{
return $this->user;
}
protected function getMetadata()
{
return $this->metadata;
}
protected function getFieldManager()
{
return $this->fieldManager;
}
protected function getConfig()
{
return $this->config;
}
public function getMap()
{
return $this->data;
@@ -80,8 +147,13 @@ class Table
public function getScopeData($scope)
{
if (array_key_exists($scope, $this->data['table'])) {
return $this->data['table'][$scope];
if (isset($this->data->table->$scope)) {
$data = $this->data->table->$scope;
if (is_string($data)) {
$data = $this->getScopeData($data);
return $data;
}
return $data;
}
return null;
}
@@ -92,66 +164,392 @@ class Table
return null;
}
if (array_key_exists($permission, $this->data)) {
return $this->data[$permission];
if (isset($this->data->$permission)) {
return $this->data->$permission;
}
return null;
}
public function getLevel($scope, $action)
{
if (array_key_exists($scope, $this->data['table'])) {
if (array_key_exists($action, $this->data['table'][$scope])) {
return $this->data['table'][$scope][$action];
if (isset($this->data->table->$scope)) {
if (isset($this->data->table->$scope->$action)) {
return $this->data->table->$scope->$action;
}
}
return false;
return 'no';
}
private function load()
{
$aclTables = [];
$assignmentPermissionList = [];
$userPermissionList = [];
$userRoles = $this->user->get('roles');
foreach ($userRoles as $role) {
$aclTables[] = $role->get('data');
$assignmentPermissionList[] = $role->get('assignmentPermission');
$userPermissionList[] = $role->get('userPermission');
$valuePermissionLists = (object)[];
foreach ($this->valuePermissionList as $permission) {
$valuePermissionLists->$permission = [];
}
$teams = $this->user->get('teams');
foreach ($teams as $team) {
$teamRoles = $team->get('roles');
foreach ($teamRoles as $role) {
$aclTables[] = $role->get('data');
$assignmentPermissionList[] = $role->get('assignmentPermission');
$userPermissionList[] = $role->get('userPermission');
$aclTableList = [];
$fieldTableList = [];
if (!$this->getUser()->isAdmin()) {
$roleList = $this->getRoleList();
foreach ($roleList as $role) {
$aclTableList[] = $role->get('data');
$fieldTableList[] = $role->get('fieldData');
foreach ($this->valuePermissionList as $permission) {
$valuePermissionLists->{$permission}[] = $role->get($permission);
}
}
$aclTable = $this->mergeTableList($aclTableList);
$fieldTable = $this->mergeFieldTableList($fieldTableList);
$this->applyDefault($aclTable, $fieldTable);
$this->applyDisabled($aclTable, $fieldTable);
$this->applyMandatory($aclTable, $fieldTable);
$this->applyAdditional($aclTable, $fieldTable, $valuePermissionLists);
} else {
$aclTable = (object) [];
foreach ($this->getScopeList() as $scope) {
if ($this->metadata->get("scopes.{$scope}.{$this->type}") === 'boolean') {
$aclTable->$scope = true;
} else {
if ($this->metadata->get("scopes.{$scope}.entity")) {
$aclTable->$scope = (object) [];
foreach ($this->actionList as $action) {
$aclTable->$scope->$action = 'all';
if (in_array($action, $this->booleanActionList)) {
$aclTable->$scope->$action = 'yes';
}
}
}
}
}
$fieldTable = (object) [];
}
foreach ($aclTable as $scope => $data) {
if (is_string($data)) {
if (isset($aclTable->$data)) {
$aclTable->$scope = $aclTable->$data;
}
}
}
$this->data['table'] = $this->merge($aclTables);
$this->data->table = $aclTable;
$this->data->fieldTable = $fieldTable;
$this->data['assignmentPermission'] = $this->mergeValues($assignmentPermissionList, $this->metadata->get('app.acl.valueDefaults.assignmentPermission', 'all'));
$this->data['userPermission'] = $this->mergeValues($userPermissionList, $this->metadata->get('app.acl.valueDefaults.userPermission', 'no'));
$this->fillFieldTableQuickAccess();
if (!$this->getUser()->isAdmin()) {
foreach ($this->valuePermissionList as $permission) {
$this->data->$permission = $this->mergeValueList($valuePermissionLists->$permission, $this->metadata->get('app.'.$this->type.'.default.' . $permission, 'yes'));
if ($this->metadata->get('app.'.$this->type.'.mandatory.' . $permission)) {
$this->data->$permission = $this->metadata->get('app.'.$this->type.'.mandatory.' . $permission);
}
}
} else {
foreach ($this->valuePermissionList as $permission) {
if (isset($this->valuePrtmissionHighestLevels[$permission])) {
$this->data->$permission = $this->valuePrtmissionHighestLevels[$permission];
continue;
}
$this->data->$permission = 'all';
}
}
}
private function initSolid()
protected function getRoleList()
{
if (!$this->metadata) {
$roleList = [];
$userRoleList = $this->getUser()->get('roles');
if (!(is_array($userRoleList) || $userRoleList instanceof \Traversable)) {
throw new Error();
}
foreach ($userRoleList as $role) {
$roleList[] = $role;
}
$teamList = $this->getUser()->get('teams');
if (!(is_array($teamList) || $teamList instanceof \Traversable)) {
throw new Error();
}
foreach ($teamList as $team) {
$teamRoleList = $team->get('roles');
foreach ($teamRoleList as $role) {
$roleList[] = $role;
}
}
return $roleList;
}
public function getScopeForbiddenAttributeList($scope, $action = 'read', $thresholdLevel = 'no')
{
$key = $scope . '_'. $action . '_' . $thresholdLevel;
if (isset($this->forbiddenAttributesCache[$key])) {
return $this->forbiddenAttributesCache[$key];
}
$fieldTableQuickAccess = $this->data->fieldTableQuickAccess;
if (!isset($fieldTableQuickAccess->$scope) || !isset($fieldTableQuickAccess->$scope->attributes) || !isset($fieldTableQuickAccess->$scope->attributes->$action)) {
$this->forbiddenAttributesCache[$key] = [];
return [];
}
$levelList = [];
foreach ($this->fieldLevelList as $level) {
if (array_search($level, $this->fieldLevelList) >= array_search($thresholdLevel, $this->fieldLevelList)) {
$levelList[] = $level;
}
}
$attributeList = [];
foreach ($levelList as $level) {
if (!isset($fieldTableQuickAccess->$scope->attributes->$action->$level)) continue;
foreach ($fieldTableQuickAccess->$scope->attributes->$action->$level as $attribute) {
if (in_array($attribute, $attributeList)) continue;
$attributeList[] = $attribute;
}
}
$this->forbiddenAttributesCache[$key] = $attributeList;
return $attributeList;
}
public function getScopeForbiddenFieldList($scope, $action = 'read', $thresholdLevel = 'no')
{
$key = $scope . '_'. $action . '_' . $thresholdLevel;
if (isset($this->forbiddenFieldsCache[$key])) {
return $this->forbiddenFieldsCache[$key];
}
$fieldTableQuickAccess = $this->data->fieldTableQuickAccess;
if (!isset($fieldTableQuickAccess->$scope) || !isset($fieldTableQuickAccess->$scope->fields) || !isset($fieldTableQuickAccess->$scope->fields->$action)) {
$this->forbiddenFieldsCache[$key] = [];
return [];
}
$levelList = [];
foreach ($this->fieldLevelList as $level) {
if (array_search($level, $this->fieldLevelList) >= array_search($thresholdLevel, $this->fieldLevelList)) {
$levelList[] = $level;
}
}
$fieldList = [];
foreach ($levelList as $level) {
if (!isset($fieldTableQuickAccess->$scope->fields->$action->$level)) continue;
foreach ($fieldTableQuickAccess->$scope->fields->$action->$level as $field) {
if (in_array($field, $fieldList)) continue;
$fieldList[] = $field;
}
}
$this->forbiddenFieldsCache[$key] = $fieldList;
return $fieldList;
}
protected function fillFieldTableQuickAccess()
{
$fieldTable = $this->data->fieldTable;
$fieldTableQuickAccess = (object) [];
foreach (get_object_vars($fieldTable) as $scope => $scopeData) {
$fieldTableQuickAccess->$scope = (object) [
'attributes' => (object) [],
'fields' => (object) []
];
foreach ($this->fieldActionList as $action) {
$fieldTableQuickAccess->$scope->attributes->$action = (object) [];
$fieldTableQuickAccess->$scope->fields->$action = (object) [];
foreach ($this->fieldLevelList as $level) {
$fieldTableQuickAccess->$scope->attributes->$action->$level = [];
$fieldTableQuickAccess->$scope->fields->$action->$level = [];
}
}
foreach (get_object_vars($scopeData) as $field => $fieldData) {
$attributeList = $this->getFieldManager()->getAttributeList($scope, $field);
foreach ($this->fieldActionList as $action) {
if (!isset($fieldData->$action)) continue;
foreach ($this->fieldLevelList as $level) {
if ($fieldData->$action === $level) {
$fieldTableQuickAccess->$scope->fields->$action->{$level}[] = $field;
foreach ($attributeList as $attribute) {
$fieldTableQuickAccess->$scope->attributes->$action->{$level}[] = $attribute;
}
}
}
}
}
}
$this->data->fieldTableQuickAccess = $fieldTableQuickAccess;
}
protected function applyDefault(&$table, &$fieldTable)
{
if ($this->getUser()->isAdmin()) {
return;
}
$data = $this->metadata->get('app.acl.solid', array());
$data = $this->metadata->get('app.'.$this->type.'.default.scopeLevel', array());
foreach ($data as $entityType => $item) {
$this->data['table'][$entityType] = $item;
foreach ($data as $scope => $item) {
if (isset($table->$scope)) continue;
$value = $item;
if (is_array($item)) {
$value = (object) $item;
}
$table->$scope = $value;
}
$defaultFieldData = $this->metadata->get('app.'.$this->type.'.default.fieldLevel', array());
foreach ($this->getScopeList() as $scope) {
if (isset($table->$scope) && $table->$scope === false) continue;
if (!$this->getMetadata()->get('scopes.' . $scope . '.entity')) continue;
$fieldList = array_keys($this->getMetadata()->get("entityDefs.{$scope}.fields", []));
$defaultScopeFieldData = $this->metadata->get('app.'.$this->type.'.default.scopeFieldLevel.' . $scope, array());
foreach (array_merge($defaultFieldData, $defaultScopeFieldData) as $field => $f) {
if (!in_array($field, $fieldList)) continue;
if (!isset($fieldTable->$scope)) {
$fieldTable->$scope = (object) [];
}
if (isset($fieldTable->$scope->$field)) continue;
$fieldTable->$scope->$field = (object) [];
foreach ($this->fieldActionList as $action) {
$level = 'no';
if ($f === true) {
$level = 'yes';
} else {
if (is_array($f) && isset($f[$action])) {
$level = $f[$action];
}
}
$fieldTable->$scope->$field->$action = $level;
}
}
}
foreach ($this->getScopeWithAclList() as $scope) {
if (!isset($table->$scope)) {
$aclType = $this->metadata->get('scopes.' . $scope . '.' . $this->type);
if ($aclType === true) {
$aclType = $this->defaultAclType;
}
if (!empty($aclType)) {
$defaultValue = $this->metadata->get('app.'.$this->type.'.scopeLevelTypesDefaults.' . $aclType, $this->metadata->get('app.'.$this->type.'.scopeLevelTypesDefaults.record'));
if (is_array($defaultValue)) {
$defaultValue = (object) $defaultValue;
}
$table->$scope = $defaultValue;
if (is_object($table->$scope)) {
$actionList = $this->getMetadata()->get(['scopes', $scope, $this->type . 'ActionList']);
if ($actionList) {
foreach (get_object_vars($table->$scope) as $action => $level) {
if (!in_array($action, $actionList)) {
unset($table->$scope->$action);
}
}
}
}
}
}
}
}
private function mergeValues(array $list, $defaultValue)
protected function applyMandatory(&$table, &$fieldTable)
{
if ($this->getUser()->isAdmin()) {
return;
}
$data = $this->metadata->get('app.'.$this->type.'.mandatory.scopeLevel', array());
foreach ($data as $scope => $item) {
$value = $item;
if (is_array($item)) {
$value = (object) $item;
}
$table->$scope = $value;
}
$mandatoryFieldData = $this->metadata->get('app.'.$this->type.'.mandatory.fieldLevel', array());
foreach ($this->getScopeList() as $scope) {
if (isset($table->$scope) && $table->$scope === false) continue;
if (!$this->getMetadata()->get('scopes.' . $scope . '.entity')) continue;
$fieldList = array_keys($this->getMetadata()->get("entityDefs.{$scope}.fields", []));
$mandatoryScopeFieldData = $this->metadata->get('app.'.$this->type.'.mandatory.scopeFieldLevel.' . $scope, array());
foreach (array_merge($mandatoryFieldData, $mandatoryScopeFieldData) as $field => $f) {
if (!in_array($field, $fieldList)) continue;
if (!isset($fieldTable->$scope)) {
$fieldTable->$scope = (object) [];
}
$fieldTable->$scope->$field = (object) [];
foreach ($this->fieldActionList as $action) {
$level = 'no';
if ($f === true) {
$level = 'yes';
} else {
if (is_array($f) && isset($f[$action])) {
$level = $f[$action];
}
}
$fieldTable->$scope->$field->$action = $level;
}
}
}
}
protected function applyDisabled(&$table, &$fieldTable)
{
if ($this->getUser()->isAdmin()) {
return;
}
foreach ($this->getScopeList() as $scope) {
if ($this->getMetadata()->get('scopes.' . $scope . '.disabled')) {
$table->$scope = false;
unset($fieldTable->$scope);
}
}
}
protected function applyAdditional(&$table, &$fieldTable, &$valuePermissionLists)
{
if ($this->getUser()->get('isPortalUser')) {
foreach ($this->getScopeList() as $scope) {
$table->$scope = false;
unset($fieldTable->$scope);
}
foreach ($this->valuePermissionList as $permission) {
$valuePermissionLists->{$permission}[] = 'no';
}
}
}
private function mergeValueList(array $list, $defaultValue)
{
$result = null;
foreach ($list as $level) {
@@ -171,51 +569,76 @@ class Table
return $result;
}
private function getScopeList()
protected function getScopeWithAclList()
{
$scopeList = [];
$scopes = $this->metadata->get('scopes');
foreach ($scopes as $scope => $d) {
if (!empty($d['acl'])) {
$scopeList[] = $scope;
}
if (empty($d['acl'])) continue;
$scopeList[] = $scope;
}
return $scopeList;
}
private function merge($tables)
protected function getScopeList()
{
$data = array();
$scopeList = $this->getScopeList();
$scopeList = [];
$scopes = $this->metadata->get('scopes');
foreach ($scopes as $scope => $d) {
$scopeList[] = $scope;
}
return $scopeList;
}
foreach ($tables as $table) {
private function mergeTableList(array $tableList)
{
$data = (object) [];
$scopeList = $this->getScopeWithAclList();
foreach ($tableList as $table) {
foreach ($scopeList as $scope) {
if (!isset($table->$scope)) {
continue;
}
if (!isset($table->$scope)) continue;
$row = $table->$scope;
if ($row == false) {
if (!isset($data[$scope])) {
$data[$scope] = false;
if (!isset($data->$scope)) {
$data->$scope = false;
}
} else if ($row === true) {
$data[$scope] = true;
$data->$scope = true;
} else {
if (!isset($data[$scope])) {
$data[$scope] = array();
if (!isset($data->$scope)) {
$data->$scope = (object) [];
}
if ($data[$scope] == false) {
$data[$scope] = array();
if ($data->$scope === false) {
$data->$scope = (object) [];
}
if (is_array($row) || $row instanceof \stdClass) {
foreach ($row as $action => $level) {
if (!isset($data[$scope][$action])) {
$data[$scope][$action] = $level;
if (!is_object($row)) continue;
$actionList = $this->getMetadata()->get(['scopes', $scope, $this->type . 'ActionList'], $this->actionList);
foreach ($actionList as $i => $action) {
if (isset($row->$action)) {
$level = $row->$action;
if (!isset($data->$scope->$action)) {
$data->$scope->$action = $level;
} else {
if (array_search($data[$scope][$action], $this->levelList) > array_search($level, $this->levelList)) {
$data[$scope][$action] = $level;
if (array_search($data->$scope->$action, $this->levelList) > array_search($level, $this->levelList)) {
$data->$scope->$action = $level;
}
}
} else {
if ($i > 0) {
// TODO remove it
$previousAction = $this->actionList[$i - 1];
if (in_array($action, $this->booleanActionList)) {
$data->$scope->$action = 'yes';
} else {
if ($action === 'stream' && isset($data->$scope->$previousAction)) {
$data->$scope->$action = $data->$scope->$previousAction;
}
}
}
}
@@ -224,24 +647,76 @@ class Table
}
}
foreach ($scopeList as $scope) {
if (!array_key_exists($scope, $data)) {
$aclType = $this->metadata->get('scopes.' . $scope . '.acl');
if ($aclType === true) {
$aclType = 'recordAllTeamOwnNo';
return $data;
}
private function mergeFieldTableList(array $tableList)
{
$data = (object) [];
$scopeList = $this->getScopeWithAclList();
foreach ($tableList as $table) {
foreach ($scopeList as $scope) {
if (!isset($table->$scope)) continue;
if (!isset($data->$scope)) {
$data->$scope = (object) [];
}
if (!empty($aclType)) {
$data[$scope] = $this->metadata->get('app.acl.defaults.' . $aclType, true);
}
}
if (!is_object($table->$scope)) continue;
$fieldList = array_keys($this->getMetadata()->get("entityDefs.{$scope}.fields", []));
foreach (get_object_vars($table->$scope) as $field => $row) {
if (!is_object($row)) continue;
if (!in_array($field, $fieldList)) continue;
if (!isset($data->$scope->$field)) {
$data->$scope->$field = (object) [];
}
foreach ($this->fieldActionList as $i => $action) {
if (!isset($row->$action)) continue;
$level = $row->$action;
if (!isset($data->$scope->$field->$action)) {
$data->$scope->$field->$action = $level;
} else {
if (array_search($data->$scope->$field->$action, $this->fieldLevelList) > array_search($level, $this->fieldLevelList)) {
$data->$scope->$field->$action = $level;
}
}
}
}
}
}
return $data;
}
private function buildCache()
{
$contents = '<' . '?'. 'php return ' . var_export($this->data, true) . ';';
$this->fileManager->putContents($this->cacheFile, $contents);
$this->fileManager->putPhpContents($this->cacheFilePath, $this->data, true);
/*$contents = '<' . '?'. 'php return ' . $this->varExport($this->data) . ';';
$this->fileManager->putContents($this->cacheFilePath, $contents);*/
}
/*private function varExport($variable)
{
if ($variable instanceof \StdClass) {
$result = '(object) ' . $this->varExport(get_object_vars($variable), true);
} else if (is_array($variable)) {
$array = array();
foreach ($variable as $key => $value) {
$array[] = var_export($key, true).' => ' . $this->varExport($value, true);
}
$result = '['.implode(', ', $array).']';
} else {
$result = var_export($variable, true);
}
return $result;
}*/
}
+124 -31
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
@@ -38,6 +45,8 @@ class AclManager
private $tableHashMap = array();
protected $tableClassName = '\\Espo\\Core\\Acl\\Table';
public function __construct(Container $container)
{
$this->container = $container;
@@ -49,6 +58,11 @@ class AclManager
return $this->container;
}
protected function getMetadata()
{
return $this->metadata;
}
public function getImplementation($scope)
{
if (empty($this->implementationHashMap[$scope])) {
@@ -68,10 +82,10 @@ class AclManager
}
if (class_exists($className)) {
$acl = new $className();
$acl = new $className($scope);
$dependencies = $acl->getDependencyList();
foreach ($dependencies as $name) {
$acl->inject($name, $this->container->get($name));
$acl->inject($name, $this->getContainer()->get($name));
}
$this->implementationHashMap[$scope] = $acl;
} else {
@@ -84,14 +98,18 @@ class AclManager
protected function getTable(User $user)
{
$key = spl_object_hash($user);
$key = $user->id;
if (empty($key)) {
$key = spl_object_hash($user);
}
if (empty($this->tableHashMap[$key])) {
$config = $this->getContainer()->get('config');
$fileManager = $this->getContainer()->get('fileManager');
$metadata = $this->getContainer()->get('metadata');
$fieldManager = $this->getContainer()->get('fieldManager');
$this->tableHashMap[$key] = new \Espo\Core\Acl\Table($user, $config, $fileManager, $metadata);
$this->tableHashMap[$key] = new $this->tableClassName($user, $config, $fileManager, $metadata, $fieldManager);
}
return $this->tableHashMap[$key];
@@ -112,9 +130,6 @@ class AclManager
public function get(User $user, $permission)
{
if ($user->isAdmin()) {
return true;
}
return $this->getTable($user)->get($permission);
}
@@ -124,7 +139,7 @@ class AclManager
return false;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkReadOnlyTeam($user, $scope, $data);
return $this->getImplementation($scope)->checkReadOnlyTeam($user, $data);
}
public function checkReadOnlyOwn(User $user, $scope)
@@ -133,49 +148,127 @@ class AclManager
return false;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkReadOnlyOwn($user, $scope, $data);
return $this->getImplementation($scope)->checkReadOnlyOwn($user, $data);
}
public function check(User $user, $subject, $action = null, $isOwner = null, $inTeam = null)
public function check(User $user, $subject, $action = null)
{
if ($user->isAdmin()) {
return true;
}
if (is_string($subject)) {
return $this->checkScope($user, $subject, $action, $isOwner, $inTeam);
return $this->checkScope($user, $subject, $action);
} else {
$entity = $subject;
if ($entity instanceof Entity) {
$entityType = $entity->getEntityType();
$impl = $this->getImplementation($entityType);
$methodName = 'checkEntity' . ucfirst($action);
if (method_exists($impl, $methodName)) {
$data = $this->getTable($user)->getScopeData($entityType);
return $impl->$methodName($user, $entity, $data);
}
return $this->checkEntity($user, $entity, $action);
}
}
}
public function checkEntity(User $user, Entity $entity, $action)
public function checkEntity(User $user, Entity $entity, $action = 'read')
{
if ($user->isAdmin()) {
return true;
$scope = $entity->getEntityType();
$data = $this->getTable($user)->getScopeData($scope);
$impl = $this->getImplementation($scope);
$methodName = 'checkEntity' . ucfirst($action);
if (method_exists($impl, $methodName)) {
return $impl->$methodName($user, $entity, $data);
}
$data = $this->getTable($user)->getScopeData($entity->getEntityType());
return $this->getImplementation($entity->getEntityType())->checkEntity($user, $entity, $data, $action);
return $impl->checkEntity($user, $entity, $data, $action);
}
public function checkScope(User $user, $scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
public function checkIsOwner(User $user, Entity $entity)
{
return $this->getImplementation($entity->getEntityType())->checkIsOwner($user, $entity);
}
public function checkInTeam(User $user, Entity $entity)
{
return $this->getImplementation($entity->getEntityType())->checkInTeam($user, $entity);
}
public function checkScope(User $user, $scope, $action = null)
{
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkScope($user, $data, $action);
}
public function checkUser(User $user, $permission, User $entity)
{
if ($user->isAdmin()) {
return true;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkScope($user, $data, $scope, $action, $isOwner, $inTeam, $entity);
if ($this->get($user, $permission) === 'no') {
if ($entity->id !== $user->id) {
return false;
}
} else if ($this->get($user, $permission) === 'team') {
if ($entity->id != $user->id) {
$teamIdList1 = $user->getTeamIdList();
$teamIdList2 = $entity->getTeamIdList();
$inTeam = false;
foreach ($teamIdList1 as $id) {
if (in_array($id, $teamIdList2)) {
$inTeam = true;
break;
}
}
if (!$inTeam) {
return false;
}
}
}
return true;
}
public function getScopeForbiddenAttributeList(User $user, $scope, $action = 'read', $thresholdLevel = 'no')
{
if ($user->isAdmin()) return [];
return $this->getTable($user)->getScopeForbiddenAttributeList($scope, $action, $thresholdLevel);
}
public function getScopeForbiddenFieldList(User $user, $scope, $action = 'read', $thresholdLevel = 'no')
{
if ($user->isAdmin()) return [];
return $this->getTable($user)->getScopeForbiddenFieldList($scope, $action, $thresholdLevel);
}
public function checkUserPermission(User $user, $target, $permissionType = 'userPermission')
{
$permission = $this->get($user, $permissionType);
if (is_object($target)) {
$userId = $target->id;
} else {
$userId = $target;
}
if ($user->id === $userId) return true;
if ($permission === 'no') {
return false;
}
if ($permission === 'yes') {
return true;
}
if ($permission === 'team') {
$teamIdList = $user->getLinkMultipleIdList('teams');
if (!$this->getContainer()->get('entityManager')->getRepository('User')->checkBelongsToAnyOfTeams($userId, $teamIdList)) {
return false;
}
}
return true;
}
public function checkAssignmentPermission(User $user, $target)
{
return $this->checkUserPermission($user, $target, 'assignmentPermission');
}
}
+212
View File
@@ -0,0 +1,212 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\AclPortal;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class Base extends \Espo\Core\Acl\Base
{
public function checkScope(User $user, $data, $action = null, Entity $entity = null, $entityAccessData = array())
{
if ($user->isAdmin()) {
return true;
}
if (is_null($data)) {
return false;
}
if ($data === false) {
return false;
}
if ($data === true) {
return true;
}
if (is_string($data)) {
return true;
}
$isOwner = null;
if (isset($entityAccessData['isOwner'])) {
$isOwner = $entityAccessData['isOwner'];
}
$inAccount = null;
if (isset($entityAccessData['inAccount'])) {
$inAccount = $entityAccessData['inAccount'];
}
$isOwnContact = null;
if (isset($entityAccessData['isOwnContact'])) {
$isOwnContact = $entityAccessData['isOwnContact'];
}
if (is_null($action)) {
return true;
}
if (!isset($data->$action)) {
return false;
}
$value = $data->$action;
if ($value === 'all' || $value === 'yes' || $value === true) {
return true;
}
if (!$value || $value === 'no') {
return false;
}
if (is_null($isOwner)) {
if ($entity) {
$isOwner = $this->checkIsOwner($user, $entity);
} else {
return true;
}
}
if ($isOwner) {
if ($value === 'own' || $value === 'account' || $value === 'contact') {
return true;
}
}
if ($value === 'account') {
if (is_null($inAccount) && $entity) {
$inAccount = $this->checkInAccount($user, $entity);
}
if ($inAccount) {
return true;
}
}
if ($value === 'contact') {
if (is_null($isOwnContact) && $entity) {
$isOwnContact = $this->checkIsOwnContact($user, $entity);
}
if ($isOwnContact) {
return true;
}
}
return false;
}
public function checkReadOnlyAccount(User $user, $data)
{
if (empty($data) || !is_object($data) || !isset($data->read)) {
return false;
}
return $data->read === 'account';
}
public function checkReadOnlyContact(User $user, $data)
{
if (empty($data) || !is_object($data) || !isset($data->read)) {
return false;
}
return $data->read === 'contact';
}
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->hasAttribute('createdById')) {
if ($entity->has('createdById')) {
if ($user->id === $entity->get('createdById')) {
return true;
}
}
}
return false;
}
public function checkInAccount(User $user, Entity $entity)
{
$accountIdList = $user->getLinkMultipleIdList('accounts');
if (count($accountIdList)) {
if ($entity->hasAttribute('accountId')) {
if (in_array($entity->get('accountId'), $accountIdList)) {
return true;
}
}
if ($entity->hasRelation('accounts')) {
$repository = $this->getEntityManager()->getRepository($entity->getEntityType());
foreach ($accountIdList as $accountId) {
if ($repository->isRelated($entity, 'accounts', $accountId)) {
return true;
}
}
}
if ($entity->hasAttribute('parentId') && $entity->hasRelation('parent')) {
if ($entity->get('parentType') === 'Account') {
if (in_array($entity->get('parentId'), $accountIdList)) {
return true;
}
}
}
}
return false;
}
public function checkIsOwnContact(User $user, Entity $entity)
{
$contactId = $user->get('contactId');
if ($contactId) {
if ($entity->hasAttribute('contactId')) {
if ($entity->get('contactId') === $contactId) {
return true;
}
}
if ($entity->hasRelation('contacts')) {
$repository = $this->getEntityManager()->getRepository($entity->getEntityType());
if ($repository->isRelated($entity, 'contacts', $contactId)) {
return true;
}
}
if ($entity->hasAttribute('parentId') && $entity->hasRelation('parent')) {
if ($entity->get('parentType') === 'Contact') {
if ($entity->get('parentId') === $contactId) {
return true;
}
}
}
}
return false;
}
}
+135
View File
@@ -0,0 +1,135 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\AclPortal;
use \Espo\Core\Exceptions\Error;
use \Espo\ORM\Entity;
use \Espo\Entities\User;
use \Espo\Entities\Portal;
use \Espo\Core\Utils\Config;
use \Espo\Core\Utils\Metadata;
use \Espo\Core\Utils\FieldManager;
use \Espo\Core\Utils\File\Manager as FileManager;
class Table extends \Espo\Core\Acl\Table
{
protected $type = 'aclPortal';
protected $portal;
protected $defaultAclType = 'recordAllOwnNo';
protected $levelList = ['yes', 'all', 'account', 'contact', 'own', 'no'];
protected $valuePermissionList = [];
public function __construct(User $user, Portal $portal, Config $config = null, FileManager $fileManager = null, Metadata $metadata = null, FieldManager $fieldManager = null)
{
if (empty($portal)) {
throw new Error("No portal was passed to AclPortal\\Table constructor.");
}
$this->portal = $portal;
parent::__construct($user, $config, $fileManager, $metadata, $fieldManager);
}
protected function getPortal()
{
return $this->portal;
}
protected function initCacheFilePath()
{
$this->cacheFilePath = 'data/cache/application/acl-portal/'.$this->getPortal()->id.'/' . $this->getUser()->id . '.php';
}
protected function getRoleList()
{
$roleList = [];
$userRoleList = $this->getUser()->get('portalRoles');
if (!(is_array($userRoleList) || $userRoleList instanceof \Traversable)) {
throw new Error();
}
foreach ($userRoleList as $role) {
$roleList[] = $role;
}
$portalRoleList = $this->getPortal()->get('portalRoles');
if (!(is_array($portalRoleList) || $portalRoleList instanceof \Traversable)) {
throw new Error();
}
foreach ($portalRoleList as $role) {
$roleList[] = $role;
}
return $roleList;
}
protected function getScopeWithAclList()
{
$scopeList = [];
$scopes = $this->getMetadata()->get('scopes');
foreach ($scopes as $scope => $d) {
if (empty($d['acl'])) continue;
if (empty($d['aclPortal'])) continue;
$scopeList[] = $scope;
}
return $scopeList;
}
protected function applyDefault(&$table, &$fieldTable)
{
parent::applyDefault($table, $fieldTable);
foreach ($this->getScopeList() as $scope) {
if (!isset($table->$scope)) {
$table->$scope = false;
}
}
}
protected function applyDisabled(&$table, &$fieldTable)
{
foreach ($this->getScopeList() as $scope) {
$d = $this->getMetadata()->get('scopes.' . $scope);
if (!empty($d['disabled']) || !empty($d['portalDisabled'])) {
$table->$scope = false;
unset($fieldTable->$scope);
}
}
}
protected function applyAdditional(&$table, &$fieldTable, &$valuePermissionLists)
{
}
}
+86 -38
View File
@@ -18,35 +18,43 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
class Application
{
private $metadata;
private $container;
protected $container;
private $slim;
private $auth;
/**
* Constructor
*/
public function __construct()
{
$this->container = new Container();
date_default_timezone_set('UTC');
$GLOBALS['log'] = $this->container->get('log');
$this->initContainer();
$GLOBALS['log'] = $this->getContainer()->get('log');
$this->initAutoloads();
}
protected function initContainer()
{
$this->container = new Container();
}
public function getSlim()
{
if (empty($this->slim)) {
@@ -63,12 +71,9 @@ class Application
return $this->metadata;
}
protected function getAuth()
protected function createAuth()
{
if (empty($this->auth)) {
$this->auth = new \Espo\Core\Utils\Auth($this->container);
}
return $this->auth;
return new \Espo\Core\Utils\Auth($this->container);
}
public function getContainer()
@@ -85,19 +90,10 @@ class Application
public function runClient()
{
$config = $this->getContainer()->get('config');
$themeManager = $this->getContainer()->get('themeManager');
$html = file_get_contents('main.html');
$html = str_replace('{{cacheTimestamp}}', $config->get('cacheTimestamp', 0), $html);
$html = str_replace('{{useCache}}', $config->get('useCache') ? 'true' : 'false' , $html);
$html = str_replace('{{stylesheet}}', $themeManager->getStylesheet(), $html);
$html = str_replace('{{runScript}}', 'app.start();' , $html);
echo $html;
exit;
$this->getContainer()->get('clientManager')->display();
}
public function runEntryPoint($entryPoint)
public function runEntryPoint($entryPoint, $data = array(), $final = false)
{
if (empty($entryPoint)) {
throw new \Error();
@@ -106,18 +102,27 @@ class Application
$slim = $this->getSlim();
$container = $this->getContainer();
$slim->get('/', function() {});
$slim->post('/', function() {});
$slim->any('.*', function() {});
$entryPointManager = new \Espo\Core\EntryPointManager($container);
try {
$auth = $this->getAuth();
$apiAuth = new \Espo\Core\Utils\Api\Auth($auth, $entryPointManager->checkAuthRequired($entryPoint), true);
$authRequired = $entryPointManager->checkAuthRequired($entryPoint);
$authNotStrict = $entryPointManager->checkNotStrictAuth($entryPoint);
if ($authRequired && !$authNotStrict) {
if (!$final && $portalId = $this->detectedPortalId()) {
$app = new \Espo\Core\Portal\Application($portalId);
$app->setBasePath($this->getBasePath());
$app->runEntryPoint($entryPoint, $data, true);
exit;
}
}
$auth = new \Espo\Core\Utils\Auth($this->container, $authNotStrict);
$apiAuth = new \Espo\Core\Utils\Api\Auth($auth, $authRequired, true);
$slim->add($apiAuth);
$slim->hook('slim.before.dispatch', function () use ($entryPoint, $entryPointManager, $container) {
$entryPointManager->run($entryPoint);
$slim->hook('slim.before.dispatch', function () use ($entryPoint, $entryPointManager, $container, $data) {
$entryPointManager->run($entryPoint, $data);
});
$slim->run();
@@ -128,7 +133,7 @@ class Application
public function runCron()
{
$auth = $this->getAuth();
$auth = $this->createAuth();
$auth->useNoAuth(true);
$cronManager = new \Espo\Core\CronManager($this->container);
@@ -158,20 +163,25 @@ class Application
return false;
}
protected function createApiAuth($auth)
{
return new \Espo\Core\Utils\Api\Auth($auth);
}
protected function routeHooks()
{
$container = $this->getContainer();
$slim = $this->getSlim();
try {
$auth = $this->getAuth();
$auth = $this->createAuth();
} catch (\Exception $e) {
$container->get('output')->processError($e->getMessage(), $e->getCode());
}
$apiAuth = new \Espo\Core\Utils\Api\Auth($auth);
$this->getSlim()->add($apiAuth);
$apiAuth = $this->createApiAuth($auth);
$this->getSlim()->add($apiAuth);
$this->getSlim()->hook('slim.before.dispatch', function () use ($slim, $container) {
$route = $slim->router()->getCurrentRoute();
@@ -212,7 +222,7 @@ class Application
}
try {
$controllerManager = new \Espo\Core\ControllerManager($container);
$controllerManager = $this->getContainer()->get('controllerManager');
$result = $controllerManager->process($controllerName, $actionName, $params, $data, $slim->request());
$container->get('output')->render($result);
} catch (\Exception $e) {
@@ -231,13 +241,19 @@ class Application
});
}
protected function initRoutes()
protected function getRouteList()
{
$routes = new \Espo\Core\Utils\Route($this->getContainer()->get('config'), $this->getMetadata(), $this->getContainer()->get('fileManager'));
$crudList = array_keys( $this->getContainer()->get('config')->get('crud') );
foreach ($routes->getAll() as $route) {
return $routes->getAll();
}
protected function initRoutes()
{
$crudList = array_keys($this->getContainer()->get('config')->get('crud'));
foreach ($this->getRouteList() as $route) {
$method = strtolower($route['method']);
if (!in_array($method, $crudList)) {
$GLOBALS['log']->error('Route: Method ['.$method.'] does not exist. Please check your route ['.$route['route'].']');
@@ -282,5 +298,37 @@ class Application
$classLoader->register(true);
}
public function setBasePath($basePath)
{
$this->getContainer()->get('clientManager')->setBasePath($basePath);
}
public function getBasePath()
{
return $this->getContainer()->get('clientManager')->getBasePath();
}
public function detectedPortalId()
{
if (!empty($_GET['portalId'])) {
return $_GET['portalId'];
}
if (!empty($_COOKIE['auth-token'])) {
$token = $this->getContainer()->get('entityManager')->getRepository('AuthToken')->where(array('token' => $_COOKIE['auth-token']))->findOne();
if ($token && $token->get('portalId')) {
return $token->get('portalId');
}
}
return null;
}
public function setupSystemUser()
{
$user = $this->getContainer()->get('entityManager')->getEntity('User', 'system');
$this->getContainer()->setUser($user);
$this->getContainer()->get('entityManager')->setUser($user);
}
}
+100 -43
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
@@ -33,7 +40,6 @@ class Container
*/
public function __construct()
{
}
public function get($name)
@@ -41,7 +47,15 @@ class Container
if (empty($this->data[$name])) {
$this->load($name);
}
return $this->data[$name];
if (isset($this->data[$name])) {
return $this->data[$name];
}
return null;
}
protected function set($name, $obj)
{
$this->data[$name] = $obj;
}
private function load($name)
@@ -81,16 +95,19 @@ class Container
protected function loadLog()
{
$logConfig = $this->get('config')->get('logger');
$config = $this->get('config');
$path = $config->get('logger.path', 'data/logs/espo.log');
$rotation = $config->get('logger.rotation', true);
$log = new \Espo\Core\Utils\Log('Espo');
$levelCode = $log->getLevelCode($config->get('logger.level', 'WARNING'));
$levelCode = $log->getLevelCode($logConfig['level']);
if ($logConfig['isRotate']) {
$handler = new \Espo\Core\Utils\Log\Monolog\Handler\RotatingFileHandler($logConfig['path'], $logConfig['maxRotateFiles'], $levelCode);
if ($rotation) {
$maxFileNumber = $config->get('logger.maxFileNumber', 30);
$handler = new \Espo\Core\Utils\Log\Monolog\Handler\RotatingFileHandler($path, $maxFileNumber, $levelCode);
} else {
$handler = new \Espo\Core\Utils\Log\Monolog\Handler\StreamHandler($logConfig['path'], $levelCode);
$handler = new \Espo\Core\Utils\Log\Monolog\Handler\StreamHandler($path, $levelCode);
}
$log->pushHandler($handler);
@@ -106,53 +123,61 @@ class Container
return $this;
}
private function loadSlim()
protected function loadSlim()
{
return new \Espo\Core\Utils\Api\Slim();
}
private function loadFileManager()
protected function loadFileManager()
{
return new \Espo\Core\Utils\File\Manager(
$this->get('config')
);
}
private function loadPreferences()
protected function loadControllerManager()
{
return new \Espo\Core\ControllerManager(
$this
);
}
protected function loadPreferences()
{
return $this->get('entityManager')->getEntity('Preferences', $this->get('user')->id);
}
private function loadConfig()
protected function loadConfig()
{
return new \Espo\Core\Utils\Config(
new \Espo\Core\Utils\File\Manager()
);
}
private function loadHookManager()
protected function loadHookManager()
{
return new \Espo\Core\HookManager(
$this
);
}
private function loadOutput()
protected function loadOutput()
{
return new \Espo\Core\Utils\Api\Output(
$this->get('slim')
);
}
private function loadMailSender()
protected function loadMailSender()
{
$className = $this->getServiceClassName('mailSernder', '\\Espo\\Core\\Mail\\Sender');
return new $className(
$this->get('config')
$this->get('config'),
$this->get('entityManager')
);
}
private function loadDateTime()
protected function loadDateTime()
{
return new \Espo\Core\Utils\DateTime(
$this->get('config')->get('dateFormat'),
@@ -161,48 +186,51 @@ class Container
);
}
private function loadNumber()
protected function loadNumber()
{
return new \Espo\Core\Utils\Number(
return new \Espo\Core\Utils\NumberUtil(
$this->get('config')->get('decimalMark'),
$this->get('config')->get('thousandSeparator')
);
}
private function loadServiceFactory()
protected function loadServiceFactory()
{
return new \Espo\Core\ServiceFactory(
$this
);
}
private function loadSelectManagerFactory()
protected function loadSelectManagerFactory()
{
return new \Espo\Core\SelectManagerFactory(
$this->get('entityManager'),
$this->get('user'),
$this->get('acl'),
$this->get('metadata')
$this->get('aclManager'),
$this->get('metadata'),
$this->get('config')
);
}
private function loadMetadata()
protected function loadMetadata()
{
return new \Espo\Core\Utils\Metadata(
$this->get('config'),
$this->get('fileManager')
$this->get('fileManager'),
$this->get('config')->get('useCache')
);
}
private function loadLayout()
protected function loadLayout()
{
return new \Espo\Core\Utils\Layout(
$this->get('fileManager'),
$this->get('metadata')
$this->get('metadata'),
$this->get('user')
);
}
private function loadAclManager()
protected function loadAclManager()
{
$className = $this->getServiceClassName('acl', '\\Espo\\Core\\AclManager');
return new $className(
@@ -210,7 +238,7 @@ class Container
);
}
private function loadAcl()
protected function loadAcl()
{
$className = $this->getServiceClassName('acl', '\\Espo\\Core\\Acl');
return new $className(
@@ -219,18 +247,28 @@ class Container
);
}
private function loadSchema()
protected function loadSchema()
{
return new \Espo\Core\Utils\Database\Schema\Schema(
$this->get('config'),
$this->get('metadata'),
$this->get('fileManager'),
$this->get('entityManager'),
$this->get('classParser')
$this->get('classParser'),
$this->get('ormMetadata')
);
}
private function loadClassParser()
protected function loadOrmMetadata()
{
return new \Espo\Core\Utils\Metadata\OrmMetadata(
$this->get('metadata'),
$this->get('fileManager'),
$this->get('config')->get('useCache')
);
}
protected function loadClassParser()
{
return new \Espo\Core\Utils\File\ClassParser(
$this->get('fileManager'),
@@ -239,46 +277,57 @@ class Container
);
}
private function loadLanguage()
protected function loadLanguage()
{
return new \Espo\Core\Utils\Language(
\Espo\Core\Utils\Language::detectLanguage($this->get('config'), $this->get('preferences')),
$this->get('fileManager'),
$this->get('config'),
$this->get('metadata'),
$this->get('preferences')
$this->get('config')->get('useCache')
);
}
private function loadCrypt()
protected function loadDefaultLanguage()
{
return new \Espo\Core\Utils\Language(
null,
$this->get('fileManager'),
$this->get('metadata'),
$this->get('useCache')
);
}
protected function loadCrypt()
{
return new \Espo\Core\Utils\Crypt(
$this->get('config')
);
}
private function loadScheduledJob()
protected function loadScheduledJob()
{
return new \Espo\Core\Utils\ScheduledJob(
$this
);
}
private function loadDataManager()
protected function loadDataManager()
{
return new \Espo\Core\DataManager(
$this
);
}
private function loadFieldManager()
protected function loadFieldManager()
{
return new \Espo\Core\Utils\FieldManager(
$this->get('metadata'),
$this->get('language')
$this->get('language'),
$this
);
}
private function loadThemeManager()
protected function loadThemeManager()
{
return new \Espo\Core\Utils\ThemeManager(
$this->get('config'),
@@ -286,9 +335,17 @@ class Container
);
}
public function setUser($user)
protected function loadClientManager()
{
$this->data['user'] = $user;
return new \Espo\Core\Utils\ClientManager(
$this->get('config'),
$this->get('themeManager')
);
}
public function setUser(\Espo\Entities\User $user)
{
$this->set('user', $user);
}
}
+9 -2
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
@@ -99,7 +106,7 @@ class ControllerManager
}
if (!method_exists($controller, $primaryActionMethodName)) {
throw new NotFound("Action '$actionName' (".$request->getMethod().") does not exist in controller '$controller'");
throw new NotFound("Action '$actionName' (".$request->getMethod().") does not exist in controller '$controllerName'");
}
if (method_exists($controller, $beforeMethodName)) {
@@ -112,7 +119,7 @@ class ControllerManager
$controller->$afterMethodName($params, $data, $request);
}
if (is_array($result) || is_bool($result)) {
if (is_array($result) || is_bool($result) || $result instanceof \StdClass) {
return \Espo\Core\Utils\Json::encode($result);
}
+7 -1
View File
@@ -18,10 +18,16 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Controllers;
use \Espo\Core\Container;
use \Espo\Core\ServiceFactory;
use \Espo\Core\Utils\Util;
+86 -20
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Controllers;
@@ -57,7 +64,7 @@ class Record extends Base
return $service;
}
public function actionRead($params)
public function actionRead($params, $data, $request)
{
$id = $params['id'];
$entity = $this->getRecordService()->getEntity($id);
@@ -80,7 +87,7 @@ class Record extends Base
throw new BadRequest();
}
if (!$this->getAcl()->check($this->name, 'edit')) {
if (!$this->getAcl()->check($this->name, 'create')) {
throw new Forbidden();
}
@@ -121,9 +128,10 @@ class Record extends Base
$where = $request->get('where');
$offset = $request->get('offset');
$maxSize = $request->get('maxSize');
$asc = $request->get('asc') === 'true';
$asc = $request->get('asc', 'true') === 'true';
$sortBy = $request->get('sortBy');
$q = $request->get('q');
$textFilter = $request->get('textFilter');
if (empty($maxSize)) {
$maxSize = self::MAX_SIZE_LIMIT;
@@ -132,14 +140,19 @@ class Record extends Base
throw new Forbidden("Max should should not exceed " . self::MAX_SIZE_LIMIT . ". Use pagination (offset, limit).");
}
$result = $this->getRecordService()->findEntities(array(
$params = array(
'where' => $where,
'offset' => $offset,
'maxSize' => $maxSize,
'asc' => $asc,
'sortBy' => $sortBy,
'q' => $q,
));
'textFilter' => $textFilter
);
$this->fetchListParamsFromRequest($params, $request, $data);
$result = $this->getRecordService()->findEntities($params);
return array(
'total' => $result['total'],
@@ -147,6 +160,16 @@ class Record extends Base
);
}
protected function fetchListParamsFromRequest(&$params, $request, $data)
{
if ($request->get('primaryFilter')) {
$params['primaryFilter'] = $request->get('primaryFilter');
}
if ($request->get('boolFilterList')) {
$params['boolFilterList'] = $request->get('boolFilterList');
}
}
public function actionListLinked($params, $data, $request)
{
$id = $params['id'];
@@ -155,9 +178,10 @@ class Record extends Base
$where = $request->get('where');
$offset = $request->get('offset');
$maxSize = $request->get('maxSize');
$asc = $request->get('asc') === 'true';
$asc = $request->get('asc', 'true') === 'true';
$sortBy = $request->get('sortBy');
$q = $request->get('q');
$textFilter = $request->get('textFilter');
if (empty($maxSize)) {
$maxSize = self::MAX_SIZE_LIMIT;
@@ -166,15 +190,19 @@ class Record extends Base
throw new Forbidden();
}
$result = $this->getRecordService()->findLinkedEntities($id, $link, array(
$params = array(
'where' => $where,
'offset' => $offset,
'maxSize' => $maxSize,
'asc' => $asc,
'sortBy' => $sortBy,
'q' => $q,
));
'textFilter' => $textFilter
);
$this->fetchListParamsFromRequest($params, $request, $data);
$result = $this->getRecordService()->findLinkedEntities($id, $link, $params);
return array(
'total' => $result['total'],
@@ -198,6 +226,10 @@ class Record extends Base
public function actionExport($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
if ($this->getConfig()->get('exportDisabled') && !$this->getUser()->isAdmin()) {
throw new Forbidden();
}
@@ -206,17 +238,23 @@ class Record extends Base
throw new Forbidden();
}
$ids = $request->get('ids');
$where = $request->get('where');
$byWhere = $request->get('byWhere');
$ids = isset($data['ids']) ? $data['ids'] : null;
$where = isset($data['where']) ? json_decode(json_encode($data['where']), true) : null;
$byWhere = isset($data['byWhere']) ? $data['byWhere'] : false;
$selectData = isset($data['selectData']) ? json_decode(json_encode($data['selectData']), true) : null;
$params = array();
if ($byWhere) {
$params['selectData'] = $selectData;
$params['where'] = $where;
} else {
$params['ids'] = $ids;
}
if (isset($data['attributeList'])) {
$params['attributeList'] = $data['attributeList'];
}
return array(
'id' => $this->getRecordService()->export($params)
);
@@ -238,6 +276,9 @@ class Record extends Base
$params = array();
if (array_key_exists('where', $data) && !empty($data['byWhere'])) {
$params['where'] = json_decode(json_encode($data['where']), true);
if (array_key_exists('selectData', $data)) {
$params['selectData'] = json_decode(json_encode($data['selectData']), true);
}
} else if (array_key_exists('ids', $data)) {
$params['ids'] = $data['ids'];
}
@@ -262,9 +303,11 @@ class Record extends Base
if (array_key_exists('where', $data) && !empty($data['byWhere'])) {
$where = json_decode(json_encode($data['where']), true);
$params['where'] = $where;
if (array_key_exists('selectData', $data)) {
$params['selectData'] = json_decode(json_encode($data['selectData']), true);
}
}
if (array_key_exists('ids', $data)) {
$where = json_decode(json_encode($data['where']), true);
$params['ids'] = $data['ids'];
}
@@ -291,20 +334,26 @@ class Record extends Base
throw new BadRequest();
}
$where = json_decode(json_encode($data['where']), true);
return $this->getRecordService()->linkEntityMass($id, $link, $where);
$selectData = null;
if (isset($data['selectData']) && is_array($data['selectData'])) {
$selectData = json_decode(json_encode($data['selectData']), true);
}
return $this->getRecordService()->linkEntityMass($id, $link, $where, $selectData);
} else {
$foreignIds = array();
$foreignIdList = array();
if (isset($data['id'])) {
$foreignIds[] = $data['id'];
$foreignIdList[] = $data['id'];
}
if (isset($data['ids']) && is_array($data['ids'])) {
foreach ($data['ids'] as $foreignId) {
$foreignIds[] = $foreignId;
$foreignIdList[] = $foreignId;
}
}
$result = false;
foreach ($foreignIds as $foreignId) {
foreach ($foreignIdList as $foreignId) {
if ($this->getRecordService()->linkEntity($id, $link, $foreignId)) {
$result = true;
}
@@ -358,7 +407,7 @@ class Record extends Base
if (!$request->isPut()) {
throw new BadRequest();
}
if (!$this->getAcl()->check($this->name, 'read')) {
if (!$this->getAcl()->check($this->name, 'stream')) {
throw new Forbidden();
}
$id = $params['id'];
@@ -383,17 +432,34 @@ class Record extends Base
throw new BadRequest();
}
if (empty($data['targetId']) || empty($data['sourceIds']) || !is_array($data['sourceIds'])) {
if (empty($data['targetId']) || empty($data['sourceIds']) || !is_array($data['sourceIds']) || !($data['attributes'] instanceof \StdClass)) {
throw new BadRequest();
}
$targetId = $data['targetId'];
$sourceIds = $data['sourceIds'];
$attributes = get_object_vars($data['attributes']);
if (!$this->getAcl()->check($this->name, 'edit')) {
throw new Forbidden();
}
return $this->getRecordService()->merge($targetId, $sourceIds);
return $this->getRecordService()->merge($targetId, $sourceIds, $attributes);
}
public function postActionGetDuplicateAttributes($params, $data, $request)
{
if (empty($data['id'])) {
throw new BadRequest();
}
if (!$this->getAcl()->check($this->name, 'create')) {
throw new Forbidden();
}
if (!$this->getAcl()->check($this->name, 'read')) {
throw new Forbidden();
}
return $this->getRecordService()->getDuplicateAttributes($data['id']);
}
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Controllers;
@@ -30,7 +37,6 @@ use \Espo\Core\Utils\Util;
class RecordTree extends Record
{
public static $defaultAction = 'list';
protected $defaultRecordServiceName = 'RecordTree';
@@ -44,9 +50,11 @@ class RecordTree extends Record
$where = $request->get('where');
$parentId = $request->get('parentId');
$maxDepth = $request->get('maxDepth');
$onlyNotEmpty = $request->get('onlyNotEmpty');
$collection = $this->getRecordService()->getTree($parentId, array(
'where' => $where
'where' => $where,
'onlyNotEmpty' => $onlyNotEmpty
), 0, $maxDepth);
return array(
'list' => $collection->toArray(),
+70 -48
View File
@@ -18,10 +18,16 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
use \PDO;
use Espo\Core\Utils\Json;
use Espo\Core\Exceptions\NotFound;
@@ -29,15 +35,21 @@ use Espo\Core\Exceptions\NotFound;
class CronManager
{
private $container;
private $config;
private $fileManager;
private $entityManager;
private $scheduledJobUtil;
const PENDING = 'Pending';
const RUNNING = 'Running';
const SUCCESS = 'Success';
const FAILED = 'Failed';
protected $lastRunTime = 'data/cache/application/cronLastRunTime.php';
@@ -143,19 +155,15 @@ class CronManager
$this->setLastRunTime(time());
$entityManager = $this->getEntityManager();
$cronJob = $this->getCronJob();
$cronScheduledJob = $this->getCronScheduledJob();
//Check scheduled jobs and create related jobs
$this->getCronJob()->markFailedJobs();
$this->getCronJob()->updateFailedJobAttempts();
$this->createJobsFromScheduledJobs();
$this->getCronJob()->removePendingJobDuplicates();
$pendingJobs = $cronJob->getPendingJobs();
$pendingJobList = $this->getCronJob()->getPendingJobList();
foreach ($pendingJobs as $job) {
$jobEntity = $entityManager->getEntity('Job', $job['id']);
foreach ($pendingJobList as $job) {
$jobEntity = $this->getEntityManager()->getEntity('Job', $job['id']);
if (!isset($jobEntity)) {
$GLOBALS['log']->error('CronManager: empty Job entity ['.$job['id'].'].');
@@ -163,7 +171,7 @@ class CronManager
}
$jobEntity->set('status', self::RUNNING);
$entityManager->saveEntity($jobEntity);
$this->getEntityManager()->saveEntity($jobEntity);
$isSuccess = true;
@@ -181,11 +189,10 @@ class CronManager
$status = $isSuccess ? self::SUCCESS : self::FAILED;
$jobEntity->set('status', $status);
$entityManager->saveEntity($jobEntity);
$this->getEntityManager()->saveEntity($jobEntity);
//set status in the schedulerJobLog
if (!empty($job['scheduled_job_id'])) {
$cronScheduledJob->addLogRecord($job['scheduled_job_id'], $status);
$this->getCronScheduledJob()->addLogRecord($job['scheduled_job_id'], $status, null, $job['target_id'], $job['target_type']);
}
}
}
@@ -207,12 +214,20 @@ class CronManager
}
$jobClass = new $className($this->container);
$method = $this->getScheduledJobUtil()->getMethodName();
$method = 'run';
if (!method_exists($jobClass, $method)) {
throw new NotFound();
}
$jobClass->$method();
$data = null;
if (!empty($job['data'])) {
$data = $job['data'];
if (Json::isJSON($data)) {
$data = Json::decode($data, true);
}
}
$jobClass->$method($data, $job['target_id'], $job['target_type']);
}
/**
@@ -242,7 +257,7 @@ class CronManager
$data = Json::decode($data, true);
}
$service->$serviceMethod($data);
$service->$serviceMethod($data, $job['target_id'], $job['target_type']);
}
/**
@@ -252,55 +267,62 @@ class CronManager
*/
protected function createJobsFromScheduledJobs()
{
$entityManager = $this->getEntityManager();
$activeScheduledJobList = $this->getCronScheduledJob()->getActiveScheduledJobList();
$activeScheduledJobs = $this->getCronScheduledJob()->getActiveJobs();
$runningScheduledJobIdList = $this->getCronJob()->getRunningScheduledJobIdList();
$cronJob = $this->getCronJob();
$runningScheduledJobs = $cronJob->getActiveJobs('scheduled_job_id', self::RUNNING, PDO::FETCH_COLUMN);
$createdJobIdList = array();
foreach ($activeScheduledJobList as $scheduledJob) {
$scheduling = $scheduledJob['scheduling'];
$createdJobs = array();
foreach ($activeScheduledJobs as $scheduledJob) {
if (in_array($scheduledJob['id'], $runningScheduledJobs)) {
try {
$cronExpression = \Cron\CronExpression::factory($scheduling);
} catch (\Exception $e) {
$GLOBALS['log']->error('CronManager (ScheduledJob ['.$scheduledJob['id'].']): Scheduling string error - '. $e->getMessage() . '.');
continue;
}
$scheduling = $scheduledJob['scheduling'];
$cronExpression = \Cron\CronExpression::factory($scheduling);
try {
$prevDate = $cronExpression->getPreviousRunDate()->format('Y-m-d H:i:s');
$previousDate = $cronExpression->getPreviousRunDate()->format('Y-m-d H:i:s');
} catch (\Exception $e) {
$GLOBALS['log']->error('CronManager: ScheduledJob ['.$scheduledJob['id'].']: CronExpression - Impossible CRON expression ['.$scheduling.']');
$GLOBALS['log']->error('CronManager (ScheduledJob ['.$scheduledJob['id'].']): Unsupported CRON expression ['.$scheduling.']');
continue;
}
if ($cronExpression->isDue()) {
$prevDate = date('Y-m-d H:i:s');
$previousDate = date('Y-m-d H:i:s');
}
$existsJob = $cronJob->getJobByScheduledJob($scheduledJob['id'], $prevDate);
$existingJob = $this->getCronJob()->getJobByScheduledJob($scheduledJob['id'], $previousDate);
if ($existingJob) continue;
if (!isset($existsJob) || empty($existsJob)) {
//create a new job
$jobEntity = $entityManager->getEntity('Job');
$jobEntity->set(array(
'name' => $scheduledJob['name'],
'status' => self::PENDING,
'scheduledJobId' => $scheduledJob['id'],
'executeTime' => $prevDate,
'method' => $scheduledJob['job'],
));
$jobEntityId = $entityManager->saveEntity($jobEntity);
if (!empty($jobEntityId)) {
$createdJobs[] = $jobEntityId;
$className = $this->getScheduledJobUtil()->get($scheduledJob['job']);
if ($className) {
if (method_exists($className, 'prepare')) {
$implementation = new $className($this->container);
$implementation->prepare($scheduledJob, $previousDate);
continue;
}
}
if (in_array($scheduledJob['id'], $runningScheduledJobIdList)) {
continue;
}
$jobEntity = $this->getEntityManager()->getEntity('Job');
$jobEntity->set(array(
'name' => $scheduledJob['name'],
'status' => self::PENDING,
'scheduledJobId' => $scheduledJob['id'],
'executeTime' => $previousDate,
'method' => $scheduledJob['job']
));
$this->getEntityManager()->saveEntity($jobEntity);
$createdJobIdList[] = $jobEntity->id;
}
return $createdJobs;
return $createdJobIdList;
}
}
+9 -2
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
@@ -107,11 +114,11 @@ class DataManager
$metadata->init(true);
$ormMeta = $metadata->getOrmMetadata(true);
$ormData = $this->getContainer()->get('ormMetadata')->getData(true);
$this->updateCacheTimestamp();
return empty($ormMeta) ? false : true;
return empty($ormData) ? false : true;
}
/**
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Entities;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Entities;
+18 -3
View File
@@ -18,10 +18,16 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
use \Espo\Core\Exceptions\NotFound,
\Espo\Core\Utils\Util;
@@ -75,7 +81,16 @@ class EntryPointManager
return $className::$authRequired;
}
public function run($name)
public function checkNotStrictAuth($name)
{
$className = $this->getClassName($name);
if (!$className) {
throw new NotFound();
}
return $className::$notStrictAuth;
}
public function run($name, $data = array())
{
$className = $this->getClassName($name);
if (!$className) {
@@ -83,7 +98,7 @@ class EntryPointManager
}
$entryPoint = new $className($this->container);
$entryPoint->run();
$entryPoint->run($data);
}
protected function getClassName($name)
+19 -2
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\EntryPoints;
@@ -32,6 +39,8 @@ abstract class Base
public static $authRequired = true;
public static $notStrictAuth = false;
protected function getContainer()
{
return $this->container;
@@ -82,12 +91,20 @@ abstract class Base
return $this->getContainer()->get('fileManager');
}
protected function getLanguage()
{
return $this->getContainer()->get('language');
}
protected function getClientManager()
{
return $this->getContainer()->get('clientManager');
}
public function __construct(Container $container)
{
$this->container = $container;
}
abstract public function run();
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Exceptions;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\ExternalAccount;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\ExternalAccount\Clients;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\ExternalAccount\Clients;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\ExternalAccount\Clients;
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\ExternalAccount\OAuth2;
+79 -28
View File
@@ -18,10 +18,16 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core;
use \Espo\Core\Exceptions\Error,
\Espo\Core\Utils\Util;
@@ -45,6 +51,8 @@ class HookManager
'afterSave',
'beforeRemove',
'afterRemove',
'afterRelate',
'afterUnrelate'
);
protected $paths = array(
@@ -57,7 +65,6 @@ class HookManager
public function __construct(Container $container)
{
$this->container = $container;
$this->loadHooks();
}
protected function getConfig()
@@ -79,24 +86,30 @@ class HookManager
$metadata = $this->container->get('metadata');
$this->data = $this->getHookData($this->paths['corePath']);
$data = $this->getHookData($this->paths['customPath']);
foreach ($metadata->getModuleList() as $moduleName) {
$modulePath = str_replace('{*}', $moduleName, $this->paths['modulePath']);
$this->data = array_merge_recursive($this->data, $this->getHookData($modulePath));
$data = $this->getHookData($modulePath, $data);
}
$this->data = array_merge_recursive($this->data, $this->getHookData($this->paths['customPath']));
$data = $this->getHookData($this->paths['corePath'], $data);
$this->data = $this->sortHooks($data);
if ($this->getConfig()->get('useCache')) {
$this->getFileManager()->putPhpContents($this->cacheFile, $this->data);
}
}
public function process($scope, $hookName, $injection = null, array $options = array())
public function process($scope, $hookName, $injection = null, array $options = array(), array $hookData = array())
{
if (!isset($this->data)) {
$this->loadHooks();
}
if ($scope != 'Common') {
$this->process('Common', $hookName, $injection, $options);
$this->process('Common', $hookName, $injection, $options, $hookData);
}
if (!empty($this->data[$scope])) {
@@ -109,7 +122,7 @@ class HookManager
}
}
$hook = $this->hooks[$className];
$hook->$hookName($injection, $options);
$hook->$hookName($injection, $options, $hookData);
}
}
}
@@ -125,7 +138,8 @@ class HookManager
}
return $hook;
}
$GLOBALS['log']->error("Hook class '{$name}' does not exist.");
$GLOBALS['log']->error("Hook class '{$className}' does not exist.");
}
/**
@@ -135,14 +149,12 @@ class HookManager
*
* @return array
*/
protected function getHookData($hookDirs)
protected function getHookData($hookDirs, array $hookData = array())
{
if (is_string($hookDirs)) {
$hookDirs = (array) $hookDirs;
}
$hooks = array();
foreach ($hookDirs as $hookDir) {
if (file_exists($hookDir)) {
@@ -151,6 +163,7 @@ class HookManager
foreach ($fileList as $scopeName => $hookFiles) {
$hookScopeDirPath = Util::concatPath($hookDir, $scopeName);
$normalizedScopeName = Util::normilizeScopeName($scopeName);
$scopeHooks = array();
foreach($hookFiles as $hookFile) {
@@ -158,32 +171,70 @@ class HookManager
$className = Util::getClassName($hookFilePath);
foreach($this->hookList as $hookName) {
if (method_exists($className, $hookName)) {
$scopeHooks[$hookName][$className::$order][] = $className;
$entityHookData = isset($hookData[$scopeName][$hookName]) ? $hookData[$scopeName][$hookName] : array();
if (method_exists($className, $hookName) && !$this->isHookExists($className, $entityHookData)) {
$hookData[$normalizedScopeName][$hookName][$className::$order][] = $className;
}
}
}
//sort hooks by order
foreach ($scopeHooks as $hookName => $hookList) {
ksort($hookList);
$sortedHookList = array();
foreach($hookList as $hookDetails) {
$sortedHookList = array_merge($sortedHookList, $hookDetails);
}
$normalizedScopeName = Util::normilizeScopeName($scopeName);
$hooks[$normalizedScopeName][$hookName] = isset($hooks[$normalizedScopeName][$hookName]) ? array_merge($hooks[$normalizedScopeName][$hookName], $sortedHookList) : $sortedHookList;
}
}
}
}
return $hookData;
}
/**
* Sort hooks by an order
*
* @param array $scopeHooks
*
* @return array
*/
protected function sortHooks(array $unsortedHooks)
{
$hooks = array();
foreach ($unsortedHooks as $scopeName => $scopeHooks) {
foreach ($scopeHooks as $hookName => $hookList) {
ksort($hookList);
$sortedHookList = array();
foreach($hookList as $hookDetails) {
$sortedHookList = array_merge($sortedHookList, $hookDetails);
}
$normalizedScopeName = Util::normilizeScopeName($scopeName);
$hooks[$normalizedScopeName][$hookName] = isset($hooks[$normalizedScopeName][$hookName]) ? array_merge($hooks[$normalizedScopeName][$hookName], $sortedHookList) : $sortedHookList;
}
}
return $hooks;
}
/**
* Check if hook exists in the list
*
* @param string $className
* @param array $hookData
*
* @return boolean
*/
protected function isHookExists($className, array $hookData)
{
$class = preg_replace('/^.*\\\(.*)$/', '$1', $className);
foreach ($hookData as $key => $hookList) {
foreach ($hookList as $rowHookName) {
if (preg_match('/\\'.$class.'$/', $rowHookName)) {
return true;
}
}
}
return false;
}
}
+32 -7
View File
@@ -18,19 +18,27 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Hooks;
use \Espo\Core\Interfaces\Injectable;
use Espo\Core\Interfaces\Injectable;
abstract class Base implements Injectable
{
protected $dependencies = array(
'container',
'entityManager',
'config',
'metadata',
'acl',
'aclManager',
'user',
);
@@ -52,6 +60,13 @@ abstract class Base implements Injectable
return $this->dependencies;
}
protected function addDependencyList(array $list)
{
foreach ($list as $item) {
$this->addDependency($item);
}
}
protected function addDependency($name)
{
$this->dependencies[] = $name;
@@ -67,29 +82,39 @@ abstract class Base implements Injectable
$this->injections[$name] = $object;
}
protected function getContainer()
{
return $this->getInjection('container');
}
protected function getEntityManager()
{
return $this->injections['entityManager'];
return $this->getInjection('entityManager');
}
protected function getUser()
{
return $this->injections['user'];
return $this->getInjection('user');
}
protected function getAcl()
{
return $this->injections['acl'];
return $this->getContainer()->get('acl');
}
protected function getAclManager()
{
return $this->getInjection('aclManager');
}
protected function getConfig()
{
return $this->injections['config'];
return $this->getInjection('config');
}
protected function getMetadata()
{
return $this->injections['metadata'];
return $this->getInjection('metadata');
}
protected function getRepository()
+72 -20
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Htmlizer;
@@ -27,7 +34,7 @@ use Espo\Core\Exceptions\Error;
use Espo\Core\Utils\File\Manager as FileManager;
use Espo\Core\Utils\DateTime;
use Espo\Core\Utils\Number;
use Espo\Core\Utils\NumberUtil;
require('vendor/zordius/lightncandy/src/lightncandy.php');
@@ -39,42 +46,52 @@ class Htmlizer
protected $config;
public function __construct(FileManager $fileManager, DateTime $dateTime, Number $number)
protected $acl;
public function __construct(FileManager $fileManager, DateTime $dateTime, NumberUtil $number, $acl = null)
{
$this->fileManager = $fileManager;
$this->dateTime = $dateTime;
$this->number = $number;
$this->acl = $acl;
}
protected function formatNumber($value)
protected function getAcl()
{
return $this->number->format($value);
return $this->acl;
}
protected function format($value)
{
if (is_float($value) || is_int($value)) {
$value = $this->formatNumber($value);
if (is_float($value)) {
$value = $this->number->format($value, 2);
} else if (is_int($value)) {
$value = $this->number->format($value);
} else if (is_string($value)) {
$value = nl2br($value);
}
return $value;
}
protected function getDataFromEntity(Entity $entity)
protected function getDataFromEntity(Entity $entity, $skipLinks = false)
{
$data = $entity->toArray();
$fieldDefs = $entity->getFields();
$fieldList = array_keys($fieldDefs);
$forbidenAttributeList = [];
if ($this->getAcl()) {
$forbidenAttributeList = $this->getAcl()->getScopeForbiddenAttributeList($entity->getEntityType(), 'read');
}
foreach ($fieldList as $field) {
$type = null;
if (!empty($fieldDefs[$field]['type'])) {
$type = $fieldDefs[$field]['type'];
}
if (in_array($field, $forbidenAttributeList)) continue;
$type = $entity->getAttributeType($field);
if ($type == Entity::DATETIME) {
if (!empty($data[$field])) {
$data[$field] = $this->dateTime->convertSystemDateTime($data[$field]);
@@ -109,6 +126,8 @@ class Htmlizer
$data[$field][$k] = $this->format($data[$field][$k]);
}
}
} else if ($type === Entity::PASSWORD) {
unset($data[$field]);
}
if (array_key_exists($field, $data)) {
@@ -116,19 +135,52 @@ class Htmlizer
}
}
if (!$skipLinks) {
$relationDefs = $entity->getRelations();
foreach ($entity->getRelationList() as $relation) {
if (
!empty($relationDefs[$relation]['type'])
&&
($entity->getRelationType($relation) === 'belongsTo' || $entity->getRelationType($relation) === 'belongsToParent')
) {
$relatedEntity = $entity->get($relation);
if (!$relatedEntity) continue;
if ($this->getAcl()) {
if (!$this->getAcl()->check($relatedEntity, 'read')) continue;
}
$data[$relation] = $this->getDataFromEntity($relatedEntity, true);
}
}
}
return $data;
}
public function render(Entity $entity, $template)
public function render(Entity $entity, $template, $id = null, $additionalData = array(), $skipLinks = false)
{
$code = \LightnCandy::compile($template);
$id = uniqid('', true);
$fileName = 'data/cache/template-' . $id;
$this->fileManager->putContents($fileName, $code);
$renderer = include($fileName);
$this->fileManager->removeFile($fileName);
$data = $this->getDataFromEntity($entity);
$toRemove = false;
if ($id === null) {
$id = uniqid('', true);
$toRemove = true;
}
$fileName = 'data/cache/templates/' . $id . '.php';
$this->fileManager->putContents($fileName, $code);
$renderer = $this->fileManager->getPhpContents($fileName);
if ($toRemove) {
$this->fileManager->removeFile($fileName);
}
$data = $this->getDataFromEntity($entity, $skipLinks);
foreach ($additionalData as $k => $value) {
$data[$k] = $value;
}
$html = $renderer($data);
@@ -18,14 +18,21 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Interfaces;
interface Injectable
{
public function getDependencyList();
public function inject($name, $object);
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Interfaces;
+7 -2
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Jobs;
@@ -63,7 +70,5 @@ abstract class Base
$this->container = $container;
}
abstract public function run();
}
+7
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Loaders;
@@ -0,0 +1,43 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Loaders;
class EmailFilterManager extends Base
{
public function load()
{
$emailFilterManager = new \Espo\Core\Utils\EmailFilterManager(
$this->getContainer()->get('entityManager')
);
return $emailFilterManager;
}
}
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Loaders;
@@ -33,8 +40,9 @@ class EntityManager extends Base
'port' => $config->get('database.port'),
'dbname' => $config->get('database.dbname'),
'user' => $config->get('database.user'),
'charset' => $config->get('database.charset', 'utf8'),
'password' => $config->get('database.password'),
'metadata' => $this->getContainer()->get('metadata')->getOrmMetadata(),
'metadata' => $this->getContainer()->get('ormMetadata')->getData(),
'repositoryFactoryClassName' => '\\Espo\\Core\\ORM\\RepositoryFactory',
'driver' => $config->get('database.driver'),
'platform' => $config->get('database.platform')
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Loaders;
@@ -29,7 +36,9 @@ class EntityManagerUtil extends Base
$entityManager = new \Espo\Core\Utils\EntityManager(
$this->getContainer()->get('metadata'),
$this->getContainer()->get('language'),
$this->getContainer()->get('fileManager')
$this->getContainer()->get('fileManager'),
$this->getContainer()->get('config'),
$this->getContainer()
);
return $entityManager;
@@ -0,0 +1,44 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Loaders;
class TemplateFileManager extends Base
{
public function load()
{
$templateFileManager = new \Espo\Core\Utils\TemplateFileManager(
$this->getContainer()->get('config'),
$this->getContainer()->get('metadata')
);
return $templateFileManager;
}
}
@@ -0,0 +1,133 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Mail;
use \Espo\Entities\Email;
class FiltersMatcher
{
public function __construct()
{
}
protected function matchTo(Email $email, $filter)
{
if ($email->get('to')) {
$toArr = explode(';', $email->get('to'));
foreach ($toArr as $to) {
if ($this->matchString(strtolower($filter->get('to')), strtolower($to))) {
return true;
}
}
}
}
public function match(Email $email, $subject, $skipBody = false)
{
if (is_array($subject) || $subject instanceof \Traversable) {
$filterList = $subject;
} else {
$filterList = [$subject];
}
foreach ($filterList as $filter) {
$filterCount = 0;
if ($filter->get('from')) {
$filterCount++;
if (!$this->matchString(strtolower($filter->get('from')), strtolower($email->get('from')))) {
continue;
}
}
if ($filter->get('to')) {
$filterCount++;
if (!$this->matchTo($email, $filter)) {
continue;
}
}
if ($filter->get('subject')) {
$filterCount++;
if (!$this->matchString($filter->get('subject'), $email->get('name'))) {
continue;
}
}
$wordList = $filter->get('bodyContains');
if (!empty($wordList)) {
$filterCount++;
if ($skipBody) {
continue;
}
if (!$this->matchBody($email, $filter)) {
continue;
}
}
if ($filterCount) {
return true;
}
}
return false;
}
protected function matchBody(Email $email, $filter)
{
$phraseList = $filter->get('bodyContains');
$body = $email->get('body');
$bodyPlain = $email->get('bodyPlain');
foreach ($phraseList as $phrase) {
if (stripos($bodyPlain, $phrase) !== false) {
return true;
}
if (stripos($body, $phrase) !== false) {
return true;
}
}
}
protected function matchString($pattern, $value)
{
if ($pattern == $value) {
return true;
}
$pattern = preg_quote($pattern, '#');
$pattern = str_replace('\*', '.*', $pattern).'\z';
if (preg_match('#^'.$pattern.'#', $value)) {
return true;
}
return false;
}
}
+217 -281
View File
@@ -18,6 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Mail;
@@ -25,163 +32,267 @@ namespace Espo\Core\Mail;
use \Zend\Mime\Mime as Mime;
use \Espo\ORM\Entity;
use \Espo\ORM\Email;
class Importer
{
private $entityManager;
private $fileManager;
private $config;
public function __construct($entityManager, $fileManager, $config)
private $filtersMatcher;
public function __construct($entityManager, $config)
{
$this->entityManager = $entityManager;
$this->fileManager = $fileManager;
$this->config = $config;
$this->filtersMatcher = new FiltersMatcher();
}
protected function getEntityManager()
{
return $this->entityManager;
}
protected function getConfig()
{
return $this->config;
}
protected function getFileManager()
protected function getFiltersMatcher()
{
return $this->fileManager;
return $this->filtersMatcher;
}
public function importMessage($message, $userId, $teamsIds = array())
public function importMessage($parserType = 'ZendMail', $message, $assignedUserId = null, $teamsIdList = [], $userIdList = [], $filterList = [], $fetchOnlyHeader = false, $folderData = null)
{
try {
$email = $this->getEntityManager()->getEntity('Email');
$parser = $message->getParser();
$parserClassName = '\\Espo\\Core\\Mail\\Parsers\\' . $parserType;
$subject = $message->subject;
if ($subject !== '0' && empty($subject)) {
$subject = '(No Subject)';
if (!$parser || get_class($parser) !== $parserClassName) {
$parser = new $parserClassName($this->getEntityManager());
}
$email = $this->getEntityManager()->getEntity('Email');
$email->set('isBeingImported', true);
$subject = '';
if ($parser->checkMessageAttribute($message, 'subject')) {
$subject = $parser->getMessageAttribute($message, 'subject');
}
if (!empty($subject) && is_string($subject)) {
$subject = trim($subject);
}
if ($subject !== '0' && empty($subject)) {
$subject = '(No Subject)';
}
$email->set('isHtml', false);
$email->set('name', $subject);
$email->set('status', 'Archived');
$email->set('attachmentsIds', []);
if ($assignedUserId) {
$email->set('assignedUserId', $assignedUserId);
$email->addLinkMultipleId('assignedUsers', $assignedUserId);
}
$email->set('teamsIds', $teamsIdList);
if (!empty($userIdList)) {
foreach ($userIdList as $uId) {
$email->addLinkMultipleId('users', $uId);
}
}
$email->set('isHtml', false);
$email->set('name', $subject);
$email->set('status', 'Archived');
$email->set('attachmentsIds', array());
$email->set('assignedUserId', $userId);
$email->set('teamsIds', $teamsIds);
if ($parser->checkMessageAttribute($message, 'from')) {
$email->set('fromString', $parser->getMessageAttribute($message, 'from'));
}
$fromArr = $this->getAddressListFromMessage($message, 'from');
if (isset($message->from)) {
$email->set('fromString', $message->from);
}
if (isset($message->replyTo)) {
$email->set('replyToString', $message->replyTo);
}
if ($parser->checkMessageAttribute($message, 'reply-To')) {
$email->set('replyToString', $parser->getMessageAttribute($message, 'reply-To'));
}
$toArr = $this->getAddressListFromMessage($message, 'to');
$ccArr = $this->getAddressListFromMessage($message, 'cc');
$fromArr = $parser->getAddressListFromMessage($message, 'from');
$toArr = $parser->getAddressListFromMessage($message, 'to');
$ccArr = $parser->getAddressListFromMessage($message, 'cc');
$replyToArr = $parser->getAddressListFromMessage($message, 'reply-To');
if (count($fromArr)) {
$email->set('from', $fromArr[0]);
$email->set('to', implode(';', $toArr));
$email->set('cc', implode(';', $ccArr));
}
$email->set('to', implode(';', $toArr));
$email->set('cc', implode(';', $ccArr));
$email->set('replyTo', implode(';', $replyToArr));
if (isset($message->messageId) && !empty($message->messageId)) {
$email->set('messageId', $message->messageId);
if (isset($message->deliveredTo)) {
$email->set('messageIdInternal', $message->messageId . '-' . $message->deliveredTo);
if ($folderData) {
foreach ($folderData as $uId => $folderId) {
$email->setLinkMultipleColumn('users', 'folderId', $uId, $folderId);
}
}
if ($this->getFiltersMatcher()->match($email, $filterList, true)) {
return false;
}
if ($parser->checkMessageAttribute($message, 'message-Id') && $parser->getMessageAttribute($message, 'message-Id')) {
$messageId = $parser->getMessageMessageId($message);
$email->set('messageId', $messageId);
if ($parser->checkMessageAttribute($message, 'delivered-To')) {
$email->set('messageIdInternal', $messageId . '-' . $parser->getMessageAttribute($message, 'delivered-To'));
}
if (stripos($messageId, '@espo-system') !== false) {
return;
}
}
if ($duplicate = $this->findDuplicate($email)) {
if ($assignedUserId) {
$duplicate->addLinkMultipleId('users', $assignedUserId);
$duplicate->addLinkMultipleId('assignedUsers', $assignedUserId);
}
if (!empty($userIdList)) {
foreach ($userIdList as $uId) {
$duplicate->addLinkMultipleId('users', $uId);
}
}
if ($duplicate = $this->findDuplicate($email)) {
$duplicate->loadLinkMultipleField('users');
$usersIds = $duplicate->get('usersIds');
$usersIds[] = $userId;
$duplicate->set('usersIds', $usersIds);
$this->getEntityManager()->saveEntity($duplicate);
if (!empty($teamsIds)) {
foreach ($teamsIds as $teamId) {
$this->getEntityManager()->getRepository('Email')->relate($duplicate, 'teams', $teamId);
}
if ($folderData) {
foreach ($folderData as $uId => $folderId) {
$email->setLinkMultipleColumn('users', 'folderId', $uId, $folderId);
}
return false;
}
if (isset($message->date)) {
$dt = new \DateTime($message->date);
$duplicate->set('isBeingImported', true);
$this->getEntityManager()->saveEntity($duplicate);
if (!empty($teamsIdList)) {
foreach ($teamsIdList as $teamId) {
$this->getEntityManager()->getRepository('Email')->relate($duplicate, 'teams', $teamId);
}
}
return $duplicate;
}
if ($parser->checkMessageAttribute($message, 'date')) {
try {
$dt = new \DateTime($parser->getMessageAttribute($message, 'date'));
if ($dt) {
$dateSent = $dt->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s');
$email->set('dateSent', $dateSent);
}
} else {
$email->set('dateSent', date('Y-m-d H:i:s'));
}
if (isset($message->deliveryDate)) {
$dt = new \DateTime($message->deliveryDate);
} catch (\Exception $e) {}
} else {
$email->set('dateSent', date('Y-m-d H:i:s'));
}
if ($parser->checkMessageAttribute($message, 'delivery-Date')) {
try {
$dt = new \DateTime($parser->getMessageAttribute($message, 'delivery-Date'));
if ($dt) {
$deliveryDate = $dt->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s');
$email->set('deliveryDate', $deliveryDate);
$email->set('delivery-Date', $deliveryDate);
}
} catch (\Exception $e) {}
}
if (!$fetchOnlyHeader) {
$parser->fetchContentParts($email, $message);
if ($this->getFiltersMatcher()->match($email, $filterList)) {
return false;
}
} else {
$email->set('body', '(Not fetched)');
$email->set('isHtml', false);
}
$inlineIds = array();
$parentFound = false;
if ($message->isMultipart()) {
foreach (new \RecursiveIteratorIterator($message) as $part) {
$this->importPartDataToEmail($email, $part, $inlineIds);
}
} else {
$this->importPartDataToEmail($email, $message, $inlineIds, 'text/plain');
$replied = null;
if ($parser->checkMessageAttribute($message, 'in-Reply-To') && $parser->getMessageAttribute($message, 'in-Reply-To')) {
$arr = explode(' ', $parser->getMessageAttribute($message, 'in-Reply-To'));
$inReplyTo = $arr[0];
$replied = $this->getEntityManager()->getRepository('Email')->where(array(
'messageId' => $inReplyTo
))->findOne();
if ($replied) {
$email->set('repliedId', $replied->id);
}
}
if (!$email->get('body') && $email->get('bodyPlain')) {
$email->set('body', $email->get('bodyPlain'));
if ($parser->checkMessageAttribute($message, 'references') && $parser->getMessageAttribute($message, 'references')) {
$arr = explode(' ', $parser->getMessageAttribute($message, 'references'));
$reference = $arr[0];
$reference = str_replace(array('/', '@'), " ", trim($reference, '<>'));
$parentType = $parentId = null;
$emailSent = PHP_INT_MAX;
$number = null;
$n = sscanf($reference, '%s %s %d %d espo', $parentType, $parentId, $emailSent, $number);
if ($n != 4) {
$n = sscanf($reference, '%s %s %d %d espo-system', $parentType, $parentId, $emailSent, $number);
}
$body = $email->get('body');
if (!empty($body)) {
foreach ($inlineIds as $cid => $attachmentId) {
$body = str_replace('cid:' . $cid, '?entryPoint=attachment&amp;id=' . $attachmentId, $body);
}
$email->set('body', $body);
}
$parentFound = false;
if (isset($message->references) && !empty($message->references)) {
$reference = str_replace(array('/', '@'), " ", trim($message->references, '<>'));
$parentType = $parentId = null;
$emailSent = PHP_INT_MAX;
$n = sscanf($reference, '%s %s %d %d espo', $parentType, $parentId, $emailSent, $number);
if ($n == 4 && $emailSent < time()) {
if (!empty($parentType) && !empty($parentId)) {
$email->set('parentType', $parentType);
$email->set('parentId', $parentId);
$parentFound = true;
if ($n == 4 && $emailSent < time()) {
if (!empty($parentType) && !empty($parentId)) {
if ($parentType == 'Lead') {
$parent = $this->getEntityManager()->getEntity('Lead', $parentId);
if ($parent && $parent->get('status') == 'Converted') {
if ($parent->get('createdAccountId')) {
$account = $this->getEntityManager()->getEntity('Account', $parent->get('createdAccountId'));
if ($account) {
$parentType = 'Account';
$parentId = $account->id;
}
} else {
if ($this->getConfig()->get('b2cMode')) {
if ($parent->get('createdContactId')) {
$contact = $this->getEntityManager()->getEntity('Contact', $parent->get('createdContactId'));
if ($contact) {
$parentType = 'Contact';
$parentId = $contact->id;
}
}
}
}
}
}
$email->set('parentType', $parentType);
$email->set('parentId', $parentId);
$parentFound = true;
}
}
}
if (!$parentFound) {
$from = $email->get('from');
if ($from) {
$parentFound = $this->findParent($email, $from);
}
if (!$parentFound) {
if (!empty($toArr)) {
$parentFound = $this->findParent($email, $toArr[0]);
}
if (!$parentFound) {
if ($replied && $replied->get('parentId') && $replied->get('parentType')) {
$parentFound = $this->getEntityManager()->getEntity($replied->get('parentType'), $replied->get('parentId'));
if ($parentFound) {
$email->set('parentType', $replied->get('parentType'));
$email->set('parentId', $replied->get('parentId'));
}
}
}
if (!$parentFound) {
$from = $email->get('from');
if ($from) {
$parentFound = $this->findParent($email, $from);
}
}
if (!$parentFound) {
if (!empty($replyToArr)) {
$parentFound = $this->findParent($email, $replyToArr[0]);
}
}
if (!$parentFound) {
if (!empty($toArr)) {
$parentFound = $this->findParent($email, $toArr[0]);
}
}
$this->getEntityManager()->saveEntity($email);
$this->getEntityManager()->saveEntity($email);
return $email;
} catch (\Exception $e) {}
return $email;
}
protected function findParent(Entity $email, $emailAddress)
@@ -210,15 +321,15 @@ class Importer
$email->set('parentId', $account->id);
return true;
} else {
$lead = $this->getEntityManager()->getRepository('Lead')->where(array(
'emailAddress' => $emailAddress
))->findOne();
if ($lead) {
$email->set('parentType', 'Lead');
$email->set('parentId', $lead->id);
return true;
}
}
$lead = $this->getEntityManager()->getRepository('Lead')->where(array(
'emailAddress' => $emailAddress
))->findOne();
if ($lead) {
$email->set('parentType', 'Lead');
$email->set('parentId', $lead->id);
return true;
}
}
}
}
@@ -233,179 +344,4 @@ class Importer
}
}
}
protected function getAddressListFromMessage($message, $type)
{
$addressList = array();
if (isset($message->$type)) {
$list = $message->getHeader($type)->getAddressList();
foreach ($list as $address) {
$addressList[] = $address->getEmail();
}
}
return $addressList;
}
protected function importPartDataToEmail(\Espo\Entities\Email $email, $part, &$inlineIds = array(), $defaultContentType = null)
{
try {
$type = null;
if ($part->getHeaders() && isset($part->contentType)) {
$type = strtok($part->contentType, ';');
}
$contentDisposition = false;
if (isset($part->ContentDisposition)) {
if (strpos(strtolower($part->ContentDisposition), 'attachment') === 0) {
$contentDisposition = 'attachment';
} else if (strpos(strtolower($part->ContentDisposition), 'inline') === 0) {
$contentDisposition = 'inline';
}
}
if (empty($type)) {
if (!empty($defaultContentType)) {
$type = $defaultContentType;
} else {
return;
}
}
$encoding = null;
$isAttachment = true;
if ($type == 'text/plain' || $type == 'text/html') {
if ($contentDisposition !== 'inline' && $contentDisposition !== 'attachment') {
$isAttachment = false;
$content = $this->getContentFromPart($part);
if ($type == 'text/plain') {
$bodyPlain = '';
if ($email->get('bodyPlain')) {
$bodyPlain .= $email->get('bodyPlain') . "\n";
}
$bodyPlain .= $content;
$email->set('bodyPlain', $bodyPlain);
} else if ($type == 'text/html') {
$body = '';
if ($email->get('body')) {
$body .= $email->get('body') . "<br>";
}
$body .= $content;
$email->set('isHtml', true);
$email->set('body', $body);
}
}
}
if ($isAttachment) {
$content = $part->getContent();
$disposition = null;
$fileName = null;
$contentId = null;
if ($contentDisposition) {
if ($contentDisposition === 'attachment') {
if (preg_match('/filename="?([^"]+)"?/i', $part->ContentDisposition, $m)) {
$fileName = $m[1];
$disposition = 'attachment';
}
} else if ($contentDisposition === 'inline') {
if (isset($part->contentID)) {
$contentId = trim($part->contentID, '<>');
$fileName = $contentId;
$disposition = 'inline';
} else {
// hack for iOS not proper attachments
if (empty($fileName)) {
if (preg_match('/filename="?([^"]+)"?/i', $part->ContentDisposition, $m)) {
$fileName = $m[1];
$disposition = 'attachment';
}
}
}
}
}
if (isset($part->contentTransferEncoding)) {
$encoding = strtolower($part->getHeader('Content-Transfer-Encoding')->getTransferEncoding());
}
$attachment = $this->getEntityManager()->getEntity('Attachment');
$attachment->set('name', $fileName);
$attachment->set('type', $type);
if ($disposition == 'inline') {
$attachment->set('role', 'Inline Attachment');
} else {
$attachment->set('role', 'Attachment');
}
if ($encoding == 'base64') {
$content = base64_decode($content);
}
$attachment->set('size', strlen($content));
$this->getEntityManager()->saveEntity($attachment);
$path = 'data/upload/' . $attachment->id;
$this->getFileManager()->putContents($path, $content);
if ($disposition == 'attachment') {
$attachmentsIds = $email->get('attachmentsIds');
$attachmentsIds[] = $attachment->id;
$email->set('attachmentsIds', $attachmentsIds);
} else if ($disposition == 'inline') {
$inlineIds[$contentId] = $attachment->id;
}
}
} catch (\Exception $e) {}
}
protected function getContentFromPart($part)
{
if ($part instanceof \Zend\Mime\Part) {
$content = $part->getRawContent();
if (strtolower($part->charset) != 'utf-8') {
$content = mb_convert_encoding($content, 'UTF-8', $part->charset);
}
} else {
$content = $part->getContent();
$encoding = null;
if (isset($part->contentTransferEncoding)) {
$cteHeader = $part->getHeader('Content-Transfer-Encoding');
$encoding = strtolower($cteHeader->getTransferEncoding());
}
if ($encoding == 'base64') {
$content = base64_decode($content);
}
$charset = 'UTF-8';
if (isset($part->contentType)) {
$ctHeader = $part->getHeader('Content-Type');
$charsetParamValue = $ctHeader->getParameter('charset');
if (!empty($charsetParamValue)) {
$charset = strtoupper($charsetParamValue);
}
}
if (isset($part->contentTransferEncoding)) {
$cteHeader = $part->getHeader('Content-Transfer-Encoding');
if ($cteHeader->getTransferEncoding() == 'quoted-printable') {
$content = quoted_printable_decode($content);
}
}
if ($charset !== 'UTF-8') {
$content = mb_convert_encoding($content, 'UTF-8', $charset);
}
}
return $content;
}
}
@@ -0,0 +1,102 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Espo\Core\Mail\Mail\Header;
use \Zend\Mail\Header;
use Zend\Mime\Mime;
class XQueueItemId implements Header\HeaderInterface
{
protected $fieldName = 'X-QueueItemId';
protected $id = null;
public static function fromString($headerLine)
{
list($name, $value) = Header\GenericHeader::splitHeaderLine($headerLine);
$value = Header\HeaderWrap::mimeDecodeValue($value);
if (strtolower($name) !== 'x-queue-item-id') {
throw new Header\Exception\InvalidArgumentException('Invalid header line for Message-ID string');
}
$header = new static();
$header->setId($value);
return $header;
}
public function getFieldName()
{
return $this->fieldName;
}
public function setFieldName($value)
{
}
public function setEncoding($encoding)
{
return $this;
}
public function setId($id)
{
$this->id = $id;
}
public function getEncoding()
{
return 'ASCII';
}
public function toString()
{
return $this->fieldName . ': ' . $this->getFieldValue();
}
public function getFieldValue($format = Header\HeaderInterface::FORMAT_RAW)
{
return $this->id;
}
}
+35 -1
View File
@@ -1,4 +1,38 @@
<?php
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Mail\Mail;

Some files were not shown because too many files have changed in this diff Show More