Compare commits
989 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 91523553fb | |||
| ca449b9952 | |||
| 3e0eade2f3 | |||
| 68cca25635 | |||
| 050fb4330e | |||
| 14d43bda1c | |||
| 34a8158284 | |||
| 8871842863 | |||
| 9392a26f81 | |||
| 8eac39bd50 | |||
| 2c8407581c | |||
| b89349d0ee | |||
| f554a6f649 | |||
| e4a8383758 | |||
| db94026d52 | |||
| 18e4aeb05d | |||
| 835ca877c7 | |||
| 89c1cf1f25 | |||
| 7cf512f75b | |||
| d625647b29 | |||
| 21fbef7fb4 | |||
| d18cc91341 | |||
| 76154ab765 | |||
| 11af93fcef | |||
| 23bccba214 | |||
| f47ed9f249 | |||
| 816db335c3 | |||
| 9ec359df3d | |||
| 33a19fa6dd | |||
| 12d6831505 | |||
| 3f18484910 | |||
| 834fc25a62 | |||
| ade06f0f7a | |||
| d9f4a1c2e1 | |||
| 789e01c58d | |||
| 75514fc96d | |||
| 4250514792 | |||
| 53f0932ecf | |||
| 6d1cc60947 | |||
| 632fb63102 | |||
| ac1c46303d | |||
| 8cb7689a61 | |||
| b264dfbead | |||
| aa2b89530a | |||
| 372fbc7771 | |||
| 7051d2c072 | |||
| f489400947 | |||
| 1b61bdac91 | |||
| 05c74fa848 | |||
| 311f167814 | |||
| 9060d299da | |||
| b274823087 | |||
| 42797edfb8 | |||
| 39ef9ebd3b | |||
| 5c4128e5ee | |||
| f1fdeb38a0 | |||
| 8fa65bc965 | |||
| db334baa2e | |||
| af77ee2222 | |||
| 080f31fd8f | |||
| 52b7350278 | |||
| 6699e66c29 | |||
| f3596df5f0 | |||
| db134c7912 | |||
| 97dfe2e8d7 | |||
| 4b895ac442 | |||
| 9d832484dc | |||
| 38dfa91058 | |||
| c404d47473 | |||
| d5106a6f79 | |||
| 6f9259b750 | |||
| db04a0550b | |||
| 30afaa56ab | |||
| e05261bd17 | |||
| 79e2086e0c | |||
| c36788ba26 | |||
| 548c76b93d | |||
| bb2383076a | |||
| a2e48e6252 | |||
| 89d2d01414 | |||
| 1f617e2103 | |||
| ff4e696d74 | |||
| 3689ac0253 | |||
| ee97d82ed5 | |||
| 02ab368256 | |||
| 8e5b05ff75 | |||
| 9c4345ec9e | |||
| cd6ada92fd | |||
| fc73ffb89a | |||
| f1696df4f9 | |||
| 14deff7e0e | |||
| 7980887e50 | |||
| fec23a0e93 | |||
| f7e7bc43e3 | |||
| a62e48f0bd | |||
| 07a84bac4f | |||
| 99b03e40ac | |||
| 1e31b26815 | |||
| a999ed8177 | |||
| 735a7e6085 | |||
| 6eab2fb177 | |||
| 7bfd2f32de | |||
| 3d3cb031c1 | |||
| f898beb199 | |||
| c43578984b | |||
| dfb8c22a14 | |||
| 6f9e6eecbf | |||
| c8204dcd58 | |||
| c62a5cf360 | |||
| 8ea8c54c9a | |||
| 143a2a8af2 | |||
| b82aa1b305 | |||
| 338f03ca79 | |||
| 73183e8cf9 | |||
| 03ce2d1a04 | |||
| b7c3f2b13e | |||
| b6ee6f98f2 | |||
| dd76e873fe | |||
| 3f772f6882 | |||
| f032b24eee | |||
| 4ea6dc7c46 | |||
| d9f3b83a41 | |||
| 96b2f9e1a6 | |||
| 1a3797cf59 | |||
| 500e8ca89b | |||
| f7fb3f50c3 | |||
| 4763cc80c3 | |||
| 0d744c5e7f | |||
| f132e06f67 | |||
| 2615cffd82 | |||
| d2f87537c9 | |||
| 629f410204 | |||
| 3f40c6b18f | |||
| 34b3f52276 | |||
| 4b508e3295 | |||
| dfdde2ef83 | |||
| 7dc5f4a557 | |||
| ec4e86c332 | |||
| e8978c654b | |||
| cb29ee3304 | |||
| 88cac5c6c0 | |||
| a968726810 | |||
| 9508903cf5 | |||
| 113649ba3d | |||
| 0fb9fe5e4c | |||
| 5e877dd374 | |||
| bcf54d9fb0 | |||
| 5c42133e7b | |||
| 93c9afe338 | |||
| 5dc3492f34 | |||
| 9b12c5c9c1 | |||
| 3d96381b3f | |||
| 1bd4468f57 | |||
| e183bb4fa6 | |||
| a79ece4a3d | |||
| 93bfa83b46 | |||
| 97fa72042e | |||
| d5069487ae | |||
| 0a5f852d04 | |||
| dcc2fd0382 | |||
| bf7f0d5cbc | |||
| a337aef8a7 | |||
| 30dec3be52 | |||
| 604aca50c8 | |||
| 949dc96e7b | |||
| fd4998b365 | |||
| fc28bee3d4 | |||
| d126cb5a25 | |||
| d8bc83ae22 | |||
| b1a1ea068a | |||
| e4c2d4eae1 | |||
| 66bdb7b547 | |||
| 9fccc3c1f3 | |||
| 4e2bc0658d | |||
| 0effcab5c2 | |||
| 1f5ab5f45c | |||
| 4789fc15a5 | |||
| 6f2270eea7 | |||
| a0f43c8f8f | |||
| b36b5857c1 | |||
| c6de42fd80 | |||
| 18f9026acf | |||
| 5e7f61b46d | |||
| c5e41faa0f | |||
| 465377c67b | |||
| f41cc85cba | |||
| fdf08624cb | |||
| 5c89f4f389 | |||
| acce8f1b1f | |||
| f1382e802e | |||
| f64e59b0de | |||
| 5b41abe76f | |||
| f286d2277e | |||
| b38c983e73 | |||
| 18ddd05631 | |||
| be8cfcf47a | |||
| a70d133471 | |||
| bc3d488bfe | |||
| e9578d8d44 | |||
| 4c38d96730 | |||
| b962d1572a | |||
| 9f21a722ec | |||
| 4deb9d6d77 | |||
| 472073ee5a | |||
| 3f1f686bd1 | |||
| dc962d868f | |||
| 9e32211168 | |||
| 0f9281812d | |||
| 56b099983f | |||
| dbef224120 | |||
| 388e0f3478 | |||
| 280d7f328e | |||
| 6ec6ffc470 | |||
| 611bbb8fb2 | |||
| 7dc5d5583f | |||
| cab31c7dc6 | |||
| 43d7b702f1 | |||
| c8dbce18f7 | |||
| b89b39cd44 | |||
| 24084d4c30 | |||
| 9a6e2d6578 | |||
| 3968caf2bc | |||
| 192faa9ce9 | |||
| beedfa700d | |||
| 9f63c00f5c | |||
| a851d71c1c | |||
| f11b9c0bbc | |||
| 6ea109f712 | |||
| 275b3b879e | |||
| 70e2e49d88 | |||
| fe36d049af | |||
| f029ea2c81 | |||
| 1c3dc61264 | |||
| c415ce677d | |||
| 927a580dce | |||
| fa35516c94 | |||
| e05eafb9a9 | |||
| 7c3f7dd494 | |||
| b41ec363c5 | |||
| bebbeecac3 | |||
| 424a365d5d | |||
| 3e63d03ced | |||
| 83bd4458a2 | |||
| eac8ce736c | |||
| 0a096ce926 | |||
| 8e3b44c2e1 | |||
| 7a580599cf | |||
| 4048b7207b | |||
| c82da61193 | |||
| a87231552b | |||
| 0ec73779bf | |||
| 2a705fcc84 | |||
| 6eff3b3eae | |||
| a260e15ba7 | |||
| 2a7d8cbc2e | |||
| 84f1d8f625 | |||
| 1b852fbd04 | |||
| d770dd26e0 | |||
| b79bd72c8a | |||
| a234f503a1 | |||
| 55be5b12b2 | |||
| 1f400649f5 | |||
| e6f65440f2 | |||
| def8455d78 | |||
| 1ad2144432 | |||
| c2828e3273 | |||
| 725e428626 | |||
| b1f272215a | |||
| 032199d9c7 | |||
| cce78ac258 | |||
| ea41d2c40c | |||
| befb2327a3 | |||
| eae677f846 | |||
| 26f65def3e | |||
| 69b275deb1 | |||
| 95ccc38759 | |||
| 31099827d4 | |||
| 91944c617c | |||
| 67074f2b0a | |||
| 4f2f7c05ca | |||
| c4bfa05e2f | |||
| a8e86433ce | |||
| 3b1950bc6e | |||
| 8e666da93a | |||
| 7031afe9df | |||
| b1da843702 | |||
| ea3189ebc3 | |||
| 83e7e0b517 | |||
| 2c1fed8adf | |||
| 45e6f3bb34 | |||
| f53708c38e | |||
| d1aa3f721d | |||
| 0afe715d9a | |||
| 9cbe31300a | |||
| dde139f0a1 | |||
| 5fb8b2c71c | |||
| 63c07a1f17 | |||
| a338bbca59 | |||
| 157bf87d40 | |||
| 911a9f80de | |||
| c9bbbeb2c4 | |||
| 109847f604 | |||
| ff033e88d5 | |||
| 57803c0828 | |||
| 3d8be61fbf | |||
| 690e87a3fb | |||
| 72569af873 | |||
| cd45f07e54 | |||
| a35f9625af | |||
| f5245ef3eb | |||
| 49e8fdff95 | |||
| e9d35dd26d | |||
| 4ad9ef770b | |||
| acbc74d858 | |||
| 8da3350523 | |||
| 496879dd79 | |||
| 84cda80fd8 | |||
| 50a81b1247 | |||
| f0f225f349 | |||
| d49fff1289 | |||
| abaa1b302b | |||
| 0eaa7825ea | |||
| 1028b7c5b3 | |||
| f319e5219d | |||
| 0daae5ced5 | |||
| abee63d269 | |||
| be33d90986 | |||
| 3a7cac824d | |||
| 7d616b075f | |||
| b718765138 | |||
| 3104be7c99 | |||
| a8d182b4cd | |||
| 3bfc99c88b | |||
| ac3300a5cf | |||
| 636587a22c | |||
| 4ed2c71dfd | |||
| 723229d8e6 | |||
| 080ab488fa | |||
| fd32696c5a | |||
| 9a56858f12 | |||
| 5923757810 | |||
| 62948a7740 | |||
| 821d57ce00 | |||
| efd0505ead | |||
| 91c55965a7 | |||
| 974305e152 | |||
| 016abaf7b6 | |||
| f3ec50dcbd | |||
| baeee7caf5 | |||
| 56280224f9 | |||
| 4b3e341606 | |||
| 58fad48d5e | |||
| 841a73b886 | |||
| f74ae46ec9 | |||
| 542d78425c | |||
| 7b241b90a0 | |||
| de77b1b1d0 | |||
| 8199692df7 | |||
| 1d3a340d3a | |||
| d664f29388 | |||
| 4d0e1af000 | |||
| 97ea0c71e1 | |||
| d9fbcda231 | |||
| f4b5cfa5b6 | |||
| 4391c7a7ac | |||
| 6c14f390f6 | |||
| 4a6829cf10 | |||
| 2b6c493be5 | |||
| 597406f70d | |||
| 110e2fbc37 | |||
| 3e1fab487a | |||
| c76e34fe81 | |||
| eb922103a8 | |||
| 9b946c6a1f | |||
| e2df819e57 | |||
| 9b00d50079 | |||
| 814f79d53b | |||
| 0d6482374e | |||
| 427e3d466a | |||
| ae72768f8c | |||
| bd4e92d892 | |||
| afc17ac54c | |||
| 52dda066cd | |||
| 29bec8fcd6 | |||
| 5c4fd344e4 | |||
| e936ad907b | |||
| bc59dab9ec | |||
| 48652e35ee | |||
| 381a51b836 | |||
| a9f36a352d | |||
| 6c8a0bbb66 | |||
| b21b69eed5 | |||
| ef0d3febd8 | |||
| 2d6db7570c | |||
| a7804742e7 | |||
| 09301e9d7c | |||
| 5d10da3b78 | |||
| dcc4cce872 | |||
| 02fbc20838 | |||
| 6641075043 | |||
| 6624b178c0 | |||
| 4ec6708cb4 | |||
| f9752eab02 | |||
| 3de816e03a | |||
| b854ebab43 | |||
| ffab7c3e6b | |||
| b6e09ec75a | |||
| 083c768af9 | |||
| fd052c1cdb | |||
| 41e0e29500 | |||
| 3cbd918507 | |||
| 94c9db2fde | |||
| da29d6149b | |||
| abd887363f | |||
| 8e2fe95e0c | |||
| 75e5349475 | |||
| 9a081d784e | |||
| 960446f9fa | |||
| 7cac38f39d | |||
| 98e69436d9 | |||
| 415eff0486 | |||
| 850f6ad41e | |||
| a5433ec82a | |||
| 9b2ac56563 | |||
| 43fed19d07 | |||
| 2f93dfd653 | |||
| c752e8fc91 | |||
| 00230f50d6 | |||
| 3b880de16d | |||
| 6acba3efb8 | |||
| 57843f5f86 | |||
| 73b00190f7 | |||
| 20ede11bdd | |||
| 9d485624a8 | |||
| 3fe4bc34ef | |||
| a38fd487f4 | |||
| 91506a8ca6 | |||
| d01748a24c | |||
| a3f7f4e2d2 | |||
| 2df476d734 | |||
| bf5fe492b3 | |||
| 87036f83e1 | |||
| cf65e40b35 | |||
| 5fe98cbbbc | |||
| 1b94573502 | |||
| d28638136a | |||
| ca05495e9e | |||
| c572d0110f | |||
| 3057f749c4 | |||
| 62c865bdc3 | |||
| 7e2bd60382 | |||
| 84434fa14a | |||
| 1c1b8b3985 | |||
| ea15452db4 | |||
| b39d2b34e2 | |||
| e6d79e0847 | |||
| 1f334c2690 | |||
| 6cfd5db8ac | |||
| 3478aa772c | |||
| f2c769a062 | |||
| 6e1d905db9 | |||
| 882eeffdd5 | |||
| 1e4e8b3fcf | |||
| 4b25456acd | |||
| 68615ba8bb | |||
| 8bafcded50 | |||
| 2e7dca6540 | |||
| d25b4a4e3a | |||
| fbf6b39dae | |||
| 60bb06c6af | |||
| a169aca4f0 | |||
| 3e83e97197 | |||
| 70cdbe6020 | |||
| 36d089cfe7 | |||
| 0ea1be6307 | |||
| 73cebf7e5f | |||
| bbd943eb93 | |||
| 2a891c01e7 | |||
| c6b1bb9c57 | |||
| 03d06a5919 | |||
| c02f39cf93 | |||
| d064d3ea1c | |||
| 670cbc4971 | |||
| 2eedc93d27 | |||
| 8e80153a1a | |||
| a80f1f4662 | |||
| 0602074554 | |||
| 8f49f25057 | |||
| 374d827edd | |||
| 6648e9ba02 | |||
| 45773c5fce | |||
| c9336b882c | |||
| b39d220f82 | |||
| 064d63abed | |||
| 104fc41895 | |||
| b0fc7ffd0a | |||
| ce2861b337 | |||
| ccb5baf025 | |||
| ff227c9813 | |||
| a3a60713ef | |||
| 5bae4c7968 | |||
| 57e7556424 | |||
| de7e573dbe | |||
| 27579a0111 | |||
| 9933e2bff2 | |||
| 061aeaeecc | |||
| 07eb8daee2 | |||
| 1d0fdbd73b | |||
| f9a9f60ad4 | |||
| 21bf0953e6 | |||
| a6b31c48af | |||
| 62ac499867 | |||
| d7d0e79e4b | |||
| 4667d62ad5 | |||
| 017ac9c547 | |||
| b73db26a41 | |||
| 3634872a33 | |||
| cbe6711a83 | |||
| bcad4a9e88 | |||
| 4b6e6928c6 | |||
| fe32fd86c5 | |||
| b704730e18 | |||
| 11562ff515 | |||
| bf3abeaa1d | |||
| 3731a5558b | |||
| 66e15a4404 | |||
| 23dc2f09a2 | |||
| 925702516c | |||
| 5bcea44ecb | |||
| 054f3851be | |||
| fffa95a206 | |||
| 9d9e13a07d | |||
| afeff90096 | |||
| fffb214e5d | |||
| acb8f95929 | |||
| 3323e947b6 | |||
| efc4bf2a89 | |||
| 47618a3555 | |||
| e89694c8b9 | |||
| 69c6b2db1c | |||
| 89818b2eea | |||
| 806461750a | |||
| 8ac7a855cc | |||
| e85f7a533f | |||
| b58561e46f | |||
| 21909f985b | |||
| a1c0269443 | |||
| 96bdd54782 | |||
| 8d68305e38 | |||
| 554d105aac | |||
| f3681e8ad7 | |||
| d088225542 | |||
| e4be1156db | |||
| 76599130cf | |||
| e9208602f6 | |||
| e2f57d4869 | |||
| 98dd4bc51c | |||
| cb4356c689 | |||
| 99e8642ef6 | |||
| e5575ee673 | |||
| e1d7733848 | |||
| b08f7de0cb | |||
| d83f02010a | |||
| 02b66272bb | |||
| 4ef3b2975e | |||
| 88bc592fcd | |||
| 2fe1d892c5 | |||
| 9c2a125365 | |||
| d21e61bdf5 | |||
| a2e6bb6fd9 | |||
| 381f4886a9 | |||
| ab538e1901 | |||
| 506200901d | |||
| 764b0c6705 | |||
| 34209c0811 | |||
| 0e3b94e1bb | |||
| fd95fa73ce | |||
| 3f056c8472 | |||
| ef48999614 | |||
| 087ab2b954 | |||
| e79e75c0d5 | |||
| cb37ee88b2 | |||
| 9ead5dad66 | |||
| 4b39626b83 | |||
| 2b5b7eb601 | |||
| 0785e2a059 | |||
| 2187073e2b | |||
| 3c36e81502 | |||
| fe6b6bc869 | |||
| d9cdcfa332 | |||
| 0db2dbc0f3 | |||
| e319ead6a7 | |||
| 0dae38943f | |||
| f9e4ae7b71 | |||
| 2f4f4dc023 | |||
| f8bafa5221 | |||
| 00a0cb1394 | |||
| 3a37f8421d | |||
| 2dbde4e2c8 | |||
| 98084e9314 | |||
| 2946969e3a | |||
| 75c3891654 | |||
| c0866c8fea | |||
| 5d3a785a49 | |||
| 4bcf88dcee | |||
| 889f976c5f | |||
| 022d9a42ec | |||
| ac80f67533 | |||
| 1ffbf63731 | |||
| 83fa22852a | |||
| 7ffd8a54a1 | |||
| 739cb5e98f | |||
| f5e1b7175e | |||
| 81cb2aaeb8 | |||
| bc54bafc3a | |||
| fe635064d5 | |||
| 01ba132a62 | |||
| ac318bb302 | |||
| 4b31173355 | |||
| 34cd265fc1 | |||
| 22f19c0ac9 | |||
| 93f8ef9daa | |||
| 81ffbc8e6d | |||
| 061dda1a1e | |||
| c83a24794d | |||
| 5ab6d25e82 | |||
| 36aab22272 | |||
| a21d5dba9f | |||
| bb8e543509 | |||
| b93112aaff | |||
| c303ec9479 | |||
| 76f10fefa3 | |||
| becd564420 | |||
| c4f3c1dbd1 | |||
| f4d1b4a5b8 | |||
| 045264d95f | |||
| 797fab769f | |||
| 41d8605e17 | |||
| 18bcaf7e6e | |||
| 13a2ba47e7 | |||
| 1ef60781a0 | |||
| 64dfad8cc1 | |||
| 9862c6d960 | |||
| 1cfa5ce2b3 | |||
| 4a09baef3a | |||
| 5893243ae3 | |||
| 4c598d19b5 | |||
| dbc5a47d79 | |||
| 0fda920610 | |||
| a6a6ce6722 | |||
| 4db421a75f | |||
| 3f6cfe3749 | |||
| ec9653ff48 | |||
| 24c19f12e5 | |||
| 172bba9de5 | |||
| 7d4227c98d | |||
| 4e64ebb346 | |||
| 1102e9f1e8 | |||
| f5f16a7eb3 | |||
| 7901df4221 | |||
| 41b114684e | |||
| 03788be209 | |||
| 685226c4d4 | |||
| f8d9548ed5 | |||
| 49798c8f7f | |||
| ab4e85ea45 | |||
| 7d7d2d4276 | |||
| 607ee9a080 | |||
| 3f3b65ad90 | |||
| 354866a809 | |||
| 58cda4f31a | |||
| 454c388d10 | |||
| e0125fa8f9 | |||
| 540c594b1c | |||
| 025ac8fe34 | |||
| 6d18cac9a9 | |||
| f555ee9f9d | |||
| 5ac2e9b516 | |||
| 2cc8c3710f | |||
| 72d93cbae4 | |||
| e30838cf27 | |||
| 790355fb63 | |||
| 371fbf9864 | |||
| 6e157db23d | |||
| 85c3d6c4e5 | |||
| d947236bcc | |||
| 98343cb099 | |||
| e3ac8c3f67 | |||
| 2087894c3a | |||
| 5c00a7ad43 | |||
| fe0dcc5342 | |||
| f05381cc43 | |||
| a9a30d7237 | |||
| 5312c1d141 | |||
| a97d516c4f | |||
| 16c24abb55 | |||
| ed897e9b97 | |||
| b4b222c1d7 | |||
| a68d711249 | |||
| d6834f7f97 | |||
| 20818659e8 | |||
| 1c668ce983 | |||
| a9dacd74c6 | |||
| b7c9ddc4e6 | |||
| d5ee599f9f | |||
| 252d6bccd3 | |||
| 742f4e21b5 | |||
| 78fc80a619 | |||
| 5a30c6a229 | |||
| e74fdce568 | |||
| 20139a88af | |||
| 3d1f632a73 | |||
| 9e459e1287 | |||
| 7b9cf6c039 | |||
| 1cebef107e | |||
| 47fe232c78 | |||
| 2c458a69a1 | |||
| 54a290121e | |||
| 11420dc0af | |||
| 957680a3d0 | |||
| 3c6e19f4c0 | |||
| 4253915eed | |||
| da34789020 | |||
| cc057af59a | |||
| ebaa3ed958 | |||
| 307c045c0e | |||
| 8e09b81cf0 | |||
| f40aeb0830 | |||
| 135b56001c | |||
| cc97454c58 | |||
| 9d3e3e282f | |||
| 1bcd54dfe1 | |||
| 727f3a4707 | |||
| d5473f9985 | |||
| 85c06f7ca3 | |||
| 1d4d9882b6 | |||
| e633984f7e | |||
| 2dabecbae3 | |||
| 1a4e40d0cd | |||
| 6ea5ed4f55 | |||
| c0800a4d16 | |||
| 85c62c0789 | |||
| 551e82ad8b | |||
| 7f4328499b | |||
| de4d794d72 | |||
| e2e374301a | |||
| 7a919dedfd | |||
| 06c8cbac52 | |||
| f54ad3ab0d | |||
| 197fb26beb | |||
| 9e4582af17 | |||
| b399c4444d | |||
| b7e9e69f35 | |||
| 105b6444ed | |||
| 3559ff9f4e | |||
| 4be2962567 | |||
| 1cce748af5 | |||
| 64d3e3b5dd | |||
| 2e0233a239 | |||
| 5b4bd88907 | |||
| 6176ead935 | |||
| 46ddf3b127 | |||
| 2944e64de5 | |||
| 372cf20145 | |||
| de68227d49 | |||
| 633cc12650 | |||
| 202d799436 | |||
| f14d12853b | |||
| a98f7f5068 | |||
| ebe249bd6b | |||
| 7957296479 | |||
| b7eac5ba42 | |||
| 14cab0dbde | |||
| 5db39d14e7 | |||
| cf473d6f16 | |||
| a082ea6acc | |||
| f770074be2 | |||
| 106e7726ba | |||
| ed0ca19ed5 | |||
| e680be54ad | |||
| 3224795368 | |||
| ec5bd78a33 | |||
| d0c5d2aace | |||
| f8d0688f2f | |||
| 2b2b2b9faa | |||
| ed4ce1a36e | |||
| a6d7f91a58 | |||
| f6f6c2b2ac | |||
| 8c628df639 | |||
| ffd3f762ce | |||
| 24628a8487 | |||
| 573d147dad | |||
| 4ab767e95b | |||
| 18b64238ee | |||
| 65ded811b4 | |||
| 57f454693a | |||
| b6409b5cba | |||
| e6a83f7d19 | |||
| c39e1d140f | |||
| 1c69f1ca95 | |||
| a21c071349 | |||
| d8d8e68914 | |||
| 741a6d5dab | |||
| 0c0a602330 | |||
| 7d13018eba | |||
| 44c65c0117 | |||
| e9e758c4b3 | |||
| 7e7acb8d28 | |||
| 4b28687c37 | |||
| 1ab897db28 | |||
| 1a990850ca | |||
| 36e360e167 | |||
| 9ffdb1a1f0 | |||
| 64b15f9282 | |||
| e8ebe51f1c | |||
| ec2a7d2f48 | |||
| 6782e7c15c | |||
| 3c73e3e8cf | |||
| 321306c42d | |||
| 4ab7d19776 | |||
| 92864d9133 | |||
| 34e33bd13a | |||
| 49fa22fa3d | |||
| 10fcd79155 | |||
| 00598170af | |||
| ac5b2f38d4 | |||
| 82d486a2b4 | |||
| 6cdc8f2823 | |||
| d611ebfc86 | |||
| 599a7c6080 | |||
| 4c21f1192d | |||
| 63e78baf21 | |||
| fa2c689a34 | |||
| a53b440b8b | |||
| 8189832af2 | |||
| 135f869e1a | |||
| 2d56525a25 | |||
| 9e78276f3d | |||
| 03773dd929 | |||
| 5b8dba68f3 | |||
| f63c75e18d | |||
| 6dd0bd8b90 | |||
| 94e86f875a | |||
| b582b20003 | |||
| e58e82eea1 | |||
| dddc4feda8 | |||
| a65421a268 | |||
| b6696dcc26 | |||
| 4e3d8fb98f | |||
| e0aaff932e | |||
| bd61c12ea2 | |||
| 17ea760851 | |||
| f3d11aede3 | |||
| 8053d65f33 | |||
| 01809d2cc3 | |||
| ac8e3d1a69 | |||
| b669ccf733 | |||
| 8c42c6bf0b | |||
| 97bdd22795 | |||
| 0f3cd7913c | |||
| 502cfc8d76 | |||
| 010f757452 | |||
| 4230f768e5 | |||
| 4197f30ad5 | |||
| b4eecbd0af | |||
| 6560c0e0bd | |||
| d31e826305 | |||
| a9f2fe8590 | |||
| 28a62a2581 | |||
| 0d4b548160 | |||
| 2240819930 | |||
| deff6bad36 | |||
| f2bc80b7d9 | |||
| b5b5cac0ac | |||
| 308f30510b | |||
| 574513a9c8 | |||
| f37bc7d46b | |||
| 9f5db434df | |||
| 1c8abd6e36 | |||
| c95fcd6fbd | |||
| e6009366e8 | |||
| 286502d872 | |||
| 0749bdc006 | |||
| 72ef137dbe | |||
| f624bdef5c | |||
| 9730680e41 | |||
| 5d857f6a86 | |||
| 44947f8844 | |||
| c59fa40615 | |||
| 4dc08dd37c | |||
| e76c7564dc | |||
| 802bac82f0 | |||
| 172af61b6b | |||
| e6bdaa1c86 | |||
| c64cc13e4c | |||
| 30be62eabe | |||
| 1c1703b349 | |||
| 6916f3242c | |||
| d2630a5c3f | |||
| 3e02776fcd | |||
| 376bfe63e0 | |||
| 950a3b4703 | |||
| 2f5ffb7421 | |||
| 043ef8ef3e | |||
| a959a2deaf | |||
| 65a3f4e5f3 | |||
| 97355ad024 | |||
| 99300d2d61 | |||
| e070d9d9f1 | |||
| 77a884c951 | |||
| 6a2974845a | |||
| 0095cfd68c | |||
| 22f0e5b399 | |||
| 1abc853bc5 | |||
| 6f9dc66104 | |||
| d9094238c1 | |||
| 25ea320042 | |||
| 8f9bb79978 | |||
| 405a5c29df | |||
| 4f2a2b290b | |||
| fd5218c10b | |||
| 73ab4aa42e | |||
| 66a60b1257 | |||
| c975954944 | |||
| 86799ed742 | |||
| 0c143eb8a1 | |||
| 1da6eca3be | |||
| a462158582 | |||
| 152b8991d3 | |||
| 5adcf013d7 | |||
| 9d6401cbd3 | |||
| 9f178bb467 | |||
| f3b2cc9bcb | |||
| b18a8c1b2b | |||
| 30dd7e560b | |||
| ca35a4df75 | |||
| fe0a6d1a8b | |||
| f9223087df | |||
| f3980ef9a1 | |||
| 93553d18fc | |||
| e35561093d | |||
| b0742aa0c6 | |||
| efad2b142a | |||
| 362f895e72 | |||
| 224b73eb89 | |||
| c4cf45e7f8 | |||
| cb45e57a99 | |||
| e7f62f79ef | |||
| 6fb21ccd77 | |||
| f55d814cbb | |||
| 8fa22a6c7d | |||
| b86ca3a4ec | |||
| ab51e70ff4 | |||
| 0bde83c0e7 | |||
| 589754851c | |||
| 253930ba6d | |||
| 09c19bbba5 | |||
| ac96ebffa5 | |||
| f01715452f | |||
| 875b01dcd6 | |||
| 61def7e332 | |||
| 86b24ff618 | |||
| 1d29d74204 | |||
| 2cf820e181 | |||
| bf8ab4dec2 | |||
| 7b772bde3c | |||
| 16bad37dc5 | |||
| 76b8009323 | |||
| d67f806ec8 | |||
| 72bed367e4 | |||
| fe2a4f91ee | |||
| 471dd1ab49 | |||
| 8efc395ca1 | |||
| dfbad82ba8 | |||
| 84938d88fc | |||
| ed5f66729d | |||
| ee5218c46d | |||
| 6758d71e2e | |||
| 1eec3d88cf | |||
| 34f1c196f1 | |||
| a87e2fb5db | |||
| cecafa5e28 | |||
| a0e5f2d8ec | |||
| 47080f9b78 | |||
| 07fa53d0c2 | |||
| 698f70a358 | |||
| 3170571cb9 | |||
| e48c067b05 | |||
| 492670eb7d |
+2
-1
@@ -15,4 +15,5 @@ npm-debug.log
|
||||
/tests/integration/config.php
|
||||
composer.phar
|
||||
vendor/
|
||||
/custom/Espo/Custom/*
|
||||
/custom/Espo/Custom/*
|
||||
/install/config.php
|
||||
@@ -9,13 +9,9 @@ DirectoryIndex index.php index.html
|
||||
|
||||
# PROTECTED DIRECTORIES
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^/?(data|api|client)/ - [F]
|
||||
RewriteRule ^/?(api|client)/ - [F]
|
||||
|
||||
RewriteRule ^/?data/config\.php$ - [F]
|
||||
RewriteRule ^/?data/logs/ - [F]
|
||||
RewriteRule ^/?data/cache/ - [F]
|
||||
RewriteRule ^/?data/upload/ - [F]
|
||||
RewriteRule ^/?data/\.backup/ - [F]
|
||||
RewriteRule ^/?data/ - [F]
|
||||
RewriteRule ^/?application/ - [F]
|
||||
RewriteRule ^/?custom/ - [F]
|
||||
RewriteRule ^/?vendor/ - [F]
|
||||
|
||||
+119
-22
@@ -2,7 +2,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -18,6 +18,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* * `grunt` - full build
|
||||
* * `grunt dev` - build only items needed for development
|
||||
* * `grunt offline` - skips *composer install*
|
||||
* * `grant release` - full build plus upgrade packages`
|
||||
* * `grant tests` - build and run tests
|
||||
*/
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
||||
var jsFilesToMinify = [
|
||||
@@ -71,6 +80,7 @@ module.exports = function (grunt) {
|
||||
'client/src/theme-manager.js',
|
||||
'client/src/session-storage.js',
|
||||
'client/src/view-helper.js',
|
||||
'client/src/page-title.js',
|
||||
|
||||
'client/src/app.js'
|
||||
];
|
||||
@@ -83,6 +93,10 @@ module.exports = function (grunt) {
|
||||
}
|
||||
|
||||
var fs = require('fs');
|
||||
var cp = require('child_process');
|
||||
var path = require('path');
|
||||
|
||||
var currentPath = path.dirname(fs.realpathSync(__filename));
|
||||
|
||||
var themeList = [];
|
||||
fs.readdirSync('application/Espo/Resources/metadata/themes').forEach(function (file) {
|
||||
@@ -108,8 +122,10 @@ module.exports = function (grunt) {
|
||||
lessData[theme] = o;
|
||||
});
|
||||
|
||||
var pkg = grunt.file.readJSON('package.json');
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
pkg: pkg,
|
||||
|
||||
mkdir: {
|
||||
tmp: {
|
||||
@@ -125,8 +141,13 @@ module.exports = function (grunt) {
|
||||
clean: {
|
||||
start: ['build/EspoCRM-*'],
|
||||
final: ['build/tmp'],
|
||||
release: ['build/EspoCRM-' + pkg.version],
|
||||
beforeFinal: {
|
||||
src: ['build/tmp/custom/Espo/Custom/*', '!build/tmp/custom/Espo/Custom/.htaccess']
|
||||
src: [
|
||||
'build/tmp/custom/Espo/Custom/*',
|
||||
'!build/tmp/custom/Espo/Custom/.htaccess',
|
||||
'build/tmp/install/config.php',
|
||||
]
|
||||
}
|
||||
},
|
||||
less: lessData,
|
||||
@@ -146,6 +167,9 @@ module.exports = function (grunt) {
|
||||
})
|
||||
},
|
||||
copy: {
|
||||
options: {
|
||||
mode: true,
|
||||
},
|
||||
frontendFolders: {
|
||||
expand: true,
|
||||
cwd: 'client',
|
||||
@@ -190,6 +214,7 @@ module.exports = function (grunt) {
|
||||
'extension.php',
|
||||
'websocket.php',
|
||||
'command.php',
|
||||
'oauth-callback.php',
|
||||
'index.php',
|
||||
'LICENSE.txt',
|
||||
'.htaccess',
|
||||
@@ -206,9 +231,6 @@ module.exports = function (grunt) {
|
||||
},
|
||||
},
|
||||
chmod: {
|
||||
options: {
|
||||
mode: '755'
|
||||
},
|
||||
php: {
|
||||
options: {
|
||||
mode: '644'
|
||||
@@ -237,7 +259,21 @@ module.exports = function (grunt) {
|
||||
'build/EspoCRM-<%= pkg.version %>/api/v1/portal-access',
|
||||
'build/EspoCRM-<%= pkg.version %>',
|
||||
]
|
||||
}
|
||||
},
|
||||
foldersWritable: {
|
||||
options: {
|
||||
mode: '775'
|
||||
},
|
||||
src: [
|
||||
'build/EspoCRM-<%= pkg.version %>/data',
|
||||
'build/EspoCRM-<%= pkg.version %>/custom',
|
||||
'build/EspoCRM-<%= pkg.version %>/custom/Espo',
|
||||
'build/EspoCRM-<%= pkg.version %>/custom/Espo/Custom',
|
||||
'build/EspoCRM-<%= pkg.version %>/client/custom',
|
||||
'build/EspoCRM-<%= pkg.version %>/client/modules',
|
||||
'build/EspoCRM-<%= pkg.version %>/application/Espo/Modules',
|
||||
]
|
||||
},
|
||||
},
|
||||
replace: {
|
||||
version: {
|
||||
@@ -257,17 +293,53 @@ module.exports = function (grunt) {
|
||||
]
|
||||
}
|
||||
},
|
||||
compress: {
|
||||
final: {
|
||||
options: {
|
||||
archive: 'build/EspoCRM-<%= pkg.version %>.zip',
|
||||
mode: 'zip'
|
||||
},
|
||||
src: ['**'],
|
||||
cwd: 'build/EspoCRM-<%= pkg.version %>',
|
||||
dest: 'EspoCRM-<%= pkg.version %>'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask("chmod-folders", function() {
|
||||
cp.execSync("find . -type d -exec chmod 755 {} + ", {stdio: 'ignore', cwd: 'build/EspoCRM-' + pkg.version});
|
||||
});
|
||||
|
||||
grunt.registerTask("composer", function() {
|
||||
cp.execSync("composer install", {stdio: 'ignore'});
|
||||
});
|
||||
|
||||
grunt.registerTask("upgrade", function() {
|
||||
cp.execSync("node diff --all --vendor", {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
grunt.registerTask("unit-tests", function() {
|
||||
cp.execSync("phpunit --bootstrap=vendor/autoload.php tests/unit", {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
grunt.registerTask("integration-tests", function() {
|
||||
cp.execSync("phpunit --bootstrap=vendor/autoload.php tests/integration", {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
grunt.registerTask("zip", function() {
|
||||
var fs = require('fs');
|
||||
|
||||
var resolve = this.async();
|
||||
|
||||
var folder = 'EspoCRM-' + pkg.version;
|
||||
|
||||
var zipPath = 'build/' + folder +'.zip';
|
||||
if (fs.existsSync(zipPath)) fs.unlinkSync(zipPath);
|
||||
|
||||
var archiver = require('archiver');
|
||||
var archive = archiver('zip');
|
||||
|
||||
archive.on('error', function (err) {
|
||||
grunt.fail.warn(err);
|
||||
});
|
||||
var zipOutput = fs.createWriteStream(zipPath);
|
||||
zipOutput.on('close', function () {
|
||||
console.log("EspoCRM package has been built.");
|
||||
resolve();
|
||||
});
|
||||
|
||||
archive.directory(currentPath + '/build/' + folder, folder).pipe(zipOutput);
|
||||
|
||||
archive.finalize();
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
@@ -277,10 +349,9 @@ module.exports = function (grunt) {
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-replace');
|
||||
grunt.loadNpmTasks('grunt-contrib-compress');
|
||||
grunt.loadNpmTasks('grunt-chmod');
|
||||
|
||||
grunt.registerTask('default', [
|
||||
grunt.registerTask('offline', [
|
||||
'clean:start',
|
||||
'mkdir:tmp',
|
||||
'less',
|
||||
@@ -292,7 +363,33 @@ module.exports = function (grunt) {
|
||||
'replace',
|
||||
'clean:beforeFinal',
|
||||
'copy:final',
|
||||
'chmod',
|
||||
'clean:final'
|
||||
'chmod-folders',
|
||||
'chmod:php',
|
||||
'chmod:folders',
|
||||
'chmod:foldersWritable',
|
||||
'clean:final',
|
||||
]);
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'composer',
|
||||
'offline',
|
||||
]);
|
||||
|
||||
grunt.registerTask('release', [
|
||||
'default',
|
||||
'upgrade',
|
||||
'zip',
|
||||
'clean:release',
|
||||
]);
|
||||
|
||||
grunt.registerTask('tests', [
|
||||
'default',
|
||||
'unit-tests',
|
||||
'integration-tests',
|
||||
]);
|
||||
|
||||
grunt.registerTask('dev', [
|
||||
'composer',
|
||||
'less',
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
## EspoCRM
|
||||
|
||||
<a href='http://www.espocrm.com'>EspoCRM is an Open Source CRM</a> (Customer Relationship Management) software that allows you to see, enter and evaluate all your company relationships regardless of the type. People, companies or opportunities - all in an easy and intuitive interface.
|
||||
<a href='https://www.espocrm.com'>EspoCRM is an Open Source CRM</a> (Customer Relationship Management) software that allows you to see, enter and evaluate all your company relationships regardless of the type. People, companies or opportunities - all in an easy and intuitive interface.
|
||||
|
||||
It's a web application with a frontend designed as a single page application based on backbone.js and a REST API backend written in PHP.
|
||||
|
||||
Download the latest release from our [website](http://www.espocrm.com).
|
||||
Download the latest release from our [website](https://www.espocrm.com).
|
||||
|
||||
### Requirements
|
||||
|
||||
* PHP 7.1 or above (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.5.3 or above, or MariaDB.
|
||||
* PHP 7.2 and later (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.7 (and later), or MariaDB 10.1 (and later).
|
||||
|
||||
For more information about server configuration see [this article](https://www.espocrm.com/documentation/administration/server-configuration/).
|
||||
|
||||
@@ -25,7 +25,7 @@ Create an issue [here](https://github.com/espocrm/espocrm/issues) or post on our
|
||||
|
||||
[Download](https://www.espocrm.com/download/) the latest version. See the [instructions](https://www.espocrm.com/documentation/administration/installation/) about installation.
|
||||
|
||||
### How to get started (for developers)
|
||||
### Getting started (for developers)
|
||||
|
||||
1. Clone repository to your local computer.
|
||||
2. Change to the project's root directory.
|
||||
@@ -48,15 +48,33 @@ You need to have nodejs and Grunt CLI installed.
|
||||
|
||||
The build will be created in the `build` directory.
|
||||
|
||||
### How to contribute
|
||||
Upgrade packages can be built with `grunt upgrade`.
|
||||
|
||||
### How to contribute (for developers)
|
||||
|
||||
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.
|
||||
|
||||
Branches:
|
||||
|
||||
* hotfix/* – upcoming maintenance release; fixes should be pushed to this branch;
|
||||
* master – develop branch; new features should be pushed to this branch;
|
||||
* stable – last stable release.
|
||||
* *hotfix/** – upcoming maintenance release; fixes should be pushed to this branch;
|
||||
* *master* – develop branch; new features should be pushed to this branch;
|
||||
* *stable* – last stable release.
|
||||
|
||||
### Running tests (for developers)
|
||||
|
||||
You need to have *phpunit* installed.
|
||||
|
||||
Unit tests:
|
||||
|
||||
```
|
||||
phpunit --bootstrap=vendor/autoload.php tests/unit
|
||||
```
|
||||
|
||||
Integration tests:
|
||||
|
||||
```
|
||||
phpunit --bootstrap=vendor/autoload.php tests/integration
|
||||
```
|
||||
|
||||
### How to make a translation
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -46,6 +46,21 @@ class Note extends \Espo\Core\Acl\Base
|
||||
return false;
|
||||
}
|
||||
|
||||
public function checkEntityCreate(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($entity->get('parentId') && $entity->get('parentType')) {
|
||||
$parent = $this->getEntityManager()->getEntity($entity->get('parentType'), $entity->get('parentId'));
|
||||
if ($parent) {
|
||||
if ($this->getAclManager()->checkEntity($user, $parent, 'stream')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function checkEntityEdit(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($user->isAdmin()) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -39,6 +39,16 @@ class User extends \Espo\Core\Acl\Base
|
||||
return $user->id === $entity->id;
|
||||
}
|
||||
|
||||
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if (!$user->isAdmin() && $entity->isPortal()) {
|
||||
if ($this->getAclManager()->get($user, 'portalPermission') === 'yes') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return $this->checkEntity($user, $entity, $data, 'read');
|
||||
}
|
||||
|
||||
public function checkEntityCreate(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if (!$user->isAdmin()) {
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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 Webhook extends \Espo\Core\Acl\Base
|
||||
{
|
||||
public function checkIsOwner(EntityUser $user, Entity $entity)
|
||||
{
|
||||
return $user->id === $entity->get('userId') && $user->isApi();
|
||||
}
|
||||
|
||||
public function checkEntityCreate(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($user->isAdmin()) return true;
|
||||
if (!$data) return false;
|
||||
if ($user->isApi() && $user->id === $entity->get('userId')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($user->isAdmin()) return true;
|
||||
if (!$data) return false;
|
||||
if ($user->isApi() && $user->id === $entity->get('userId')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function checkEntityDelete(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($user->isAdmin()) return true;
|
||||
if (!$data) return false;
|
||||
if ($user->isApi() && $user->id === $entity->get('userId')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function checkEntityEdit(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($user->isAdmin()) return true;
|
||||
if (!$data) return false;
|
||||
if ($user->isApi() && $user->id === $entity->get('userId')) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -41,5 +41,26 @@ class Note extends \Espo\Core\AclPortal\Base
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function checkEntityCreate(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($entity->get('type') !== 'Post') return false;
|
||||
|
||||
if ($entity->get('type') === 'Post' && $entity->get('targetType')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$entity->get('parentId') || !$entity->get('parentType')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$parent = $this->getEntityManager()->getEntity($entity->get('parentType'), $entity->get('parentId'));
|
||||
if ($parent) {
|
||||
if ($this->getAclManager()->checkEntity($user, $parent, 'stream')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -67,4 +67,9 @@ class ActionHistoryRecord extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassConvertCurrency()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -64,4 +64,9 @@ class AuthLogRecord extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassConvertCurrency()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -94,4 +94,9 @@ class AuthToken extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassConvertCurrency()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class CurrencyRate extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getAcl()->check('Currency')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function getActionIndex()
|
||||
{
|
||||
if ($this->getAcl()->getLevel('Currency', 'read') !== 'yes') throw new Forbidden();
|
||||
|
||||
return $this->getService('CurrencyRate')->get();
|
||||
}
|
||||
|
||||
public function putActionUpdate($params, $data)
|
||||
{
|
||||
if ($this->getAcl()->getLevel('Currency', 'edit') !== 'yes') throw new Forbidden();
|
||||
|
||||
if (empty($data) || !is_object($data)) throw new BadRequest();
|
||||
|
||||
return $this->getService('CurrencyRate')->set($data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class DashboardTemplate extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function postActionDeployToUsers($params, $data)
|
||||
{
|
||||
if (empty($data->id)) throw new BadRequest();
|
||||
if (empty($data->userIdList)) throw new BadRequest();
|
||||
|
||||
return $this->getServiceFactory()->create('DashboardTemplate')->deployToUsers(
|
||||
$data->id,
|
||||
$data->userIdList,
|
||||
!empty($data->append)
|
||||
);
|
||||
}
|
||||
|
||||
public function postActionDeployToTeam($params, $data)
|
||||
{
|
||||
if (empty($data->id)) throw new BadRequest();
|
||||
if (empty($data->teamId)) throw new BadRequest();
|
||||
|
||||
return $this->getServiceFactory()->create('DashboardTemplate')->deployToTeam(
|
||||
$data->id,
|
||||
$data->teamId,
|
||||
!empty($data->append)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -75,7 +75,7 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
throw new NotFound();
|
||||
}
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
if ($emailAccount->get('assigniedUserId') !== $this->getUser()->id) {
|
||||
if ($emailAccount->get('assignedUserId') !== $this->getUser()->id) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -60,7 +60,7 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
$name = filter_var($name, \FILTER_SANITIZE_STRING);
|
||||
$type = filter_var($type, \FILTER_SANITIZE_STRING);
|
||||
|
||||
$params = array();
|
||||
$params = [];
|
||||
|
||||
if (!empty($data['labelSingular'])) {
|
||||
$params['labelSingular'] = $data['labelSingular'];
|
||||
@@ -92,6 +92,9 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (isset($data['fullTextSearch'])) {
|
||||
$params['fullTextSearch'] = $data['fullTextSearch'];
|
||||
}
|
||||
if (isset($data['countDisabled'])) {
|
||||
$params['countDisabled'] = $data['countDisabled'];
|
||||
}
|
||||
|
||||
$params['kanbanViewMode'] = !empty($data['kanbanViewMode']);
|
||||
if (!empty($data['kanbanStatusIgnoreList'])) {
|
||||
@@ -184,19 +187,19 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
$paramList = [
|
||||
'entity',
|
||||
'entityForeign',
|
||||
'link',
|
||||
'linkForeign',
|
||||
'label',
|
||||
'labelForeign',
|
||||
'linkType'
|
||||
'linkType',
|
||||
];
|
||||
|
||||
$additionalParamList = [
|
||||
'entityForeign',
|
||||
'relationName',
|
||||
'labelForeign',
|
||||
];
|
||||
|
||||
$params = array();
|
||||
$params = [];
|
||||
|
||||
foreach ($paramList as $item) {
|
||||
if (empty($data[$item])) {
|
||||
@@ -206,9 +209,11 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
|
||||
foreach ($additionalParamList as $item) {
|
||||
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
|
||||
$params[$item] = filter_var($data[$item] ?? null, \FILTER_SANITIZE_STRING);
|
||||
}
|
||||
|
||||
$params['labelForeign'] = $params['labelForeign'] ?? $params['linkForeign'];
|
||||
|
||||
if (array_key_exists('linkMultipleField', $data)) {
|
||||
$params['linkMultipleField'] = $data['linkMultipleField'];
|
||||
}
|
||||
@@ -222,6 +227,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (array_key_exists('auditedForeign', $data)) {
|
||||
$params['auditedForeign'] = $data['auditedForeign'];
|
||||
}
|
||||
if (array_key_exists('parentEntityTypeList', $data)) {
|
||||
$params['parentEntityTypeList'] = $data['parentEntityTypeList'];
|
||||
}
|
||||
if (array_key_exists('foreignLinkEntityTypeList', $data)) {
|
||||
$params['foreignLinkEntityTypeList'] = $data['foreignLinkEntityTypeList'];
|
||||
}
|
||||
|
||||
$result = $this->getContainer()->get('entityManagerUtil')->createLink($params);
|
||||
|
||||
@@ -248,12 +259,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
'link',
|
||||
'linkForeign',
|
||||
'label',
|
||||
'labelForeign'
|
||||
'labelForeign',
|
||||
];
|
||||
|
||||
$additionalParamList = [];
|
||||
|
||||
$params = array();
|
||||
$params = [];
|
||||
foreach ($paramList as $item) {
|
||||
if (array_key_exists($item, $data)) {
|
||||
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
|
||||
@@ -277,6 +288,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (array_key_exists('auditedForeign', $data)) {
|
||||
$params['auditedForeign'] = $data['auditedForeign'];
|
||||
}
|
||||
if (array_key_exists('parentEntityTypeList', $data)) {
|
||||
$params['parentEntityTypeList'] = $data['parentEntityTypeList'];
|
||||
}
|
||||
if (array_key_exists('foreignLinkEntityTypeList', $data)) {
|
||||
$params['foreignLinkEntityTypeList'] = $data['foreignLinkEntityTypeList'];
|
||||
}
|
||||
|
||||
$result = $this->getContainer()->get('entityManagerUtil')->updateLink($params);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -47,17 +47,27 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
public function actionList($params, $data, $request)
|
||||
{
|
||||
$integrations = $this->getEntityManager()->getRepository('Integration')->find();
|
||||
$arr = array();
|
||||
|
||||
$list = [];
|
||||
foreach ($integrations as $entity) {
|
||||
if ($entity->get('enabled') && $this->getMetadata()->get('integrations.' . $entity->id .'.allowUserAccounts')) {
|
||||
$arr[] = array(
|
||||
|
||||
$userAccountAclScope = $this->getMetadata()->get(['integrations', $entity->id, 'userAccountAclScope']);
|
||||
|
||||
if ($userAccountAclScope) {
|
||||
if (!$this->getAcl()->checkScope($userAccountAclScope)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$list[] = [
|
||||
'id' => $entity->id
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'list' => $arr
|
||||
);
|
||||
return [
|
||||
'list' => $list
|
||||
];
|
||||
}
|
||||
|
||||
public function actionGetOAuth2Info($params, $data, $request)
|
||||
@@ -65,7 +75,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
$id = $request->get('id');
|
||||
list($integration, $userId) = explode('__', $id);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -83,7 +93,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
list($integration, $userId) = explode('__', $params['id']);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -104,7 +114,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
|
||||
list($integration, $userId) = explode('__', $params['id']);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -130,7 +140,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
|
||||
list($integration, $userId) = explode('__', $id);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -121,6 +121,8 @@ class FieldManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
$this->getContainer()->get('fieldManager')->resetToDefault($data->scope, $data->name);
|
||||
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
|
||||
$this->getContainer()->get('dataManager')->rebuildMetadata();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -33,9 +33,13 @@ class I18n extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
public function actionRead($params, $data, $request)
|
||||
{
|
||||
if ($request->get('default')) {
|
||||
$default = $request->get('default') === 'true';
|
||||
|
||||
return $this->getServiceFactory()->create('Language')->getDataForFrontend($default);
|
||||
|
||||
/*if ($request->get('default')) {
|
||||
return $this->getContainer()->get('defaultLanguage')->getAll();
|
||||
}
|
||||
return $this->getContainer()->get('language')->getAll();
|
||||
return $this->getContainer()->get('language')->getAll();*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -39,11 +39,7 @@ class Layout extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
public function actionRead($params, $data)
|
||||
{
|
||||
$data = $this->getContainer()->get('layout')->get($params['scope'], $params['name']);
|
||||
if (empty($data)) {
|
||||
throw new NotFound("Layout " . $params['scope'] . ":" . $params['name'] . ' is not found.');
|
||||
}
|
||||
return $data;
|
||||
return $this->getServiceFactory()->create('Layout')->getForFrontend($params['scope'], $params['name']);
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -69,4 +69,11 @@ class LeadCapture extends \Espo\Core\Controllers\Record
|
||||
|
||||
return $this->getRecordService()->generateNewApiKeyForEntity($data->id)->getValueMap();
|
||||
}
|
||||
|
||||
public function getActionSmtpAccountDataList()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
return $this->getServiceFactory()->create('LeadCapture')->getSmtpAccountDataList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -36,7 +36,7 @@ class Metadata extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionRead($params, $data)
|
||||
{
|
||||
return $this->getMetadata()->getAllForFrontend();
|
||||
return $this->getServiceFactory()->create('Metadata')->getDataForFrontend();
|
||||
}
|
||||
|
||||
public function getActionGet($params, $data, $request)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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 PhoneNumber extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -25,10 +25,12 @@
|
||||
*
|
||||
* 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 ScheduledJob extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -25,10 +25,12 @@
|
||||
*
|
||||
* 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 ScheduledJobLogRecord extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
@@ -38,4 +40,3 @@ class ScheduledJobLogRecord extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -29,18 +29,22 @@
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Settings extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
|
||||
protected function getConfigData()
|
||||
{
|
||||
$data = $this->getServiceFactory()->create('Settings')->getConfigData();
|
||||
|
||||
$data->jsLibs = $this->getMetadata()->get('app.jsLibs');
|
||||
$data->jsLibs = $this->getMetadata()->get(['app', 'jsLibs']);
|
||||
|
||||
unset($data->loginView);
|
||||
$loginView = $this->getMetadata()->get(['clientDefs', 'App', 'loginView']);
|
||||
if ($loginView) {
|
||||
$data->loginView = $loginView;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -46,6 +46,7 @@ class Stream extends \Espo\Core\Controllers\Base
|
||||
$maxSize = intval($request->get('maxSize'));
|
||||
$after = $request->get('after');
|
||||
$filter = $request->get('filter');
|
||||
$skipOwn = $request->get('skipOwn') === 'true';
|
||||
|
||||
$service = $this->getService('Stream');
|
||||
|
||||
@@ -61,7 +62,8 @@ class Stream extends \Espo\Core\Controllers\Base
|
||||
'offset' => $offset,
|
||||
'maxSize' => $maxSize,
|
||||
'after' => $after,
|
||||
'filter' => $filter
|
||||
'filter' => $filter,
|
||||
'skipOwn' => $skipOwn,
|
||||
]);
|
||||
|
||||
return (object) [
|
||||
@@ -96,7 +98,7 @@ class Stream extends \Espo\Core\Controllers\Base
|
||||
'maxSize' => $maxSize,
|
||||
'after' => $after,
|
||||
'filter' => 'posts',
|
||||
'where' => $where
|
||||
'where' => $where,
|
||||
]);
|
||||
|
||||
return (object) [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -69,24 +69,28 @@ class User extends \Espo\Core\Controllers\Record
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$p = $this->getEntityManager()->getRepository('PasswordChangeRequest')->where(array(
|
||||
'requestId' => $data->requestId
|
||||
))->findOne();
|
||||
if ($this->getConfig()->get('passwordRecoveryDisabled')) {
|
||||
throw new Forbidden("Password recovery disabled");
|
||||
}
|
||||
|
||||
if (!$p) {
|
||||
$request = $this->getEntityManager()->getRepository('PasswordChangeRequest')->where([
|
||||
'requestId' => $data->requestId
|
||||
])->findOne();
|
||||
|
||||
if (!$request) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
$userId = $p->get('userId');
|
||||
|
||||
$userId = $request->get('userId');
|
||||
if (!$userId) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
$this->getEntityManager()->removeEntity($p);
|
||||
|
||||
if ($this->getService('User')->changePassword($userId, $data->password)) {
|
||||
return array(
|
||||
'url' => $p->get('url')
|
||||
);
|
||||
$this->getEntityManager()->removeEntity($request);
|
||||
return [
|
||||
'url' => $request->get('url')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +117,14 @@ class User extends \Espo\Core\Controllers\Record
|
||||
return $this->getRecordService()->generateNewApiKeyForEntity($data->id)->getValueMap();
|
||||
}
|
||||
|
||||
public function postActionGenerateNewPassword($params, $data, $request)
|
||||
{
|
||||
if (empty($data->id)) throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
$this->getRecordService()->generateNewPasswordForUser($data->id);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\NotFound;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class UserSecurity extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin() && !$this->getUser()->isRegular()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function getActionRead($params, $data, $request)
|
||||
{
|
||||
$id = $params['id'] ?? null;
|
||||
|
||||
if (!$id) throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin() && $id !== $this->getUser()->id) throw new Forbidden();
|
||||
|
||||
return $this->getService('UserSecurity')->read($id);
|
||||
}
|
||||
|
||||
public function postActionGenerate2FAData($params, $data)
|
||||
{
|
||||
$data = $data ?? (object) [];
|
||||
$id = $data->id;
|
||||
|
||||
if (!$id) throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin() && $id !== $this->getUser()->id) throw new Forbidden();
|
||||
|
||||
return $this->getService('UserSecurity')->generate2FAData($id, $data);
|
||||
}
|
||||
|
||||
public function putActionUpdate($params, $data)
|
||||
{
|
||||
$id = $params['id'] ?? null;
|
||||
$data = $data ?? (object) [];
|
||||
|
||||
if (!$id) throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin() && $id !== $this->getUser()->id) throw new Forbidden();
|
||||
|
||||
return $this->getService('UserSecurity')->update($id, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class Webhook extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin() && !$this->getUser()->isApi()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request, $response = null)
|
||||
{
|
||||
$result = parent::actionCreate($params, $data, $request, $response);
|
||||
if ($response) $response->setStatus(201);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -60,21 +60,45 @@ class GlobalRestricton
|
||||
public function __construct(
|
||||
\Espo\Core\Utils\Metadata $metadata,
|
||||
\Espo\Core\Utils\File\Manager $fileManager,
|
||||
\Espo\Core\Utils\FieldManagerUtil $fieldManagerUtil
|
||||
\Espo\Core\Utils\FieldManagerUtil $fieldManagerUtil,
|
||||
bool $useCache = true
|
||||
)
|
||||
{
|
||||
$this->metadata = $metadata;
|
||||
$this->fileManager = $fileManager;
|
||||
$this->fieldManagerUtil = $fieldManagerUtil;
|
||||
|
||||
if (!file_exists($this->cacheFilePath)) {
|
||||
$this->buildCacheFile();
|
||||
$isFromCache = false;
|
||||
|
||||
if ($useCache) {
|
||||
if (file_exists($this->cacheFilePath)) {
|
||||
$this->data = include($this->cacheFilePath);
|
||||
$isFromCache = true;
|
||||
|
||||
if (!($this->data instanceof \StdClass)) {
|
||||
$GLOBALS['log']->error("ACL GlobalRestricton: Bad data fetched from cache.");
|
||||
$this->data = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->data = include($this->cacheFilePath);
|
||||
if (!$this->data) {
|
||||
$this->buildData();
|
||||
}
|
||||
|
||||
if ($useCache) {
|
||||
if (!$isFromCache) {
|
||||
$this->storeCacheFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function buildCacheFile()
|
||||
protected function storeCacheFile()
|
||||
{
|
||||
$this->getFileManager()->putPhpContents($this->cacheFilePath, $this->data, true);
|
||||
}
|
||||
|
||||
protected function buildData()
|
||||
{
|
||||
$scopeList = array_keys($this->getMetadata()->get(['entityDefs'], []));
|
||||
|
||||
@@ -127,8 +151,6 @@ class GlobalRestricton
|
||||
}
|
||||
|
||||
$this->data = $data;
|
||||
|
||||
$this->getFileManager()->putPhpContents($this->cacheFilePath, $data, true);
|
||||
}
|
||||
|
||||
protected function getMetadata()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -88,7 +88,7 @@ class Table
|
||||
if ($this->isStrictModeForced) {
|
||||
$this->isStrictMode = true;
|
||||
} else {
|
||||
$this->isStrictMode = $config->get('aclStrictMode', false);
|
||||
$this->isStrictMode = $config->get('aclStrictMode', true);
|
||||
}
|
||||
|
||||
$this->user = $user;
|
||||
@@ -182,12 +182,13 @@ class Table
|
||||
return 'no';
|
||||
}
|
||||
|
||||
public function getHighestLevel($action)
|
||||
public function getHighestLevel($scope, $action)
|
||||
{
|
||||
if (in_array($action, $this->booleanActionList)) {
|
||||
return 'yes';
|
||||
} else {
|
||||
return 'all';
|
||||
$level = $this->metadata->get(['scopes', $scope, $this->type . 'HighestLevel']);
|
||||
return $level ?? 'all';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -59,7 +59,8 @@ class AclManager
|
||||
$this->globalRestricton = new \Espo\Core\Acl\GlobalRestricton(
|
||||
$container->get('metadata'),
|
||||
$container->get('fileManager'),
|
||||
$container->get('fieldManagerUtil')
|
||||
$container->get('fieldManagerUtil'),
|
||||
$container->get('config')->get('useCache')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,7 +134,7 @@ class AclManager
|
||||
public function getLevel(User $user, $scope, $action)
|
||||
{
|
||||
if ($user->isAdmin()) {
|
||||
return $this->getTable($user)->getHighestLevel($action);
|
||||
return $this->getTable($user)->getHighestLevel($scope, $action);
|
||||
}
|
||||
return $this->getTable($user)->getLevel($scope, $action);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -104,6 +104,13 @@ class Base extends \Espo\Core\Acl\Base
|
||||
}
|
||||
if ($inAccount) {
|
||||
return true;
|
||||
} else {
|
||||
if (is_null($isOwnContact) && $entity) {
|
||||
$isOwnContact = $this->checkIsOwnContact($user, $entity);
|
||||
}
|
||||
if ($isOwnContact) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +124,6 @@ class Base extends \Espo\Core\Acl\Base
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public function checkReadOnlyAccount(User $user, $data)
|
||||
@@ -152,13 +158,13 @@ class Base extends \Espo\Core\Acl\Base
|
||||
{
|
||||
$accountIdList = $user->getLinkMultipleIdList('accounts');
|
||||
if (count($accountIdList)) {
|
||||
if ($entity->hasAttribute('accountId')) {
|
||||
if ($entity->hasAttribute('accountId') && $entity->getRelationParam('account', 'entity') === 'Account') {
|
||||
if (in_array($entity->get('accountId'), $accountIdList)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($entity->hasRelation('accounts')) {
|
||||
if ($entity->hasRelation('accounts') && $entity->getRelationParam('accounts', 'entity') === 'Account') {
|
||||
$repository = $this->getEntityManager()->getRepository($entity->getEntityType());
|
||||
foreach ($accountIdList as $accountId) {
|
||||
if ($repository->isRelated($entity, 'accounts', $accountId)) {
|
||||
@@ -183,13 +189,13 @@ class Base extends \Espo\Core\Acl\Base
|
||||
{
|
||||
$contactId = $user->get('contactId');
|
||||
if ($contactId) {
|
||||
if ($entity->hasAttribute('contactId')) {
|
||||
if ($entity->hasAttribute('contactId') && $entity->getRelationParam('contact', 'entity') === 'Contact') {
|
||||
if ($entity->get('contactId') === $contactId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($entity->hasRelation('contacts')) {
|
||||
if ($entity->hasRelation('contacts') && $entity->getRelationParam('contacts', 'entity') === 'Contact') {
|
||||
$repository = $this->getEntityManager()->getRepository($entity->getEntityType());
|
||||
if ($repository->isRelated($entity, 'contacts', $contactId)) {
|
||||
return true;
|
||||
@@ -207,6 +213,4 @@ class Base extends \Espo\Core\Acl\Base
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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\AppParams;
|
||||
|
||||
class TemplateEntityTypeList extends \Espo\Core\Injectable
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->addDependency('acl');
|
||||
$this->addDependency('selectManagerFactory');
|
||||
$this->addDependency('entityManager');
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
if (!$this->getInjection('acl')->checkScope('Template')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$list = [];
|
||||
|
||||
$selectManager = $this->getInjection('selectManagerFactory')->create('Template');
|
||||
|
||||
$selectParams = $selectManager->getEmptySelectParams();
|
||||
$selectManager->applyAccess($selectParams);
|
||||
|
||||
$templateList = $this->getInjection('entityManager')->getRepository('Template')
|
||||
->select(['entityType'])
|
||||
->groupBy(['entityType'])
|
||||
->find($selectParams);
|
||||
|
||||
foreach ($templateList as $template) {
|
||||
$list[] = $template->get('entityType');
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -48,6 +48,7 @@ class Application
|
||||
$GLOBALS['log'] = $this->getContainer()->get('log');
|
||||
|
||||
$this->initAutoloads();
|
||||
$this->initPreloads();
|
||||
}
|
||||
|
||||
protected function initContainer()
|
||||
@@ -133,7 +134,9 @@ class Application
|
||||
|
||||
$slim->run();
|
||||
} catch (\Exception $e) {
|
||||
$container->get('output')->processError($e->getMessage(), $e->getCode(), true, $e);
|
||||
try {
|
||||
$container->get('output')->processError($e->getMessage(), $e->getCode(), true, $e);
|
||||
} catch (\Slim\Exception\Stop $e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +182,7 @@ class Application
|
||||
}
|
||||
}
|
||||
$processList = array_values($processList);
|
||||
if (count($runningCount) >= $maxProcessNumber) {
|
||||
if ($runningCount >= $maxProcessNumber) {
|
||||
$toSkip = true;
|
||||
}
|
||||
if (!$toSkip) {
|
||||
@@ -344,6 +347,15 @@ class Application
|
||||
$autoload->register();
|
||||
}
|
||||
|
||||
protected function initPreloads()
|
||||
{
|
||||
foreach ($this->getMetadata()->get(['app', 'containerServices']) ?? [] as $name => $defs) {
|
||||
if ($defs['preload'] ?? false) {
|
||||
$this->getContainer()->get($name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setBasePath($basePath)
|
||||
{
|
||||
$this->getContainer()->get('clientManager')->setBasePath($basePath);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -29,9 +29,137 @@
|
||||
|
||||
namespace Espo\Core\Console\Commands;
|
||||
|
||||
use Espo\Core\Exceptions\Error;
|
||||
|
||||
class Upgrade extends Base
|
||||
{
|
||||
public function run()
|
||||
protected $upgradeManager;
|
||||
|
||||
protected $upgradeStepList = [
|
||||
'copyBefore',
|
||||
'rebuild',
|
||||
'beforeUpgradeScript',
|
||||
'rebuild',
|
||||
'copy',
|
||||
'rebuild',
|
||||
'copyAfter',
|
||||
'rebuild',
|
||||
'afterUpgradeScript',
|
||||
'rebuild',
|
||||
];
|
||||
|
||||
public function run($options, $flagList, $argumentList)
|
||||
{
|
||||
$params = $this->normalizeParams($options, $flagList, $argumentList);
|
||||
|
||||
switch ($params['mode']) {
|
||||
case 'local':
|
||||
$this->runLocalUpgrade($params);
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'remote':
|
||||
$this->runRemoteUpgrade($params);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize params. Permitted options and flags and $arguments:
|
||||
* -y - without confirmation
|
||||
* -s - single process
|
||||
* --file="EspoCRM-upgrade.zip"
|
||||
* --step="beforeUpgradeScript"
|
||||
* @param array $options
|
||||
* @param array $flagList
|
||||
* @param array $argumentList
|
||||
* @return array
|
||||
*/
|
||||
protected function normalizeParams($options, $flagList, $argumentList)
|
||||
{
|
||||
$params = [
|
||||
'mode' => 'remote',
|
||||
'skipConfirmation' => false,
|
||||
'singleProcess' => false,
|
||||
];
|
||||
|
||||
if (!empty($options['file'])) {
|
||||
$params['mode'] = 'local';
|
||||
$params['file'] = $options['file'];
|
||||
}
|
||||
|
||||
if (in_array('y', $flagList)) {
|
||||
$params['skipConfirmation'] = true;
|
||||
}
|
||||
|
||||
if (in_array('s', $flagList)) {
|
||||
$params['singleProcess'] = true;
|
||||
}
|
||||
|
||||
if (!empty($options['step'])) {
|
||||
$params['step'] = $options['step'];
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
protected function runLocalUpgrade(array $params)
|
||||
{
|
||||
if (empty($params['file']) || !file_exists($params['file'])) {
|
||||
echo "Upgrade package is not found.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$packageFile = $params['file'];
|
||||
$fromVersion = $this->getConfig()->get('version');
|
||||
|
||||
fwrite(\STDOUT, "Current version is {$fromVersion}.\n");
|
||||
|
||||
$upgradeId = $this->upload($packageFile);
|
||||
$manifest = $this->getUpgradeManager()->getManifestById($upgradeId);
|
||||
$nextVersion = $manifest['version'];
|
||||
|
||||
if (!$params['skipConfirmation']) {
|
||||
fwrite(\STDOUT, "EspoCRM will be upgraded to version {$nextVersion} now. Enter [Y] to continue.\n");
|
||||
|
||||
if (!$this->confirm()) {
|
||||
echo "Upgrade canceled.\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fwrite(\STDOUT, "Upgrading... This may take a while...");
|
||||
|
||||
try {
|
||||
$this->runUpgradeProcess($upgradeId, $params);
|
||||
} catch (\Exception $e) {
|
||||
fwrite(\STDOUT, "\n");
|
||||
fwrite(\STDOUT, $e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
fwrite(\STDOUT, "\n");
|
||||
|
||||
$app = new \Espo\Core\Application();
|
||||
$currentVerison = $app->getContainer()->get('config')->get('version');
|
||||
|
||||
fwrite(\STDOUT, "Upgrade is complete. Current version is {$currentVerison}.\n");
|
||||
|
||||
$infoData = $this->getVersionInfo();
|
||||
$lastVersion = $infoData->lastVersion ?? null;
|
||||
|
||||
if ($lastVersion && $lastVersion !== $currentVerison && $fromVersion !== $currentVerison) {
|
||||
fwrite(\STDOUT, "Newer version is available.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($lastVersion && $lastVersion === $currentVerison) {
|
||||
fwrite(\STDOUT, "You have the latest version.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected function runRemoteUpgrade(array $params)
|
||||
{
|
||||
$infoData = $this->getVersionInfo();
|
||||
if (!$infoData) return;
|
||||
@@ -48,11 +176,13 @@ class Upgrade extends Base
|
||||
return;
|
||||
}
|
||||
|
||||
fwrite(\STDOUT, "EspoCRM will be upgaded to version {$nextVersion} now. Type 'Y' to continue.\n");
|
||||
if (!$params['skipConfirmation']) {
|
||||
fwrite(\STDOUT, "EspoCRM will be upgraded to version {$nextVersion} now. Enter [Y] to continue.\n");
|
||||
|
||||
if (!$this->confirm()) {
|
||||
echo "Upgrade canceled.\n";
|
||||
return;
|
||||
if (!$this->confirm()) {
|
||||
echo "Upgrade canceled.\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fwrite(\STDOUT, "Downloading...");
|
||||
@@ -64,13 +194,22 @@ class Upgrade extends Base
|
||||
|
||||
fwrite(\STDOUT, "Upgrading... This may take a while...");
|
||||
|
||||
$this->upgrade($upgradePackageFilePath);
|
||||
$upgradeId = $this->upload($upgradePackageFilePath);
|
||||
|
||||
try {
|
||||
$this->runUpgradeProcess($upgradeId, $params);
|
||||
} catch (\Exception $e) {
|
||||
$error = $e->getMessage();
|
||||
}
|
||||
|
||||
$this->getFileManager()->unlink($upgradePackageFilePath);
|
||||
|
||||
fwrite(\STDOUT, "\n");
|
||||
|
||||
fwrite(\STDOUT, $resultText);
|
||||
|
||||
$this->getFileManager()->unlink($upgradePackageFilePath);
|
||||
if (!empty($error)) {
|
||||
echo $error;
|
||||
return;
|
||||
}
|
||||
|
||||
$app = new \Espo\Core\Application();
|
||||
$currentVerison = $app->getContainer()->get('config')->get('version');
|
||||
@@ -88,22 +227,66 @@ class Upgrade extends Base
|
||||
}
|
||||
}
|
||||
|
||||
protected function upgrade($filePath)
|
||||
protected function upload($filePath)
|
||||
{
|
||||
$app = new \Espo\Core\Application();
|
||||
$app->setupSystemUser();
|
||||
|
||||
$upgradeManager = new \Espo\Core\UpgradeManager($app->getContainer());
|
||||
|
||||
try {
|
||||
$fileData = file_get_contents($filePath);
|
||||
$fileData = 'data:application/zip;base64,' . base64_encode($fileData);
|
||||
|
||||
$upgradeId = $upgradeManager->upload($fileData);
|
||||
$upgradeManager->install(['id' => $upgradeId]);
|
||||
$upgradeId = $this->getUpgradeManager()->upload($fileData);
|
||||
} catch (\Exception $e) {
|
||||
die("Error: " . $e->getMessage() . "\n");
|
||||
}
|
||||
|
||||
return $upgradeId;
|
||||
}
|
||||
|
||||
protected function runUpgradeProcess($upgradeId, array $params = [])
|
||||
{
|
||||
$useSingleProcess = array_key_exists('singleProcess', $params) ? $params['singleProcess'] : false;
|
||||
|
||||
$stepList = !empty($params['step']) ? [$params['step']] : $this->upgradeStepList;
|
||||
array_unshift($stepList, 'init');
|
||||
array_push($stepList, 'finalize');
|
||||
|
||||
if (!$useSingleProcess && $this->isShellEnabled()) {
|
||||
return $this->runSteps($upgradeId, $stepList);
|
||||
}
|
||||
|
||||
return $this->runStepsInSingleProcess($upgradeId, $stepList);
|
||||
}
|
||||
|
||||
protected function runStepsInSingleProcess($upgradeId, array $stepList)
|
||||
{
|
||||
$GLOBALS['log']->debug('Installation process ['.$upgradeId.']: Single process mode.');
|
||||
|
||||
try {
|
||||
foreach ($stepList as $stepName) {
|
||||
$upgradeManager = $this->getUpgradeManager(true);
|
||||
$upgradeManager->runInstallStep($stepName, ['id' => $upgradeId]);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('Upgrade Error: ' . $e->getMessage());
|
||||
throw new Error($e->getMessage());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function runSteps($upgradeId, array $stepList)
|
||||
{
|
||||
$phpExecutablePath = $this->getPhpExecutablePath();
|
||||
|
||||
foreach ($stepList as $stepName) {
|
||||
$command = $phpExecutablePath . " command.php upgrade-step --step=". ucfirst($stepName) ." --id=". $upgradeId;
|
||||
|
||||
$shellResult = shell_exec($command);
|
||||
if ($shellResult !== 'true') {
|
||||
$GLOBALS['log']->error('Upgrade Error: ' . $shellResult);
|
||||
throw new Error($shellResult);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function confirm()
|
||||
@@ -127,6 +310,29 @@ class Upgrade extends Base
|
||||
return $this->getContainer()->get('fileManager');
|
||||
}
|
||||
|
||||
protected function getUpgradeManager($reload = false)
|
||||
{
|
||||
if (!$this->upgradeManager || $reload) {
|
||||
$app = new \Espo\Core\Application();
|
||||
$app->setupSystemUser();
|
||||
|
||||
$this->upgradeManager = new \Espo\Core\UpgradeManager($app->getContainer());
|
||||
}
|
||||
|
||||
return $this->upgradeManager;
|
||||
}
|
||||
|
||||
protected function getPhpExecutablePath()
|
||||
{
|
||||
$phpExecutablePath = $this->getConfig()->get('phpExecutablePath');
|
||||
|
||||
if (!$phpExecutablePath) {
|
||||
$phpExecutablePath = (new \Symfony\Component\Process\PhpExecutableFinder)->find();
|
||||
}
|
||||
|
||||
return $phpExecutablePath;
|
||||
}
|
||||
|
||||
protected function getVersionInfo()
|
||||
{
|
||||
$url = 'https://s.espocrm.com/upgrade/next/';
|
||||
@@ -183,4 +389,18 @@ class Upgrade extends Base
|
||||
|
||||
return realpath($localFilePath);
|
||||
}
|
||||
|
||||
protected function isShellEnabled()
|
||||
{
|
||||
if (!function_exists('exec') || !is_callable('shell_exec')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = shell_exec("echo test");
|
||||
if (empty($result)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://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\Console\Commands;
|
||||
|
||||
class UpgradeStep extends Base
|
||||
{
|
||||
public function run($options, $flagList, $argumentList)
|
||||
{
|
||||
if (empty($options['step'])) {
|
||||
echo "Step is not specified.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($options['id'])) {
|
||||
echo "Upgrade ID is not specified.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$stepName = $options['step'];
|
||||
$upgradeId = $options['id'];
|
||||
|
||||
return $this->runUpgradeStep($stepName, ['id' => $upgradeId]);
|
||||
}
|
||||
|
||||
protected function runUpgradeStep($stepName, array $params)
|
||||
{
|
||||
$app = new \Espo\Core\Application();
|
||||
$app->setupSystemUser();
|
||||
|
||||
$upgradeManager = new \Espo\Core\UpgradeManager($app->getContainer());
|
||||
|
||||
try {
|
||||
$result = $upgradeManager->runInstallStep($stepName, $params); // throw Exception on error
|
||||
} catch (\Exception $e) {
|
||||
die("Error: " . $e->getMessage() . "\n");
|
||||
}
|
||||
|
||||
if (is_bool($result)) {
|
||||
$result = $result ? "true" : "false";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -61,9 +61,13 @@ class Container
|
||||
$obj = $this->$loadMethod();
|
||||
$this->data[$name] = $obj;
|
||||
} else {
|
||||
$metadata = $this->get('metadata');
|
||||
|
||||
try {
|
||||
$className = $this->get('metadata')->get(['app', 'loaders', ucfirst($name)]);
|
||||
$className = $metadata->get(['app', 'containerServices', $name, 'loaderClassName']);
|
||||
if (!$className) {
|
||||
$className = $metadata->get(['app', 'loaders', ucfirst($name)]);
|
||||
}
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
if (!isset($className) || !class_exists($className)) {
|
||||
@@ -73,19 +77,46 @@ class Container
|
||||
}
|
||||
}
|
||||
|
||||
$object = null;
|
||||
|
||||
if (class_exists($className)) {
|
||||
$loadClass = new $className($this);
|
||||
$this->data[$name] = $loadClass->load();
|
||||
$loadClass = new $className($this);
|
||||
$object = $loadClass->load();
|
||||
$this->data[$name] = $object;
|
||||
} else {
|
||||
$className = $this->getServiceClassName($name);
|
||||
|
||||
if ($className && class_exists($className)) {
|
||||
|
||||
$dependencyList = $metadata->get(['app', 'containerServices', $name, 'dependencyList']) ?? [];
|
||||
$dependencyObjectList = [];
|
||||
foreach ($dependencyList as $item) {
|
||||
$dependencyObjectList[] = $this->get($item);
|
||||
}
|
||||
$reflector = new \ReflectionClass($className);
|
||||
if ($reflector->isSubclassOf('\\Espo\\Core\\Interfaces\\InjectableService')) {
|
||||
$object = $reflector->newInstance();
|
||||
foreach ($dependencyObjectList as $i => $item) {
|
||||
$object->inject($dependencyList[$i], $item);
|
||||
}
|
||||
} else {
|
||||
$object = $reflector->newInstanceArgs($dependencyObjectList);
|
||||
}
|
||||
$this->data[$name] = $object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getServiceClassName(string $name, string $default)
|
||||
public function getServiceClassName(string $name, ?string $default = null)
|
||||
{
|
||||
$metadata = $this->get('metadata');
|
||||
$className = $metadata->get(['app', 'serviceContainer', 'classNames', $name], $default);
|
||||
|
||||
$className = $metadata->get(['app', 'containerServices', $name, 'className']) ??
|
||||
$metadata->get(['app', 'serviceContainer', 'classNames', $name], $default);
|
||||
|
||||
return $className;
|
||||
}
|
||||
|
||||
@@ -177,7 +208,8 @@ class Container
|
||||
return new \Espo\Core\Utils\DateTime(
|
||||
$this->get('config')->get('dateFormat'),
|
||||
$this->get('config')->get('timeFormat'),
|
||||
$this->get('config')->get('timeZone')
|
||||
$this->get('config')->get('timeZone'),
|
||||
$this->get('config')->get('language')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -291,7 +323,7 @@ class Container
|
||||
'en_US',
|
||||
$this->get('fileManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('useCache')
|
||||
$this->get('config')->get('useCache')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -301,7 +333,7 @@ class Container
|
||||
\Espo\Core\Utils\Language::detectLanguage($this->get('config')),
|
||||
$this->get('fileManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('useCache')
|
||||
$this->get('config')->get('useCache')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -254,28 +254,28 @@ class Record extends Base
|
||||
$byWhere = isset($data->byWhere) ? $data->byWhere : false;
|
||||
$selectData = isset($data->selectData) ? json_decode(json_encode($data->selectData), true) : null;
|
||||
|
||||
$params = array();
|
||||
$actionParams = [];
|
||||
if ($byWhere) {
|
||||
$params['selectData'] = $selectData;
|
||||
$params['where'] = $where;
|
||||
$actionParams['selectData'] = $selectData;
|
||||
$actionParams['where'] = $where;
|
||||
} else {
|
||||
$params['ids'] = $ids;
|
||||
$actionParams['ids'] = $ids;
|
||||
}
|
||||
|
||||
if (isset($data->attributeList)) {
|
||||
$params['attributeList'] = $data->attributeList;
|
||||
$actionParams['attributeList'] = $data->attributeList;
|
||||
}
|
||||
|
||||
if (isset($data->fieldList)) {
|
||||
$params['fieldList'] = $data->fieldList;
|
||||
$actionParams['fieldList'] = $data->fieldList;
|
||||
}
|
||||
|
||||
if (isset($data->format)) {
|
||||
$params['format'] = $data->format;
|
||||
$actionParams['format'] = $data->format;
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => $this->getRecordService()->export($params)
|
||||
'id' => $this->getRecordService()->export($actionParams),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -296,21 +296,11 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$params = array();
|
||||
if (property_exists($data, 'where') && !empty($data->byWhere)) {
|
||||
$params['where'] = json_decode(json_encode($data->where), true);
|
||||
if (property_exists($data, 'selectData')) {
|
||||
$params['selectData'] = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
} else if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
$actionParams = $this->getMassActionParamsFromData($data);
|
||||
|
||||
$attributes = $data->attributes;
|
||||
|
||||
$idsUpdated = $this->getRecordService()->massUpdate($params, $attributes);
|
||||
|
||||
return $idsUpdated;
|
||||
return $this->getRecordService()->massUpdate($actionParams, $attributes);
|
||||
}
|
||||
|
||||
public function postActionMassDelete($params, $data, $request)
|
||||
@@ -482,11 +472,9 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
$actionParams = $this->getMassActionParamsFromData($data);
|
||||
|
||||
return $this->getRecordService()->massFollow($params);
|
||||
return $this->getRecordService()->massFollow($actionParams);
|
||||
}
|
||||
|
||||
public function postActionMassUnfollow($params, $data, $request)
|
||||
@@ -495,11 +483,9 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
$actionParams = $this->getMassActionParamsFromData($data);
|
||||
|
||||
return $this->getRecordService()->massUnfollow($params);
|
||||
return $this->getRecordService()->massUnfollow($actionParams);
|
||||
}
|
||||
|
||||
protected function getMassActionParamsFromData($data)
|
||||
@@ -511,8 +497,7 @@ class Record extends Base
|
||||
if (property_exists($data, 'selectData')) {
|
||||
$params['selectData'] = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
}
|
||||
if (property_exists($data, 'ids')) {
|
||||
} else if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
@@ -536,4 +521,46 @@ class Record extends Base
|
||||
|
||||
return $this->getRecordService()->restoreDeleted($id);
|
||||
}
|
||||
|
||||
public function postActionMassConvertCurrency($params, $data, $request)
|
||||
{
|
||||
if (!$this->getAcl()->checkScope($this->name, 'edit')) throw new Forbidden();
|
||||
if ($this->getAcl()->get('massUpdatePermission') !== 'yes') throw new Forbidden();
|
||||
|
||||
$actionParams = $this->getMassActionParamsFromData($data);
|
||||
|
||||
$fieldList = $data->fieldList ?? null;
|
||||
if (!empty($data->field)) {
|
||||
if (!is_array($fieldList)) $fieldList = [];
|
||||
$fieldList[] = $data->field;
|
||||
}
|
||||
|
||||
if (empty($data->currencyRates)) throw new BadRequest();
|
||||
if (empty($data->targetCurrency)) throw new BadRequest();
|
||||
if (empty($data->baseCurrency)) throw new BadRequest();
|
||||
|
||||
return $this->getRecordService()->massConvertCurrency(
|
||||
$actionParams, $data->targetCurrency, $data->baseCurrency, $data->currencyRates, $fieldList
|
||||
);
|
||||
}
|
||||
|
||||
public function postActionConvertCurrency($params, $data, $request)
|
||||
{
|
||||
if (!$this->getAcl()->checkScope($this->name, 'edit')) throw new Forbidden();
|
||||
|
||||
$fieldList = $data->fieldList ?? null;
|
||||
if (!empty($data->field)) {
|
||||
if (!is_array($fieldList)) $fieldList = [];
|
||||
$fieldList[] = $data->field;
|
||||
}
|
||||
|
||||
if (empty($data->id)) throw new BadRequest();
|
||||
if (empty($data->currencyRates)) throw new BadRequest();
|
||||
if (empty($data->targetCurrency)) throw new BadRequest();
|
||||
if (empty($data->baseCurrency)) throw new BadRequest();
|
||||
|
||||
return $this->getRecordService()->convertCurrency(
|
||||
$data->id, $data->targetCurrency, $data->baseCurrency, $data->currencyRates, $fieldList
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user