Compare commits
961 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e74fdce568 | |||
| 20139a88af | |||
| 3d1f632a73 | |||
| 9e459e1287 | |||
| 7b9cf6c039 | |||
| 1cebef107e | |||
| 47fe232c78 | |||
| 2c458a69a1 | |||
| 54a290121e | |||
| 11420dc0af | |||
| 957680a3d0 | |||
| 3c6e19f4c0 | |||
| 4253915eed | |||
| da34789020 | |||
| cc057af59a | |||
| ebaa3ed958 | |||
| 307c045c0e | |||
| 8e09b81cf0 | |||
| f40aeb0830 | |||
| 9d3e3e282f | |||
| 1bcd54dfe1 | |||
| 727f3a4707 | |||
| d5473f9985 | |||
| 85c06f7ca3 | |||
| 1d4d9882b6 | |||
| e633984f7e | |||
| 2dabecbae3 | |||
| c0800a4d16 | |||
| 85c62c0789 | |||
| 551e82ad8b | |||
| 7f4328499b | |||
| de4d794d72 | |||
| e2e374301a | |||
| 7a919dedfd | |||
| 06c8cbac52 | |||
| f54ad3ab0d | |||
| 197fb26beb | |||
| 9e4582af17 | |||
| b399c4444d | |||
| b7e9e69f35 | |||
| 105b6444ed | |||
| 3559ff9f4e | |||
| 4be2962567 | |||
| 1cce748af5 | |||
| 64d3e3b5dd | |||
| 2e0233a239 | |||
| 5b4bd88907 | |||
| 6176ead935 | |||
| 46ddf3b127 | |||
| 2944e64de5 | |||
| 372cf20145 | |||
| 633cc12650 | |||
| 202d799436 | |||
| f14d12853b | |||
| a98f7f5068 | |||
| ebe249bd6b | |||
| 7957296479 | |||
| b7eac5ba42 | |||
| 14cab0dbde | |||
| 5db39d14e7 | |||
| cf473d6f16 | |||
| a082ea6acc | |||
| f770074be2 | |||
| 106e7726ba | |||
| e680be54ad | |||
| 3224795368 | |||
| ec5bd78a33 | |||
| d0c5d2aace | |||
| ed4ce1a36e | |||
| a6d7f91a58 | |||
| f6f6c2b2ac | |||
| 8c628df639 | |||
| ffd3f762ce | |||
| 24628a8487 | |||
| 573d147dad | |||
| 4ab767e95b | |||
| 18b64238ee | |||
| 65ded811b4 | |||
| 57f454693a | |||
| b6409b5cba | |||
| e6a83f7d19 | |||
| c39e1d140f | |||
| 1c69f1ca95 | |||
| a21c071349 | |||
| 741a6d5dab | |||
| 0c0a602330 | |||
| 7d13018eba | |||
| 44c65c0117 | |||
| e9e758c4b3 | |||
| 7e7acb8d28 | |||
| 1ab897db28 | |||
| 1a990850ca | |||
| 36e360e167 | |||
| 9ffdb1a1f0 | |||
| 64b15f9282 | |||
| e8ebe51f1c | |||
| ec2a7d2f48 | |||
| 6782e7c15c | |||
| 3c73e3e8cf | |||
| 4ab7d19776 | |||
| 34e33bd13a | |||
| 49fa22fa3d | |||
| 10fcd79155 | |||
| 6cdc8f2823 | |||
| d611ebfc86 | |||
| 599a7c6080 | |||
| 4c21f1192d | |||
| 63e78baf21 | |||
| fa2c689a34 | |||
| a53b440b8b | |||
| 8189832af2 | |||
| 135f869e1a | |||
| 2d56525a25 | |||
| 03773dd929 | |||
| 5b8dba68f3 | |||
| f63c75e18d | |||
| 6dd0bd8b90 | |||
| 94e86f875a | |||
| b582b20003 | |||
| e58e82eea1 | |||
| dddc4feda8 | |||
| a65421a268 | |||
| b6696dcc26 | |||
| 4e3d8fb98f | |||
| e0aaff932e | |||
| 17ea760851 | |||
| f3d11aede3 | |||
| 8053d65f33 | |||
| 01809d2cc3 | |||
| ac8e3d1a69 | |||
| b669ccf733 | |||
| 8c42c6bf0b | |||
| 97bdd22795 | |||
| 0f3cd7913c | |||
| 502cfc8d76 | |||
| d31e826305 | |||
| 28a62a2581 | |||
| deff6bad36 | |||
| f2bc80b7d9 | |||
| b5b5cac0ac | |||
| 308f30510b | |||
| 574513a9c8 | |||
| f37bc7d46b | |||
| 9f5db434df | |||
| 1c8abd6e36 | |||
| c95fcd6fbd | |||
| e6009366e8 | |||
| 286502d872 | |||
| 0749bdc006 | |||
| 72ef137dbe | |||
| f624bdef5c | |||
| 9730680e41 | |||
| c59fa40615 | |||
| 4dc08dd37c | |||
| e76c7564dc | |||
| 802bac82f0 | |||
| c64cc13e4c | |||
| 30be62eabe | |||
| 1c1703b349 | |||
| 6916f3242c | |||
| d2630a5c3f | |||
| 3e02776fcd | |||
| 376bfe63e0 | |||
| 950a3b4703 | |||
| 2f5ffb7421 | |||
| 043ef8ef3e | |||
| a959a2deaf | |||
| 65a3f4e5f3 | |||
| 97355ad024 | |||
| 99300d2d61 | |||
| e070d9d9f1 | |||
| 8f9bb79978 | |||
| 405a5c29df | |||
| 4f2a2b290b | |||
| fd5218c10b | |||
| 73ab4aa42e | |||
| 66a60b1257 | |||
| c975954944 | |||
| 86799ed742 | |||
| 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 | |||
| dfbad82ba8 | |||
| 84938d88fc | |||
| ed5f66729d | |||
| ee5218c46d | |||
| 6758d71e2e | |||
| 1eec3d88cf | |||
| 34f1c196f1 | |||
| a87e2fb5db | |||
| cecafa5e28 | |||
| a0e5f2d8ec | |||
| 47080f9b78 | |||
| dd15767263 | |||
| a698085196 | |||
| 2d4e1a94a4 | |||
| dad49b9ac8 | |||
| c5c1abaeff | |||
| eb4f933753 | |||
| 931f27cb70 | |||
| e6e00d4c7f | |||
| 3cf48129c6 | |||
| b50bf02e90 | |||
| 431e3428b3 | |||
| 6d2e056b10 | |||
| 1cbfacc864 | |||
| f2b51d321f | |||
| 0fe0b8906c | |||
| 0876f03fe4 | |||
| dd239af810 | |||
| 5f2fae940c | |||
| 02f94875b1 | |||
| 52536f9803 | |||
| 7f963bd9f3 | |||
| fcfbd478ca | |||
| d7164dd588 | |||
| d20b2768e1 | |||
| 68301c52c1 | |||
| 57aa9fa817 | |||
| 910291796b | |||
| e4a661721f | |||
| 4068a20b8e | |||
| c3be6db4f3 | |||
| 80678c97f0 | |||
| 711d20f874 | |||
| 7f299e1aa2 | |||
| ab612a3f32 | |||
| c0c244adc6 | |||
| 46a985076e | |||
| 7f82fab69b | |||
| 12ed1b3383 | |||
| eab279dd12 | |||
| e59a927faa | |||
| 1c1cb13c4d | |||
| 45a37eabe2 | |||
| bbe6d81aa2 | |||
| 5d19b1bb72 | |||
| 866f05fea5 | |||
| bd22554756 | |||
| 703e170773 | |||
| a226242e69 | |||
| 1438f8aa10 | |||
| 79564bab81 | |||
| 5c7dd0b536 | |||
| 7e340b8b78 | |||
| a026dc577c | |||
| ed6c56629e | |||
| 97574707e5 | |||
| 942726eb74 | |||
| e1eb3f804e | |||
| 2133a1390c | |||
| 7fab959a2f | |||
| 88f64ab82f | |||
| 1563d63051 | |||
| 82026658e2 | |||
| 26eec19a62 | |||
| f548db2783 | |||
| 2da689e7e9 | |||
| 8afb4804c3 | |||
| 56b8902969 | |||
| 95cee6c845 | |||
| dc58bcbd91 | |||
| 8d3698e6a3 | |||
| c04526dc11 | |||
| 6a0d622344 | |||
| 74797e0768 | |||
| 6fd0851dc9 | |||
| 41e2773781 | |||
| bf03412bf0 | |||
| 6b25aa1274 | |||
| 634acdd770 | |||
| f2f01adfc9 | |||
| 9cd2d1d21f | |||
| fa144847e5 | |||
| 17138f715b | |||
| 0babd05bff | |||
| c5f14e55c5 | |||
| 03918c8ada | |||
| 80c7008a6c | |||
| 3d143cd3f0 | |||
| 365264b393 | |||
| 3b4aea4966 | |||
| cb77bc9085 | |||
| 691aff990b | |||
| 0f6ca667d9 | |||
| ba41229a83 | |||
| 7c9d28098b | |||
| eccf9e4d85 | |||
| 96dffc0b74 | |||
| 308d0bfc0c | |||
| f9dcf2db7d | |||
| 88798f2b86 | |||
| 28ecdc46b6 | |||
| 6a30031f49 | |||
| d4f23e391f | |||
| 79b7463886 | |||
| eddae25d7f | |||
| 5e9c85fc06 | |||
| b44adb34ec | |||
| f0f6cac84a | |||
| 17e87f58c3 | |||
| 273698e2fc | |||
| 66f88e0e8e | |||
| de945008fb | |||
| 5f91505b8e | |||
| 6a25c283ec | |||
| 74fa9289a7 | |||
| ab4b975912 | |||
| 2260089301 | |||
| 9dd35f1e32 | |||
| 6b90cee851 | |||
| 6da132c034 | |||
| bc966a8ea8 | |||
| 6eab0c9b75 | |||
| cf253fae8a | |||
| c0eaa8fb50 | |||
| a4889de80a | |||
| acac599f6b | |||
| 1436ffa53f | |||
| c68a3dd0a6 | |||
| 29c42022ef | |||
| dd814c1b5e | |||
| 7fc2c71f58 | |||
| e6a3d3c982 | |||
| 46380ee9ff | |||
| 1fa3908888 | |||
| 914e6a1789 | |||
| 9a1d073072 | |||
| 3712caf7b1 | |||
| a770e18bb2 | |||
| 5dc0cfb666 | |||
| e4ab02c77a | |||
| a0f729cd8d | |||
| d544b1c264 | |||
| d8549cbebe | |||
| 4ae4734dbf | |||
| cc72de7121 | |||
| 29bf2c2e40 | |||
| e31771c8a9 | |||
| b938942c78 | |||
| 262bc6d44d | |||
| acd8d23c6c | |||
| 940bb8f9b1 | |||
| 27d22d4c9c | |||
| 4024055755 | |||
| 441c046fbd | |||
| 649fd579e2 | |||
| c08478e156 | |||
| 389327ae63 | |||
| 122ee3e259 | |||
| ef5f048343 | |||
| 9f56efada1 | |||
| c3553b1fb1 | |||
| 1eebfefc79 | |||
| f7391c04d4 | |||
| 90537515fa | |||
| 1da3d093be | |||
| c923134b97 | |||
| 8eb11787de | |||
| 727062cf9e | |||
| 4054b9497d | |||
| 4ea7154c9e | |||
| a35f12dffb | |||
| 8b6022bada | |||
| 1bbbac2cc7 | |||
| ca632f6467 | |||
| 256d9555b4 | |||
| 7db73f0688 | |||
| b9d6650298 | |||
| f17d4922dd | |||
| 6a1b6cc922 | |||
| 3ec088d485 | |||
| b11cb0059e | |||
| 989e5d1845 | |||
| f8d0c4e3f9 | |||
| 3af1850600 | |||
| f8c0a4d2e5 | |||
| c0c28c912e | |||
| ad55c66e77 | |||
| d276b1a5e1 | |||
| e899781cb5 | |||
| 5dd014f835 | |||
| 136bad46ce | |||
| bd09d2a2cb | |||
| 2b2428021f | |||
| a9537f210a | |||
| 3993bb5c27 | |||
| 0c35b59ac1 | |||
| f68effefe6 | |||
| 45f1b4c427 | |||
| 9c0a53728b | |||
| 84c4fb4468 | |||
| da2310a011 | |||
| 96fe58bafc | |||
| da5328f725 | |||
| e741502528 | |||
| 25988d7c3d | |||
| 61b68a5b41 | |||
| 7b6626d8eb | |||
| f864bc8fec | |||
| 5c5277b54a | |||
| 7eff19547c | |||
| 05b6bcbab2 | |||
| 7640279a6b | |||
| 2447117b03 | |||
| 334b96807c | |||
| 3dcba630fe | |||
| d43f78b5d2 | |||
| d197391668 | |||
| 50fe25eab3 | |||
| 4192964217 | |||
| 247b42474d | |||
| 5e3a4359f8 | |||
| 5a051d1c45 | |||
| fd63de7706 | |||
| 08d5edd991 | |||
| 7074467fc2 | |||
| e61aecd0ff | |||
| dbf1145c53 | |||
| d34b74297e | |||
| e8ce1b1592 | |||
| 663c5df115 | |||
| 62c24bbad0 | |||
| 2e07791d43 | |||
| bc397f9dcf | |||
| e91184064c | |||
| abe9ef19ca | |||
| 18d3e357f7 | |||
| 4c02636027 | |||
| 98d47bc832 | |||
| a990cc771d | |||
| 3a8fa432de | |||
| d41c7e2298 | |||
| 636906de6f | |||
| 9323bb07a7 | |||
| bfc5f27e30 | |||
| aeee88602c | |||
| 251a2e46a8 | |||
| 87ab67dd4c | |||
| 75e537e428 | |||
| 383605b597 | |||
| 9a18ce2868 | |||
| 79a99e042f | |||
| ce6627282c | |||
| 775e66f1ed | |||
| d09ad3a7b7 | |||
| 429a334d35 | |||
| 978784c267 | |||
| 18736600ef | |||
| 94ee8c6491 | |||
| 225704d1f7 | |||
| ffb56703c6 | |||
| 8694d1e924 | |||
| 2408d086a0 | |||
| 09f4b0b494 | |||
| 6c55a35445 | |||
| 97a572cf96 | |||
| de78c92808 | |||
| e38f967b1b | |||
| a07fe944c5 | |||
| 32e32ddc51 | |||
| 042780b4a1 | |||
| 70ad78a398 | |||
| 805027bb8c | |||
| 9453c93966 | |||
| b74d2d8bba | |||
| b709892311 | |||
| aba8b21d66 | |||
| abd2801ac8 | |||
| ee7ce8221d | |||
| 89079362b6 | |||
| 79fe419f13 | |||
| b4a528c05e | |||
| 60c375dbca | |||
| c7dfcfe426 | |||
| 0456dbfa42 | |||
| c806e0ad8d | |||
| a8acafdb69 | |||
| 208a7f8620 | |||
| 31ed07648e | |||
| bf08bddec3 | |||
| 8d4ae8950a | |||
| c95d7e5548 | |||
| c90ac7cc6a | |||
| 0678ba47de | |||
| 60f43d40e4 | |||
| 43e6332bd8 | |||
| 9142783564 | |||
| d3b0e9ed5d | |||
| 0721bd5c27 | |||
| 1d5e9c67f0 | |||
| 20ad921cb2 | |||
| aeee20ab42 | |||
| 26c1df6168 | |||
| b037423621 | |||
| 8e040a83d0 | |||
| a450342e93 | |||
| d4c0331f41 | |||
| 5f74ca9504 | |||
| 141a6f218b | |||
| 0bb3464e81 | |||
| e5dfc1af82 | |||
| 5b130dd876 | |||
| 196422de87 | |||
| 2a5bcf0bdd | |||
| 638908acb8 | |||
| f7ffcafb27 | |||
| cca4aa7f6f | |||
| ec60f2b0f3 | |||
| 5f595bd86f | |||
| 13909fc1bd | |||
| a589d369bc | |||
| 5ac88a7b1a | |||
| e3f1baacbe | |||
| bc09e9a797 | |||
| f93eb3a5b3 | |||
| 6922e942ba | |||
| 6397650183 | |||
| 6fd89db736 | |||
| d6071bd894 | |||
| 5c1d088744 | |||
| 4bc01767c8 | |||
| acb532db89 | |||
| 8c9ccde962 | |||
| c1958d76b1 | |||
| a804f17934 | |||
| 8fb05d4fe3 | |||
| ee9d0355d4 | |||
| 139b58ce6d | |||
| 4a8eff32cb | |||
| 6c6d1a7f53 | |||
| a59825a79b | |||
| 81bb4a43f5 | |||
| 184369af9c | |||
| d492ca15da | |||
| 5a17c923f0 | |||
| dfcaa60e04 | |||
| f3317793cb | |||
| 41a3e7eaa3 | |||
| 4357e331ad | |||
| 49fe1a75db | |||
| 68dfa92425 | |||
| 987fd7f922 | |||
| 449f0d6237 | |||
| dcbdf94023 | |||
| 6e7150cef2 | |||
| 949209d708 | |||
| 0aab014af1 | |||
| a5941e472e | |||
| 9a18a461be | |||
| 95bbba4607 | |||
| d8efe74126 | |||
| dafe9d8274 | |||
| 505862efad | |||
| 3e3616bc36 | |||
| f72c16a604 | |||
| d1be813d05 | |||
| 17cdecf45c | |||
| 0906e79211 | |||
| 4acb5ee4c8 | |||
| 0bce33e92a | |||
| 929fa2f620 | |||
| fb66c5ec60 | |||
| 54850f62a8 | |||
| ea0e38277d | |||
| e099fd43dd | |||
| d90efae709 | |||
| 2131232e14 | |||
| c823e9e06f | |||
| d325d92f89 | |||
| 84143cd096 | |||
| d7f5993665 | |||
| 88ddd5546a | |||
| 25d6ca3fea | |||
| 3709523836 | |||
| 0e17079b03 | |||
| 2752924d16 | |||
| 7c1144fa2c | |||
| 6008f1abb2 | |||
| d4f200171f | |||
| 2dd8d8b442 | |||
| d5dc0fa2e6 | |||
| 8cb9568334 | |||
| 4cc33fc06e | |||
| 73c94b861e | |||
| 7b0fde72b8 | |||
| 564d7dd567 | |||
| 3f21bd618c | |||
| ed1f803647 | |||
| 4b03f3aba9 | |||
| 7b7fa5aa24 | |||
| 15a1c68ede | |||
| 9e252298cf | |||
| 89d4a04d85 | |||
| 1cd0c5d925 | |||
| 43ab711254 | |||
| c671e47a5d | |||
| 983988c9e1 | |||
| 790a206e0a | |||
| f5759c3327 | |||
| a15a2f4ee5 | |||
| 2e4dc5a2ea | |||
| 9b78cf401b | |||
| ed64c93aa0 | |||
| 618792b541 | |||
| 1bbba0e9b3 | |||
| 3a8300f172 | |||
| 6e40357e3f | |||
| 20a767b452 | |||
| ff96f18adb | |||
| a768181a75 | |||
| edb52e253b | |||
| ee52b8d4d9 | |||
| 7154fa0f4a | |||
| 7e54239710 | |||
| a54be505d4 | |||
| 3efa23fb71 | |||
| 2254257250 | |||
| 18f4f057eb | |||
| 246f2186a5 | |||
| ed6c248bbe | |||
| c22b1c0e9d | |||
| 5087b19135 | |||
| 26175c8795 | |||
| 4400c9bfa8 | |||
| f99cac5d4c | |||
| d81d66ea5d | |||
| 00d6e2a58c | |||
| e48fa00893 | |||
| 98bf4594b4 | |||
| 2e38270083 | |||
| 9e578f4edd | |||
| 2186673b2a | |||
| 4080c8c877 | |||
| 8af40f2444 | |||
| 6619abb02b | |||
| 9806e092df | |||
| f1d8af128d | |||
| 84e5fb33c0 | |||
| a42afcf6e4 | |||
| 3d16450dd8 | |||
| ad9edb2b43 | |||
| 0b1671e1a3 | |||
| 7361488270 | |||
| f75e6f6ad0 | |||
| dd3a075c24 | |||
| 263949134c | |||
| ebf7c78199 | |||
| 68634edc0d | |||
| c7be90e1ad | |||
| 6fa3d8c769 | |||
| 42e2f247e1 | |||
| 005b9c0a8a | |||
| 137e559d2e | |||
| f20b7d6577 | |||
| 4b22936d66 | |||
| b47d738e94 | |||
| 200f70c813 | |||
| a0535c8127 | |||
| 750d15134f | |||
| 43e398e078 | |||
| e1965e6ad9 | |||
| 79d69dcb32 | |||
| e21ac44427 | |||
| 0211e4fa86 | |||
| dba0579b92 | |||
| 8524095e75 | |||
| 6d2a6feae2 | |||
| 1898065da5 | |||
| e76ee39840 | |||
| 1b484b1c25 | |||
| a8dcaffd19 | |||
| 5b960b476c | |||
| bd13f01718 | |||
| 6bb717d8a9 | |||
| 828440785e | |||
| 55d6d3620d | |||
| 09d7d578b6 | |||
| 807991ea7d | |||
| 8b59919829 | |||
| 13d8351166 | |||
| dfd527ae68 | |||
| 40d2c95df4 | |||
| 57ef395ad2 | |||
| 8b68db4c75 | |||
| 38d9085acf | |||
| 659cd2c92b | |||
| df3a449a72 | |||
| c7b47b1e6c | |||
| f2a090169f | |||
| 3acd3a5209 | |||
| 1887d25497 | |||
| 6d4ac8e10e | |||
| 57d47ca1d4 | |||
| fe1922586e | |||
| ddaef1a827 | |||
| e327457af7 | |||
| fc184d42f7 | |||
| c0e9d3b347 | |||
| 757757af2b | |||
| 5803e3bc85 | |||
| 442e62d76c | |||
| 086e9a926f | |||
| 90a341de2f | |||
| d4ea6d146a | |||
| af991b4008 | |||
| c17017be9b | |||
| e9fcca84db | |||
| 6aa7fa589e | |||
| 5a07b0a8be | |||
| d9363e7486 | |||
| 7aab1b611a | |||
| 64be22f08e | |||
| 83a13b83d3 | |||
| abbf3e8a4f | |||
| 971265eb6b | |||
| f14a699c08 | |||
| 2aea0350eb | |||
| 18a556bce0 | |||
| 783adab8a5 | |||
| 1a802b5822 | |||
| 99bf56d031 | |||
| 34135f0e17 | |||
| c22f23a1c4 | |||
| 5ef8588ad1 | |||
| cef5e09a58 | |||
| 6933c599ad | |||
| 10f6a202af | |||
| 47bd030293 | |||
| 86cb201539 | |||
| 619856ad58 | |||
| b539273351 | |||
| dc4c4c3742 | |||
| 78e81a5e7d | |||
| ae18ce444c | |||
| d1b35594e7 | |||
| 79befe9508 | |||
| cc75457e50 | |||
| 0fa58aaee6 | |||
| a3f3f7cdaa | |||
| 30dc174d30 | |||
| 400198f7a3 | |||
| 347d3d7fef | |||
| 716af071b8 | |||
| 43f8bbc360 | |||
| 1ff76bf1a0 | |||
| 6da9662110 | |||
| 8d13668595 | |||
| 62dcc1f55b | |||
| efb0c354a5 | |||
| 09c9faba9c | |||
| c9a6bd2d64 | |||
| 5d32485fc5 | |||
| b4aa93a185 | |||
| a0fddbec27 | |||
| 533faad8c2 | |||
| 3a24a45ade | |||
| 643501b25d | |||
| 3c5abf88e7 | |||
| bec6011c8e | |||
| d6a90990bd | |||
| 5b2c6abf90 | |||
| 2839c134a0 | |||
| 2c3ea3b59b | |||
| 72c9f5dceb | |||
| 9a71643bed | |||
| ffd61a6844 | |||
| c66cded184 | |||
| 6c2a23cf10 | |||
| 9877d918b4 | |||
| 8a5b845b2c | |||
| c2c98db80e | |||
| 54dc83aa59 | |||
| efc8b02d11 | |||
| 1c64b7bd54 | |||
| 20560d5256 | |||
| 1f6b7ce6ab | |||
| 0b518c4eb8 | |||
| 21285aa51f | |||
| 76990ead8a | |||
| 48493f78c2 | |||
| b99c06a8a4 | |||
| 563331af03 | |||
| 09adf27190 | |||
| 53c7d2ac85 | |||
| fa0458d220 | |||
| 29e0d93e4f | |||
| 4f09cb3592 | |||
| 187b76d359 | |||
| 428f26b02c | |||
| e976e627ad | |||
| 48564ff8cb | |||
| f881d7a5c8 | |||
| 5b9b345bf8 | |||
| c54e428d24 | |||
| 2b69ac4651 | |||
| 3cd2f19ddf | |||
| 5ed64d99f6 | |||
| 20acd516d6 | |||
| d30ef85c66 | |||
| 5c5c3113bc | |||
| 79dcec028f | |||
| 17bd2f3324 | |||
| f4b4f6ff89 | |||
| 8dd675a275 | |||
| f4c59e70b5 | |||
| 8da0ac369c | |||
| a361b124d6 | |||
| 3d2d54aafa | |||
| 28da462c4e | |||
| 94a6c8d525 | |||
| 8fbfce086c | |||
| 73ac717c4d | |||
| 3fb57a1dbe | |||
| af9718951f | |||
| d40b7aef11 | |||
| 54ac4b5308 | |||
| 3ee28f8d48 | |||
| 32f8a93021 | |||
| 39624e1ddb | |||
| 26b7420a2d | |||
| c010865fe0 | |||
| aaeb905dcf | |||
| ad8b954401 | |||
| ef9f145beb | |||
| c0d04f5870 | |||
| f512bbc9fa | |||
| b8f5fe2b21 | |||
| be73390fde | |||
| 17cd2bc543 | |||
| 74712ba931 | |||
| 0d22a238dd | |||
| 56e9170a6b | |||
| b333fd6772 | |||
| 4eb469eb59 | |||
| 4ff0d3c654 | |||
| 4f1dd0673e | |||
| caf05b5c26 | |||
| 2643ab7a17 | |||
| 6caea136a5 | |||
| 1d23d65910 | |||
| 8cc3de5807 | |||
| 9b022df709 | |||
| aba061cb72 | |||
| ae4d725595 | |||
| 6a76dc41d1 | |||
| 2b649c64a3 | |||
| db2944cb15 | |||
| 3d40184373 | |||
| e788c51ff3 | |||
| d7fc389182 | |||
| 53f3a18245 | |||
| 4b01bdb0d8 | |||
| ecafbe823e | |||
| 8abde38ebf | |||
| 0fd7f768a9 | |||
| 9c38d68b65 | |||
| f0de5dde53 | |||
| 2cdbf0ba76 | |||
| 34e4f4d7c2 | |||
| 61c0b58798 | |||
| b2db0ea683 | |||
| bd0fb02bb2 | |||
| f0aed23416 | |||
| 65368519c7 | |||
| 53db6f22d6 | |||
| 5d47a987f4 | |||
| 4222b0be1d | |||
| a1f03e22d4 | |||
| cddaa7b7a1 | |||
| 3b99ca74ab | |||
| 58dee36f1b | |||
| ae24fc07ba | |||
| 13ca0db761 | |||
| 42641396c6 | |||
| 04326171e7 | |||
| d90d450bef | |||
| d2b20154de | |||
| b176d866d0 | |||
| 07a9a79626 | |||
| b60da458d5 | |||
| 40ffbc550f | |||
| 35076148cc | |||
| 3175ff9a76 | |||
| 81457b1e48 | |||
| e9d5472d72 | |||
| 7c4bd371e7 | |||
| 98ed7e4dd3 | |||
| 8404ef1d83 | |||
| 0d99d84adf | |||
| 8492962923 | |||
| 99627f856f | |||
| b917cc20f6 | |||
| c582e88b7b | |||
| 9a00603600 | |||
| 550b5e3bb4 | |||
| 5ceb57a2cf | |||
| 16e96f6454 | |||
| c162ee5337 | |||
| 66d34e7035 | |||
| f57f7f72ed | |||
| c911cfe310 | |||
| 223c8b53b4 | |||
| add1154014 | |||
| 6ede731cfe | |||
| 0619cc0e3d | |||
| 06a686ad1a | |||
| 15aed06f9d | |||
| 012936dc7d | |||
| 0fb5b4a323 | |||
| dc3cfb4c23 | |||
| 450e7894aa | |||
| b8e7dbd147 | |||
| a41c53d7f4 | |||
| 419faa2a47 | |||
| 1d3b181a1c | |||
| e0d4ec4a28 | |||
| f95d8cbdde | |||
| e22c9151d1 | |||
| f6ae58a05d | |||
| cb3fc1c951 | |||
| 7f84fd2b4c | |||
| 518a67bf8a | |||
| cc6af53eff |
@@ -6,6 +6,7 @@
|
||||
/data/config.php
|
||||
/build
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
/test.php
|
||||
/main.html
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ DirectoryIndex index.php index.html
|
||||
|
||||
# PROTECTED DIRECTORIES
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^/?(data|api)/ - [F]
|
||||
RewriteRule ^/?(data|api|client)/ - [F]
|
||||
|
||||
RewriteRule ^/?data/config\.php$ - [F]
|
||||
RewriteRule ^/?data/logs/ - [F]
|
||||
@@ -19,6 +19,7 @@ DirectoryIndex index.php index.html
|
||||
RewriteRule ^/?application/ - [F]
|
||||
RewriteRule ^/?custom/ - [F]
|
||||
RewriteRule ^/?vendor/ - [F]
|
||||
RewriteRule ^/?client/?$ - [F]
|
||||
#END PROTECTED DIRECTORIES
|
||||
|
||||
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
|
||||
|
||||
+19
-25
@@ -2,8 +2,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -30,13 +30,15 @@ module.exports = function (grunt) {
|
||||
'client/lib/jquery-ui.min.js',
|
||||
'client/lib/jquery.ui.touch-punch.min.js',
|
||||
'client/lib/moment.min.js',
|
||||
'client/lib/moment-timezone-with-data.min.js',
|
||||
'client/lib/moment-timezone.min.js',
|
||||
'client/lib/moment-timezone-data.js',
|
||||
'client/lib/jquery.timepicker.min.js',
|
||||
'client/lib/jquery.autocomplete.js',
|
||||
'client/lib/bootstrap.min.js',
|
||||
'client/lib/bootstrap-datepicker.js',
|
||||
'client/lib/bull.js',
|
||||
'client/lib/marked.min.js',
|
||||
'client/lib/autobahn.js',
|
||||
|
||||
'client/src/namespace.js',
|
||||
'client/src/exceptions.js',
|
||||
@@ -87,12 +89,16 @@ module.exports = function (grunt) {
|
||||
themeList.push(file.substr(0, file.length - 5));
|
||||
});
|
||||
|
||||
var cssminFilesData = {};
|
||||
var lessData = {};
|
||||
themeList.forEach(function (theme) {
|
||||
var name = camelCaseToHyphen(theme);
|
||||
var files = {};
|
||||
files['client/css/espo/'+name+'.css'] = 'frontend/less/'+name+'/main.less';
|
||||
files['client/css/espo/'+name+'-iframe.css'] = 'frontend/less/'+name+'/iframe/main.less';
|
||||
|
||||
cssminFilesData['client/css/espo/'+name+'.css'] = 'client/css/espo/'+name+'.css';
|
||||
cssminFilesData['client/css/espo/'+name+'-iframe.css'] = 'client/css/espo/'+name+'-iframe.css';
|
||||
var o = {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
@@ -117,16 +123,22 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
start: ['build/*'],
|
||||
start: ['build/EspoCRM-*'],
|
||||
final: ['build/tmp'],
|
||||
beforeFinal: {
|
||||
src: ['build/tmp/custom/Espo/Custom/*', '!build/tmp/custom/Espo/Custom/.htaccess']
|
||||
}
|
||||
},
|
||||
less: lessData,
|
||||
cssmin: {
|
||||
themes: {
|
||||
files: cssminFilesData
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
mangle: false,
|
||||
sourceMap: true,
|
||||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
|
||||
},
|
||||
'build/tmp/client/espo.min.js': jsFilesToMinify.map(function (item) {
|
||||
@@ -176,6 +188,8 @@ module.exports = function (grunt) {
|
||||
'clear_cache.php',
|
||||
'upgrade.php',
|
||||
'extension.php',
|
||||
'websocket.php',
|
||||
'command.php',
|
||||
'index.php',
|
||||
'LICENSE.txt',
|
||||
'.htaccess',
|
||||
@@ -226,26 +240,6 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
replace: {
|
||||
timestamp: {
|
||||
options: {
|
||||
patterns: [
|
||||
{
|
||||
match: 'timestamp',
|
||||
replacement: '<%= new Date().getTime() %>'
|
||||
}
|
||||
]
|
||||
},
|
||||
files: [
|
||||
{
|
||||
src: 'build/tmp/html/main.html',
|
||||
dest: 'build/tmp/html/main.html'
|
||||
},
|
||||
{
|
||||
src: 'build/tmp/html/portal.html',
|
||||
dest: 'build/tmp/html/portal.html'
|
||||
}
|
||||
]
|
||||
},
|
||||
version: {
|
||||
options: {
|
||||
patterns: [
|
||||
@@ -290,6 +284,7 @@ module.exports = function (grunt) {
|
||||
'clean:start',
|
||||
'mkdir:tmp',
|
||||
'less',
|
||||
'cssmin',
|
||||
'uglify',
|
||||
'copy:frontendFolders',
|
||||
'copy:frontendLib',
|
||||
@@ -300,5 +295,4 @@ module.exports = function (grunt) {
|
||||
'chmod',
|
||||
'clean:final'
|
||||
]);
|
||||
|
||||
};
|
||||
|
||||
@@ -8,8 +8,8 @@ Download the latest release from our [website](http://www.espocrm.com).
|
||||
|
||||
### Requirements
|
||||
|
||||
* PHP 5.6 or above (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.5.3 or above.
|
||||
* PHP 7.1 or above (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.5.3 or above, or MariaDB.
|
||||
|
||||
For more information about server configuration see [this article](https://www.espocrm.com/documentation/administration/server-configuration/).
|
||||
|
||||
@@ -52,6 +52,12 @@ The build will be created in the `build` directory.
|
||||
|
||||
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.
|
||||
|
||||
### How to make a translation
|
||||
|
||||
Build po file with command:
|
||||
@@ -70,4 +76,3 @@ Json files will be created in build directory grouped by folders.
|
||||
### License
|
||||
|
||||
EspoCRM is published under the GNU GPLv3 [license](https://raw.githubusercontent.com/espocrm/espocrm/master/LICENSE.txt).
|
||||
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -33,39 +33,38 @@ use \Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class ActionHistoryRecord extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public function actionUpdate($params, $data, $request)
|
||||
public function beforeUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
public function beforeCreate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionListLinked($params, $data, $request)
|
||||
public function beforeListLinked()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassDelete($params, $data, $request)
|
||||
public function beforeMassDelete()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -40,27 +40,27 @@ class AuthLogRecord extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
public function beforeUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
public function beforeCreate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -80,17 +80,17 @@ class AuthToken extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
public function beforeCreate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -46,12 +46,8 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
return $this->getRecordService()->getCopiedAttachments($id);
|
||||
}
|
||||
|
||||
public function actionSendTestEmail($params, $data, $request)
|
||||
public function postActionSendTestEmail($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!$this->getAcl()->checkScope('Email')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -34,16 +34,18 @@ use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class EmailAccount extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public function actionGetFolders($params, $data, $request)
|
||||
public function postActionGetFolders($params, $data)
|
||||
{
|
||||
return $this->getRecordService()->getFolders(array(
|
||||
'host' => $request->get('host'),
|
||||
'port' => $request->get('port'),
|
||||
'ssl' => $request->get('ssl') === 'true',
|
||||
'username' => $request->get('username'),
|
||||
'password' => $request->get('password'),
|
||||
'id' => $request->get('id')
|
||||
));
|
||||
return $this->getRecordService()->getFolders([
|
||||
'host' => $data->host ?? null,
|
||||
'port' => $data->port ?? null,
|
||||
'ssl' => $data->ssl ?? false,
|
||||
'username' => $data->username ?? null,
|
||||
'password' => $data->password ?? null,
|
||||
'id' => $data->id ?? null,
|
||||
'emailAddress' => $data->emailAddress ?? null,
|
||||
'userId' => $data->userId ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
protected function checkControllerAccess()
|
||||
@@ -53,12 +55,8 @@ class EmailAccount extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
|
||||
public function actionTestConnection($params, $data, $request)
|
||||
public function postActionTestConnection($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (is_null($data->password)) {
|
||||
$emailAccount = $this->getEntityManager()->getEntity('EmailAccount', $data->id);
|
||||
if (!$emailAccount || !$emailAccount->id) {
|
||||
@@ -75,4 +73,3 @@ class EmailAccount extends \Espo\Core\Controllers\Record
|
||||
return $this->getRecordService()->testConnection(get_object_vars($data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -42,11 +42,13 @@ class EmailAddress extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
$q = $request->get('q');
|
||||
$limit = intval($request->get('limit'));
|
||||
if (empty($limit) || $limit > 30) {
|
||||
$limit = 5;
|
||||
$maxSize = intval($request->get('maxSize'));
|
||||
if (empty($maxSize) || $maxSize > 50) {
|
||||
$maxSize = $this->getConfig()->get('recordsPerPage', 20);
|
||||
}
|
||||
return $this->getRecordService()->searchInAddressBook($q, $limit);
|
||||
|
||||
$onlyActual = $request->get('onlyActual') === 'true';
|
||||
|
||||
return $this->getRecordService()->searchInAddressBook($q, $maxSize, $onlyActual);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -94,25 +94,6 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
return true;
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionListLinked($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionDelete($params, $data, $request)
|
||||
{
|
||||
@@ -129,22 +110,42 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
return true;
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
public function beforeCreate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassDelete($params, $data, $request)
|
||||
public function beforeUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforePatch()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeListLinked()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassDelete()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -43,27 +43,27 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data, $request)
|
||||
public function beforePatch()
|
||||
{
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
public function beforeUpdate()
|
||||
{
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -93,9 +93,9 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
$attachment->set('contents', $contents);
|
||||
$this->getEntityManager()->saveEntity($attachment);
|
||||
|
||||
return array(
|
||||
return [
|
||||
'attachmentId' => $attachment->id
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
public function actionRevert($params, $data, $request)
|
||||
@@ -175,7 +175,7 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
$timezone = $data->timezone;
|
||||
}
|
||||
|
||||
$importParams = array(
|
||||
$importParams = [
|
||||
'headerRow' => !empty($data->headerRow),
|
||||
'delimiter' => $data->delimiter,
|
||||
'textQualifier' => $data->textQualifier,
|
||||
@@ -188,8 +188,9 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
'defaultValues' => $data->defaultValues,
|
||||
'action' => $data->action,
|
||||
'skipDuplicateChecking' => !empty($data->skipDuplicateChecking),
|
||||
'idleMode' => !empty($data->idleMode)
|
||||
);
|
||||
'idleMode' => !empty($data->idleMode),
|
||||
'silentMode' => !empty($data->silentMode),
|
||||
];
|
||||
|
||||
if (property_exists($data, 'updateBy')) {
|
||||
$importParams['updateBy'] = $data->updateBy;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -41,24 +41,20 @@ class InboundEmail extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
|
||||
public function actionGetFolders($params, $data, $request)
|
||||
public function postActionGetFolders($params, $data, $request)
|
||||
{
|
||||
return $this->getRecordService()->getFolders(array(
|
||||
'host' => $request->get('host'),
|
||||
'port' => $request->get('port'),
|
||||
'ssl' => $request->get('ssl') === 'true',
|
||||
'username' => $request->get('username'),
|
||||
'password' => $request->get('password'),
|
||||
'id' => $request->get('id')
|
||||
));
|
||||
return $this->getRecordService()->getFolders([
|
||||
'host' => $data->host ?? null,
|
||||
'port' => $data->port ?? null,
|
||||
'ssl' => $data->ssl ?? false,
|
||||
'username' => $data->username ?? null,
|
||||
'password' => $data->password ?? null,
|
||||
'id' => $data->id ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
public function actionTestConnection($params, $data, $request)
|
||||
public function postActionTestConnection($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (is_null($data->password)) {
|
||||
$inboundEmail = $this->getEntityManager()->getEntity('InboundEmail', $data->id);
|
||||
if (!$inboundEmail || !$inboundEmail->id) {
|
||||
@@ -69,5 +65,4 @@ class InboundEmail extends \Espo\Core\Controllers\Record
|
||||
|
||||
return $this->getRecordService()->testConnection(get_object_vars($data));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -41,37 +41,37 @@ class Job extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
public function beforeCreate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
public function beforeUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data, $request)
|
||||
public function beforePatch()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionListLinked($params, $data, $request)
|
||||
public function beforeListLinked()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -78,15 +78,18 @@ class Layout extends \Espo\Core\Controllers\Base
|
||||
return $this->actionUpdate($params, $data, $request);
|
||||
}
|
||||
|
||||
public function actionResetToDefault($params, $data, $request)
|
||||
public function postActionResetToDefault($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (empty($data->scope) || empty($data->name)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$this->getContainer()->get('dataManager')->updateCacheTimestamp();
|
||||
|
||||
return $this->getContainer()->get('layout')->resetToDefault($data->scope, $data->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -35,7 +35,7 @@ class Notification extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public static $defaultAction = 'list';
|
||||
|
||||
public function actionList($params, $data, $request)
|
||||
public function getActionList($params, $data, $request, $response)
|
||||
{
|
||||
$userId = $this->getUser()->id;
|
||||
|
||||
@@ -73,29 +73,28 @@ class Notification extends \Espo\Core\Controllers\Record
|
||||
return $this->getService('Notification')->markAllRead($userId);
|
||||
}
|
||||
|
||||
public function actionExport($params, $data, $request)
|
||||
public function beforeExport()
|
||||
{
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
public function beforeMassUpdate()
|
||||
{
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeRemoveLink()
|
||||
{
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
public function actionMerge($params, $data, $request)
|
||||
public function beforeMerge()
|
||||
{
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -29,30 +29,23 @@
|
||||
|
||||
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()
|
||||
{
|
||||
if ($this->getUser()->id == 'system') {
|
||||
$data = $this->getConfig()->getData();
|
||||
} else {
|
||||
$data = $this->getConfig()->getData($this->getUser()->isAdmin());
|
||||
$data = $this->getServiceFactory()->create('Settings')->getConfigData();
|
||||
|
||||
$data->jsLibs = $this->getMetadata()->get(['app', 'jsLibs']);
|
||||
|
||||
unset($data->loginView);
|
||||
$loginView = $this->getMetadata()->get(['clientDefs', 'App', 'loginView']);
|
||||
if ($loginView) {
|
||||
$data->loginView = $loginView;
|
||||
}
|
||||
|
||||
$fieldDefs = $this->getMetadata()->get('entityDefs.Settings.fields');
|
||||
|
||||
foreach ($fieldDefs as $field => $d) {
|
||||
if ($d['type'] === 'password') {
|
||||
unset($data[$field]);
|
||||
}
|
||||
}
|
||||
|
||||
$data['jsLibs'] = $this->getMetadata()->get('app.jsLibs');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -76,41 +69,7 @@ class Settings extends \Espo\Core\Controllers\Base
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$ignoreItemList = [];
|
||||
|
||||
$systemOnlyItemList = $this->getConfig()->getSystemOnlyItemList();
|
||||
foreach ($systemOnlyItemList as $item) {
|
||||
$ignoreItemList[] = $item;
|
||||
}
|
||||
|
||||
if ($this->getConfig()->get('restrictedMode') && !$this->getUser()->isSuperAdmin()) {
|
||||
$superAdminOnlyItemList = $this->getConfig()->getSuperAdminOnlyItemList();
|
||||
foreach ($superAdminOnlyItemList as $item) {
|
||||
$ignoreItemList[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($ignoreItemList as $item) {
|
||||
unset($data->$item);
|
||||
}
|
||||
|
||||
if (
|
||||
(isset($data->useCache) && $data->useCache !== $this->getConfig()->get('useCache'))
|
||||
||
|
||||
(isset($data->aclStrictMode) && $data->aclStrictMode !== $this->getConfig()->get('aclStrictMode'))
|
||||
) {
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
}
|
||||
|
||||
$this->getConfig()->setData($data, $this->getUser()->isAdmin());
|
||||
$result = $this->getConfig()->save();
|
||||
if ($result === false) {
|
||||
throw new Error('Cannot save settings');
|
||||
}
|
||||
|
||||
if (isset($data->defaultCurrency) || isset($data->baseCurrency) || isset($data->currencyRates)) {
|
||||
$this->getContainer()->get('dataManager')->rebuildDatabase([]);
|
||||
}
|
||||
$this->getServiceFactory()->create('Settings')->setConfigData($data);
|
||||
|
||||
return $this->getConfigData();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -106,17 +106,20 @@ class User extends \Espo\Core\Controllers\Record
|
||||
return $this->getService('User')->passwordChangeRequest($userName, $emailAddress, $url);
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
public function postActionGenerateNewApiKey($params, $data, $request)
|
||||
{
|
||||
if (empty($data->id)) throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
return parent::actionCreateLink($params, $data, $request);
|
||||
return $this->getRecordService()->generateNewApiKeyForEntity($data->id)->getValueMap();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
}
|
||||
|
||||
return parent::actionRemoveLink($params, $data, $request);
|
||||
public function beforeRemoveLink($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -124,6 +124,11 @@ class Acl
|
||||
return $this->getAclManager()->getScopeForbiddenFieldList($this->getUser(), $scope, $action, $thresholdLevel);
|
||||
}
|
||||
|
||||
public function getScopeForbiddenLinkList($scope, $action = 'read', $thresholdLevel = 'no')
|
||||
{
|
||||
return $this->getAclManager()->getScopeForbiddenLinkList($this->getUser(), $scope, $action, $thresholdLevel);
|
||||
}
|
||||
|
||||
public function checkUserPermission($target, $permissionType = 'userPermission')
|
||||
{
|
||||
return $this->getAclManager()->checkUserPermission($this->getUser(), $target, $permissionType);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -36,15 +36,17 @@ use \Espo\ORM\Entity;
|
||||
|
||||
class Base implements Injectable
|
||||
{
|
||||
protected $dependencies = array(
|
||||
protected $dependencyList = [
|
||||
'config',
|
||||
'entityManager',
|
||||
'aclManager'
|
||||
);
|
||||
'aclManager',
|
||||
];
|
||||
|
||||
protected $dependencies = []; // for backward compatibility
|
||||
|
||||
protected $scope;
|
||||
|
||||
protected $injections = array();
|
||||
protected $injections = [];
|
||||
|
||||
protected $ownerUserIdAttribute = null;
|
||||
|
||||
@@ -79,12 +81,12 @@ class Base implements Injectable
|
||||
|
||||
protected function addDependency($name)
|
||||
{
|
||||
$this->dependencies[] = $name;
|
||||
$this->dependencyList[] = $name;
|
||||
}
|
||||
|
||||
public function getDependencyList()
|
||||
{
|
||||
return $this->dependencies;
|
||||
return array_merge($this->dependencyList, $this->dependencies);
|
||||
}
|
||||
|
||||
protected function getConfig()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -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,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -41,9 +41,9 @@ class AclManager
|
||||
|
||||
private $metadata;
|
||||
|
||||
private $implementationHashMap = array();
|
||||
private $implementationHashMap = [];
|
||||
|
||||
private $tableHashMap = array();
|
||||
private $tableHashMap = [];
|
||||
|
||||
protected $tableClassName = '\\Espo\\Core\\Acl\\Table';
|
||||
|
||||
@@ -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')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -93,8 +94,8 @@ class AclManager
|
||||
|
||||
if (class_exists($className)) {
|
||||
$acl = new $className($scope);
|
||||
$dependencies = $acl->getDependencyList();
|
||||
foreach ($dependencies as $name) {
|
||||
$dependencyList = $acl->getDependencyList();
|
||||
foreach ($dependencyList as $name) {
|
||||
$acl->inject($name, $this->getContainer()->get($name));
|
||||
}
|
||||
$this->implementationHashMap[$scope] = $acl;
|
||||
@@ -309,6 +310,22 @@ class AclManager
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
public function getScopeForbiddenLinkList(User $user, $scope, $action = 'read', $thresholdLevel = 'no')
|
||||
{
|
||||
$list = [];
|
||||
|
||||
if ($thresholdLevel === 'no') {
|
||||
$list = array_merge(
|
||||
$list,
|
||||
$this->getScopeRestrictedLinkList($scope, $this->getGlobalRestrictionTypeList($user, $action))
|
||||
);
|
||||
$list = array_values($list);
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function checkUserPermission(User $user, $target, $permissionType = 'userPermission')
|
||||
{
|
||||
$permission = $this->get($user, $permissionType);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -99,7 +99,7 @@ class Application
|
||||
exit;
|
||||
}
|
||||
|
||||
public function runEntryPoint($entryPoint, $data = array(), $final = false)
|
||||
public function runEntryPoint($entryPoint, $data = [], $final = false)
|
||||
{
|
||||
if (empty($entryPoint)) {
|
||||
throw new \Error();
|
||||
@@ -133,7 +133,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) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,6 +159,11 @@ class Application
|
||||
$interval = $this->getConfig()->get('daemonInterval');
|
||||
$timeout = $this->getConfig()->get('daemonProcessTimeout');
|
||||
|
||||
$phpExecutablePath = $this->getConfig()->get('phpExecutablePath');
|
||||
if (!$phpExecutablePath) {
|
||||
$phpExecutablePath = (new \Symfony\Component\Process\PhpExecutableFinder)->find();
|
||||
}
|
||||
|
||||
if (!$maxProcessNumber || !$interval) {
|
||||
$GLOBALS['log']->error("Daemon config params are not set.");
|
||||
return;
|
||||
@@ -169,7 +176,7 @@ class Application
|
||||
foreach ($processList as $i => $process) {
|
||||
if ($process->isRunning()) {
|
||||
$runningCount++;
|
||||
} else if ($process->isRunning()) {
|
||||
} else {
|
||||
unset($processList[$i]);
|
||||
}
|
||||
}
|
||||
@@ -178,9 +185,10 @@ class Application
|
||||
$toSkip = true;
|
||||
}
|
||||
if (!$toSkip) {
|
||||
$process = new \Symfony\Component\Process\Process(['php', 'cron.php']);
|
||||
$process = new \Symfony\Component\Process\Process([$phpExecutablePath, 'cron.php']);
|
||||
$process->setTimeout($timeout);
|
||||
$process->run();
|
||||
$processList[] = $process;
|
||||
}
|
||||
sleep($interval);
|
||||
}
|
||||
@@ -207,6 +215,15 @@ class Application
|
||||
$dataManager->clearCache();
|
||||
}
|
||||
|
||||
public function runCommand(string $command)
|
||||
{
|
||||
$auth = $this->createAuth();
|
||||
$auth->useNoAuth();
|
||||
|
||||
$consoleCommandManager = $this->getContainer()->get('consoleCommandManager');
|
||||
return $consoleCommandManager->run($command);
|
||||
}
|
||||
|
||||
public function isInstalled()
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
@@ -247,7 +264,7 @@ class Application
|
||||
}
|
||||
|
||||
$routeOptions = call_user_func($route->getCallable());
|
||||
$routeKeys = is_array($routeOptions) ? array_keys($routeOptions) : array();
|
||||
$routeKeys = is_array($routeOptions) ? array_keys($routeOptions) : [];
|
||||
|
||||
if (!in_array('controller', $routeKeys, true)) {
|
||||
return $container->get('output')->render($routeOptions);
|
||||
@@ -299,8 +316,6 @@ class Application
|
||||
protected function getRouteList()
|
||||
{
|
||||
$routes = new \Espo\Core\Utils\Route($this->getConfig(), $this->getMetadata(), $this->getContainer()->get('fileManager'));
|
||||
|
||||
|
||||
return $routes->getAll();
|
||||
}
|
||||
|
||||
@@ -315,7 +330,7 @@ class Application
|
||||
continue;
|
||||
}
|
||||
|
||||
$currentRoute = $this->getSlim()->$method($route['route'], function() use ($route) { //todo change "use" for php 5.4
|
||||
$currentRoute = $this->getSlim()->$method($route['route'], function() use ($route) {
|
||||
return $route['params'];
|
||||
});
|
||||
|
||||
@@ -328,30 +343,7 @@ class Application
|
||||
protected function initAutoloads()
|
||||
{
|
||||
$autoload = new \Espo\Core\Utils\Autoload($this->getConfig(), $this->getMetadata(), $this->getContainer()->get('fileManager'));
|
||||
|
||||
try {
|
||||
$autoloadList = $autoload->getAll();
|
||||
} catch (\Exception $e) {} //bad permissions
|
||||
|
||||
if (empty($autoloadList)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$namespacesPath = 'vendor/composer/autoload_namespaces.php';
|
||||
$existingNamespaces = file_exists($namespacesPath) ? include($namespacesPath) : array();
|
||||
if (!empty($existingNamespaces) && is_array($existingNamespaces)) {
|
||||
$existingNamespaces = array_keys($existingNamespaces);
|
||||
}
|
||||
|
||||
$classLoader = new \Composer\Autoload\ClassLoader();
|
||||
|
||||
foreach ($autoloadList as $prefix => $path) {
|
||||
if (!in_array($prefix, $existingNamespaces)) {
|
||||
$classLoader->add($prefix, $path);
|
||||
}
|
||||
}
|
||||
|
||||
$classLoader->register(true);
|
||||
$autoload->register();
|
||||
}
|
||||
|
||||
public function setBasePath($basePath)
|
||||
@@ -370,7 +362,9 @@ class Application
|
||||
return $_GET['portalId'];
|
||||
}
|
||||
if (!empty($_COOKIE['auth-token'])) {
|
||||
$token = $this->getContainer()->get('entityManager')->getRepository('AuthToken')->where(array('token' => $_COOKIE['auth-token']))->findOne();
|
||||
$token =
|
||||
$this->getContainer()->get('entityManager')
|
||||
->getRepository('AuthToken')->where(['token' => $_COOKIE['auth-token']])->findOne();
|
||||
|
||||
if ($token && $token->get('portalId')) {
|
||||
return $token->get('portalId');
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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;
|
||||
|
||||
class CommandManager
|
||||
{
|
||||
private $container;
|
||||
|
||||
public function __construct(\Espo\Core\Container $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
public function run(string $command)
|
||||
{
|
||||
$command = ucfirst(\Espo\Core\Utils\Util::hyphenToCamelCase($command));
|
||||
|
||||
$argumentList = [];
|
||||
$options = [];
|
||||
$flagList = [];
|
||||
|
||||
$skipIndex = 1;
|
||||
if (isset($_SERVER['argv'][0]) && $_SERVER['argv'][0] === 'command.php') {
|
||||
$skipIndex = 2;
|
||||
}
|
||||
|
||||
foreach ($_SERVER['argv'] as $i => $item) {
|
||||
if ($i < $skipIndex) continue;
|
||||
|
||||
if (strpos($item, '--') === 0 && strpos($item, '=') > 2) {
|
||||
list($name, $value) = explode('=', substr($item, 2));
|
||||
$name = \Espo\Core\Utils\Util::hyphenToCamelCase($name);
|
||||
$options[$name] = $value;
|
||||
} else if (strpos($item, '-') === 0) {
|
||||
$flagList[] = substr($item, 1);
|
||||
} else {
|
||||
$argumentList[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
$className = '\\Espo\\Core\\Console\\Commands\\' . $command;
|
||||
$className = $this->container->get('metadata')->get(['app', 'consoleCommands', $command, 'className'], $className);
|
||||
if (!class_exists($className)) {
|
||||
$msg = "Command '{$command}' does not exist.";
|
||||
echo $msg . "\n";
|
||||
throw new \Espo\Core\Exceptions\Error($msg);
|
||||
}
|
||||
$impl = new $className($this->container);
|
||||
return $impl->run($options, $flagList, $argumentList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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 AclCheck extends Base
|
||||
{
|
||||
public function run($options)
|
||||
{
|
||||
$userId = $options['userId'] ?? null;
|
||||
$scope = $options['scope'] ?? null;
|
||||
$id = $options['id'] ?? null;
|
||||
$action = $options['action'] ?? null;
|
||||
|
||||
if (empty($userId)) return;
|
||||
if (empty($scope)) return;
|
||||
if (empty($id)) return;
|
||||
|
||||
$container = $this->getContainer();
|
||||
$entityManager = $container->get('entityManager');
|
||||
|
||||
$user = $entityManager->getEntity('User', $userId);
|
||||
if (!$user) return;
|
||||
|
||||
if ($user->isPortal()) {
|
||||
$portalIdList = $user->getLinkMultipleIdList('portals');
|
||||
foreach ($portalIdList as $portalId) {
|
||||
$application = new \Espo\Core\Portal\Application($portalId);
|
||||
$containerPortal = $application->getContainer();
|
||||
$entityManager = $containerPortal->get('entityManager');
|
||||
|
||||
$user = $entityManager->getEntity('User', $userId);
|
||||
if (!$user) return;
|
||||
|
||||
$result = $this->check($user, $scope, $id, $action, $containerPortal);
|
||||
if ($result) {
|
||||
return 'true';
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->check($user, $scope, $id, $action, $container)) {
|
||||
return 'true';
|
||||
}
|
||||
}
|
||||
|
||||
protected function check($user, $scope, $id, $action, $container)
|
||||
{
|
||||
$entityManager = $container->get('entityManager');
|
||||
|
||||
$entity = $entityManager->getEntity($scope, $id);
|
||||
if (!$entity) return;
|
||||
|
||||
$aclManager = $container->get('aclManager');
|
||||
|
||||
if ($aclManager->check($user, $entity, $action)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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 AuthTokenCheck extends Base
|
||||
{
|
||||
public function run($options, $flagList, $argumentList)
|
||||
{
|
||||
$token = $argumentList[0] ?? null;
|
||||
if (empty($token)) return;
|
||||
|
||||
$entityManager = $this->getContainer()->get('entityManager');
|
||||
|
||||
$authToken = $entityManager->getRepository('AuthToken')->where([
|
||||
'token' => $token,
|
||||
'isActive' => true,
|
||||
])->findOne();
|
||||
|
||||
if (!$authToken) return;
|
||||
if (!$authToken->get('userId')) return;
|
||||
|
||||
$userId = $authToken->get('userId');
|
||||
|
||||
$user = $entityManager->getEntity('User', $userId);
|
||||
if (!$user) return;
|
||||
|
||||
return $user->id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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;
|
||||
|
||||
abstract class Base
|
||||
{
|
||||
private $container;
|
||||
|
||||
public function __construct(\Espo\Core\Container $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
protected function getContainer()
|
||||
{
|
||||
return $this->container;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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 ClearCache extends Base
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
echo "Cache has been cleared.\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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 Rebuild extends Base
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$this->getContainer()->get('dataManager')->rebuild();
|
||||
echo "Rebuild has been done.\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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 RunJob extends Base
|
||||
{
|
||||
public function run($options, $flags, $argumentList)
|
||||
{
|
||||
$jobName = $options['job'] ?? null;
|
||||
$targetId = $options['targetId'] ?? null;
|
||||
$targetType = $options['targetType'] ?? null;
|
||||
|
||||
if (!$jobName && count($argumentList)) {
|
||||
$jobName = $argumentList[0];
|
||||
}
|
||||
|
||||
if (!$jobName) echo "No job specified.\n";
|
||||
|
||||
$jobName = ucfirst(\Espo\Core\Utils\Util::hyphenToCamelCase($jobName));
|
||||
|
||||
$container = $this->getContainer();
|
||||
$entityManager = $container->get('entityManager');
|
||||
|
||||
$job = $entityManager->createEntity('Job', [
|
||||
'name' => $jobName,
|
||||
'job' => $jobName,
|
||||
'targetType' => $targetType,
|
||||
'targetId' => $targetId,
|
||||
]);
|
||||
|
||||
$cronManager = new \Espo\Core\CronManager($container);
|
||||
|
||||
$result = $cronManager->runJob($job);
|
||||
|
||||
if ($result) {
|
||||
echo "Job '{$jobName}' has been executed.\n";
|
||||
} else {
|
||||
echo "Job '{$jobName}' failed to execute.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 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 Upgrade extends Base
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$infoData = $this->getVersionInfo();
|
||||
if (!$infoData) return;
|
||||
|
||||
$nextVersion = $infoData->nextVersion ?? null;
|
||||
$lastVersion = $infoData->lastVersion ?? null;
|
||||
|
||||
$fromVersion = $this->getConfig()->get('version');
|
||||
|
||||
fwrite(\STDOUT, "Current version is {$fromVersion}.\n");
|
||||
|
||||
if (!$nextVersion) {
|
||||
echo "There are no available upgrades.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
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, "Downloading...");
|
||||
|
||||
$upgradePackageFilePath = $this->downloadFile($infoData->nextPackage);
|
||||
if (!$upgradePackageFilePath) return;
|
||||
|
||||
fwrite(\STDOUT, "\n");
|
||||
|
||||
fwrite(\STDOUT, "Upgrading... This may take a while...");
|
||||
|
||||
$this->upgrade($upgradePackageFilePath);
|
||||
|
||||
fwrite(\STDOUT, "\n");
|
||||
|
||||
fwrite(\STDOUT, $resultText);
|
||||
|
||||
$this->getFileManager()->unlink($upgradePackageFilePath);
|
||||
|
||||
$app = new \Espo\Core\Application();
|
||||
$currentVerison = $app->getContainer()->get('config')->get('version');
|
||||
|
||||
fwrite(\STDOUT, "Upgrade is complete. Current version is {$currentVerison}.\n");
|
||||
|
||||
if ($lastVersion && $lastVersion !== $currentVerison && $fromVersion !== $currentVerison) {
|
||||
fwrite(\STDOUT, "Newer version is available. Run command again to upgrade.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($lastVersion && $lastVersion === $currentVerison) {
|
||||
fwrite(\STDOUT, "You have the latest version.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected function upgrade($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]);
|
||||
} catch (\Exception $e) {
|
||||
die("Error: " . $e->getMessage() . "\n");
|
||||
}
|
||||
}
|
||||
|
||||
protected function confirm()
|
||||
{
|
||||
$fh = fopen('php://stdin', 'r');
|
||||
$inputLine = trim(fgets($fh));
|
||||
fclose($fh);
|
||||
if (strtolower($inputLine) !== 'y'){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function getConfig()
|
||||
{
|
||||
return $this->getContainer()->get('config');
|
||||
}
|
||||
|
||||
protected function getFileManager()
|
||||
{
|
||||
return $this->getContainer()->get('fileManager');
|
||||
}
|
||||
|
||||
protected function getVersionInfo()
|
||||
{
|
||||
$url = 'https://s.espocrm.com/upgrade/next/';
|
||||
$url = $this->getConfig()->get('upgradeNextVersionUrl', $url);
|
||||
$url .= '?fromVersion=' . $this->getConfig()->get('version');
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, \CURLOPT_SSL_VERIFYPEER, true);
|
||||
curl_setopt($ch, \CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, \CURLOPT_URL, $url);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
try {
|
||||
$data = json_decode($result);
|
||||
} catch (\Exception $e) {
|
||||
echo "Could not parse info about next version.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$data) {
|
||||
echo "Could not get info about next version.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function downloadFile($url)
|
||||
{
|
||||
$localFilePath = 'data/upload/upgrades/' . \Espo\Core\Utils\Util::generateId() . '.zip';
|
||||
$this->getFileManager()->putContents($localFilePath, '');
|
||||
|
||||
if (is_file($url)) {
|
||||
copy($url, $localFilePath);
|
||||
} else {
|
||||
$options = [
|
||||
CURLOPT_FILE => fopen($localFilePath, 'w'),
|
||||
CURLOPT_TIMEOUT => 3600,
|
||||
CURLOPT_URL => $url
|
||||
];
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, $options);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
if (!$this->getFileManager()->isFile($localFilePath)) {
|
||||
echo "\nCould not download upgrade file.\n";
|
||||
$this->getFileManager()->unlink($localFilePath);
|
||||
return;
|
||||
}
|
||||
|
||||
return realpath($localFilePath);
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -34,15 +34,11 @@ class Container
|
||||
|
||||
private $data = [];
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function get($name)
|
||||
public function get(string $name)
|
||||
{
|
||||
if (empty($this->data[$name])) {
|
||||
$this->load($name);
|
||||
@@ -67,7 +63,7 @@ class Container
|
||||
} else {
|
||||
|
||||
try {
|
||||
$className = $this->get('metadata')->get('app.loaders.' . ucfirst($name));
|
||||
$className = $this->get('metadata')->get(['app', 'loaders', ucfirst($name)]);
|
||||
} catch (\Exception $e) {}
|
||||
|
||||
if (!isset($className) || !class_exists($className)) {
|
||||
@@ -86,10 +82,10 @@ class Container
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function getServiceClassName($name, $default)
|
||||
public function getServiceClassName(string $name, string $default)
|
||||
{
|
||||
$metadata = $this->get('metadata');
|
||||
$className = $metadata->get('app.serviceContainer.classNames.' . $name, $default);
|
||||
$className = $metadata->get(['app', 'serviceContainer', 'classNames', $name], $default);
|
||||
return $className;
|
||||
}
|
||||
|
||||
@@ -119,7 +115,7 @@ class Container
|
||||
$rotation = $config->get('logger.rotation', true);
|
||||
|
||||
$log = new \Espo\Core\Utils\Log('Espo');
|
||||
$levelCode = $log->getLevelCode($config->get('logger.level', 'WARNING'));
|
||||
$levelCode = $log::toMonologLevel($config->get('logger.level', 'WARNING'));
|
||||
|
||||
if ($rotation) {
|
||||
$maxFileNumber = $config->get('logger.maxFileNumber', 30);
|
||||
@@ -131,7 +127,7 @@ class Container
|
||||
|
||||
$errorHandler = new \Monolog\ErrorHandler($log);
|
||||
$errorHandler->registerExceptionHandler(null, false);
|
||||
$errorHandler->registerErrorHandler(array(), false);
|
||||
$errorHandler->registerErrorHandler([], false);
|
||||
|
||||
return $log;
|
||||
}
|
||||
@@ -176,15 +172,6 @@ class Container
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadMailSender()
|
||||
{
|
||||
$className = $this->getServiceClassName('mailSender', '\\Espo\\Core\\Mail\\Sender');
|
||||
return new $className(
|
||||
$this->get('config'),
|
||||
$this->get('entityManager')
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadDateTime()
|
||||
{
|
||||
return new \Espo\Core\Utils\DateTime(
|
||||
@@ -209,19 +196,6 @@ class Container
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadSelectManagerFactory()
|
||||
{
|
||||
return new \Espo\Core\SelectManagerFactory(
|
||||
$this->get('entityManager'),
|
||||
$this->get('user'),
|
||||
$this->get('acl'),
|
||||
$this->get('aclManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('config'),
|
||||
$this->get('injectableFactory')
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadNotificatorFactory()
|
||||
{
|
||||
return new \Espo\Core\NotificatorFactory(
|
||||
@@ -317,7 +291,7 @@ class Container
|
||||
'en_US',
|
||||
$this->get('fileManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('useCache')
|
||||
$this->get('config')->get('useCache')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -327,7 +301,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')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -374,14 +348,6 @@ class Container
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadClientManager()
|
||||
{
|
||||
return new \Espo\Core\Utils\ClientManager(
|
||||
$this->get('config'),
|
||||
$this->get('themeManager')
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadInjectableFactory()
|
||||
{
|
||||
return new \Espo\Core\InjectableFactory(
|
||||
@@ -394,4 +360,3 @@ class Container
|
||||
$this->set('user', $user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -67,11 +67,9 @@ class Record extends Base
|
||||
public function actionRead($params, $data, $request)
|
||||
{
|
||||
$id = $params['id'];
|
||||
$entity = $this->getRecordService()->readEntity($id);
|
||||
$entity = $this->getRecordService()->read($id);
|
||||
|
||||
if (empty($entity)) {
|
||||
throw new NotFound();
|
||||
}
|
||||
if (!$entity) throw new NotFound();
|
||||
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
@@ -95,7 +93,7 @@ class Record extends Base
|
||||
|
||||
$service = $this->getRecordService();
|
||||
|
||||
if ($entity = $service->createEntity($data)) {
|
||||
if ($entity = $service->create($data)) {
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
|
||||
@@ -116,7 +114,7 @@ class Record extends Base
|
||||
|
||||
$id = $params['id'];
|
||||
|
||||
if ($entity = $this->getRecordService()->updateEntity($id, $data)) {
|
||||
if ($entity = $this->getRecordService()->update($id, $data)) {
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
|
||||
@@ -140,12 +138,19 @@ class Record extends Base
|
||||
throw new Forbidden("Max size should should not exceed " . $maxSizeLimit . ". Use offset and limit.");
|
||||
}
|
||||
|
||||
$result = $this->getRecordService()->findEntities($params);
|
||||
$result = $this->getRecordService()->find($params);
|
||||
|
||||
return array(
|
||||
'total' => $result['total'],
|
||||
'list' => isset($result['collection']) ? $result['collection']->getValueMapList() : $result['list']
|
||||
);
|
||||
if (is_array($result)) {
|
||||
return [
|
||||
'total' => $result['total'],
|
||||
'list' => isset($result['collection']) ? $result['collection']->getValueMapList() : $result['list']
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'total' => $result->total,
|
||||
'list' => isset($result->collection) ? $result->collection->getValueMapList() : $result->list
|
||||
];
|
||||
}
|
||||
|
||||
public function getActionListKanban($params, $data, $request)
|
||||
@@ -195,12 +200,19 @@ class Record extends Base
|
||||
throw new Forbidden("Max size should should not exceed " . $maxSizeLimit . ". Use offset and limit.");
|
||||
}
|
||||
|
||||
$result = $this->getRecordService()->findLinkedEntities($id, $link, $params);
|
||||
$result = $this->getRecordService()->findLinked($id, $link, $params);
|
||||
|
||||
return array(
|
||||
'total' => $result['total'],
|
||||
'list' => isset($result['collection']) ? $result['collection']->getValueMapList() : $result['list']
|
||||
);
|
||||
if (is_array($result)) {
|
||||
return [
|
||||
'total' => $result['total'],
|
||||
'list' => isset($result['collection']) ? $result['collection']->getValueMapList() : $result['list']
|
||||
];
|
||||
}
|
||||
|
||||
return (object) [
|
||||
'total' => $result->total,
|
||||
'list' => isset($result->collection) ? $result->collection->getValueMapList() : $result->list
|
||||
];
|
||||
}
|
||||
|
||||
public function actionDelete($params, $data, $request)
|
||||
@@ -211,7 +223,7 @@ class Record extends Base
|
||||
|
||||
$id = $params['id'];
|
||||
|
||||
if ($this->getRecordService()->deleteEntity($id)) {
|
||||
if ($this->getRecordService()->delete($id)) {
|
||||
return true;
|
||||
}
|
||||
throw new Error();
|
||||
@@ -262,9 +274,9 @@ class Record extends Base
|
||||
$params['format'] = $data->format;
|
||||
}
|
||||
|
||||
return array(
|
||||
return [
|
||||
'id' => $this->getRecordService()->export($params)
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
@@ -296,33 +308,26 @@ class Record extends Base
|
||||
|
||||
$attributes = $data->attributes;
|
||||
|
||||
$idsUpdated = $this->getRecordService()->massUpdate($attributes, $params);
|
||||
$idsUpdated = $this->getRecordService()->massUpdate($params, $attributes);
|
||||
|
||||
return $idsUpdated;
|
||||
}
|
||||
|
||||
public function actionMassDelete($params, $data, $request)
|
||||
public function postActionMassDelete($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$this->getAcl()->check($this->name, 'delete')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$params = array();
|
||||
if (property_exists($data, 'where') && !empty($data->byWhere)) {
|
||||
$where = json_decode(json_encode($data->where), true);
|
||||
$params['where'] = $where;
|
||||
if (property_exists($data, 'selectData')) {
|
||||
$params['selectData'] = json_decode(json_encode($data->selectData), true);
|
||||
$actionParams = $this->getMassActionParamsFromData($data);
|
||||
|
||||
if (array_key_exists('where', $actionParams)) {
|
||||
if ($this->getAcl()->get('massUpdatePermission') !== 'yes') {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
return $this->getRecordService()->massRemove($params);
|
||||
return $this->getRecordService()->massDelete($actionParams);
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
@@ -349,7 +354,7 @@ class Record extends Base
|
||||
$selectData = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
|
||||
return $this->getRecordService()->linkEntityMass($id, $link, $where, $selectData);
|
||||
return $this->getRecordService()->massLink($id, $link, $where, $selectData);
|
||||
} else {
|
||||
$foreignIdList = array();
|
||||
if (isset($data->id)) {
|
||||
@@ -363,7 +368,7 @@ class Record extends Base
|
||||
|
||||
$result = false;
|
||||
foreach ($foreignIdList as $foreignId) {
|
||||
if ($this->getRecordService()->linkEntity($id, $link, $foreignId)) {
|
||||
if ($this->getRecordService()->link($id, $link, $foreignId)) {
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
@@ -400,7 +405,7 @@ class Record extends Base
|
||||
|
||||
$result = false;
|
||||
foreach ($foreignIdList as $foreignId) {
|
||||
if ($this->getRecordService()->unlinkEntity($id, $link, $foreignId)) {
|
||||
if ($this->getRecordService()->unlink($id, $link, $foreignId)) {
|
||||
$result = $result || true;
|
||||
}
|
||||
}
|
||||
@@ -496,4 +501,39 @@ class Record extends Base
|
||||
|
||||
return $this->getRecordService()->massUnfollow($params);
|
||||
}
|
||||
|
||||
protected function getMassActionParamsFromData($data)
|
||||
{
|
||||
$params = [];
|
||||
if (property_exists($data, 'where') && !empty($data->byWhere)) {
|
||||
$where = json_decode(json_encode($data->where), true);
|
||||
$params['where'] = $where;
|
||||
if (property_exists($data, 'selectData')) {
|
||||
$params['selectData'] = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
}
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
public function postActionMassRecalculateFormula($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
if (!$this->getAcl()->check($this->name, 'edit')) throw new Forbidden();
|
||||
|
||||
return $this->getRecordService()->massRecalculateFormula($this->getMassActionParamsFromData($data));
|
||||
}
|
||||
|
||||
public function postActionRestoreDeleted($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
$id = $data->id ?? null;
|
||||
if (!$id) throw new Forbidden();
|
||||
|
||||
return $this->getRecordService()->restoreDeleted($id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -53,6 +53,15 @@ class CronManager
|
||||
|
||||
private $useProcessPool = false;
|
||||
|
||||
private $asSoonAsPossibleSchedulingList = [
|
||||
'*',
|
||||
'* *',
|
||||
'* * *',
|
||||
'* * * *',
|
||||
'* * * * *',
|
||||
'* * * * * *',
|
||||
];
|
||||
|
||||
const PENDING = 'Pending';
|
||||
|
||||
const READY = 'Ready';
|
||||
@@ -173,8 +182,6 @@ class CronManager
|
||||
|
||||
/**
|
||||
* Run Cron
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
@@ -185,7 +192,7 @@ class CronManager
|
||||
|
||||
$this->setLastRunTime(time());
|
||||
|
||||
$this->getCronJobUtil()->markFailedJobs();
|
||||
$this->getCronJobUtil()->markJobsFailed();
|
||||
$this->getCronJobUtil()->updateFailedJobAttempts();
|
||||
$this->createJobsFromScheduledJobs();
|
||||
$this->getCronJobUtil()->removePendingJobDuplicates();
|
||||
@@ -231,6 +238,9 @@ class CronManager
|
||||
if (!$noLock) $this->unlockTables();
|
||||
continue;
|
||||
}
|
||||
|
||||
$job->set('startedAt', date('Y-m-d H:i:s'));
|
||||
|
||||
if ($useProcessPool) {
|
||||
$job->set('status', self::READY);
|
||||
} else {
|
||||
@@ -276,6 +286,10 @@ class CronManager
|
||||
throw new Error("Can't run job {$id} with no status Ready.");
|
||||
}
|
||||
|
||||
if (!$job->get('startedAt')) {
|
||||
$job->set('startedAt', date('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
$job->set('status', self::RUNNING);
|
||||
$job->set('pid', \Espo\Core\Utils\System::getPid());
|
||||
$this->getEntityManager()->saveEntity($job);
|
||||
@@ -283,7 +297,7 @@ class CronManager
|
||||
$this->runJob($job);
|
||||
}
|
||||
|
||||
public function runJob($job)
|
||||
public function runJob(\Espo\Entities\Job $job)
|
||||
{
|
||||
$isSuccess = true;
|
||||
$skipLog = false;
|
||||
@@ -291,10 +305,12 @@ class CronManager
|
||||
try {
|
||||
if ($job->get('scheduledJobId')) {
|
||||
$this->runScheduledJob($job);
|
||||
} else if ($job->get('job')) {
|
||||
$this->runJobByName($job);
|
||||
} else {
|
||||
$this->runService($job);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Throwable $e) {
|
||||
$isSuccess = false;
|
||||
if ($e->getCode() === -1) {
|
||||
$job->set('attempts', 0);
|
||||
@@ -317,6 +333,9 @@ class CronManager
|
||||
if ($job->get('scheduledJobId') && !$skipLog) {
|
||||
$this->getCronScheduledJobUtil()->addLogRecord($job->get('scheduledJobId'), $status, null, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
|
||||
if ($isSuccess) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function runScheduledJob($job)
|
||||
@@ -324,18 +343,14 @@ class CronManager
|
||||
$jobName = $job->get('scheduledJobJob');
|
||||
|
||||
$className = $this->getScheduledJobUtil()->get($jobName);
|
||||
if ($className === false) {
|
||||
throw new NotFound();
|
||||
}
|
||||
|
||||
if ($className === false) throw new Error("No class name for job {$jobName}.");
|
||||
|
||||
$jobClass = new $className($this->container);
|
||||
$method = 'run';
|
||||
if (!method_exists($jobClass, $method)) {
|
||||
throw new NotFound();
|
||||
}
|
||||
if (!method_exists($jobClass, $method)) throw new Error();
|
||||
|
||||
$data = null;
|
||||
|
||||
if ($job->get('data')) {
|
||||
$data = $job->get('data');
|
||||
}
|
||||
@@ -343,43 +358,47 @@ class CronManager
|
||||
$jobClass->$method($data, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Run Service
|
||||
*
|
||||
* @param array $job
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function runService($job)
|
||||
{
|
||||
$serviceName = $job->get('serviceName');
|
||||
|
||||
if (!$serviceName) {
|
||||
throw new Error('Job with empty serviceName.');
|
||||
throw new Error("Job with empty serviceName.");
|
||||
}
|
||||
|
||||
if (!$this->getServiceFactory()->checkExists($serviceName)) {
|
||||
throw new NotFound();
|
||||
}
|
||||
if (!$this->getServiceFactory()->checkExists($serviceName)) throw new Error();
|
||||
|
||||
$service = $this->getServiceFactory()->create($serviceName);
|
||||
|
||||
$methodNameDeprecated = $job->get('method');
|
||||
$methodName = $job->get('methodName');
|
||||
|
||||
if (!$methodName) {
|
||||
throw new Error('Job with empty methodName.');
|
||||
}
|
||||
if (!$methodName) throw new Error('Job with empty methodName.');
|
||||
|
||||
if (!method_exists($service, $methodName)) {
|
||||
throw new NotFound();
|
||||
}
|
||||
if (!method_exists($service, $methodName)) throw new Error();
|
||||
|
||||
$data = $job->get('data');
|
||||
|
||||
$service->$methodName($data, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
|
||||
protected function runJobByName($job)
|
||||
{
|
||||
$jobName = $job->get('job');
|
||||
|
||||
$className = $this->getScheduledJobUtil()->get($jobName);
|
||||
|
||||
if ($className === false) throw new Error("No class name for job {$jobName}.");
|
||||
|
||||
$jobClass = new $className($this->container);
|
||||
$method = 'run';
|
||||
if (!method_exists($jobClass, $method)) throw new Error();
|
||||
|
||||
$data = $job->get('data') ?: null;
|
||||
|
||||
$jobClass->$method($data, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
|
||||
protected function createJobsFromScheduledJobs()
|
||||
{
|
||||
$activeScheduledJobList = $this->getCronScheduledJobUtil()->getActiveScheduledJobList();
|
||||
@@ -388,7 +407,7 @@ class CronManager
|
||||
$createdJobIdList = [];
|
||||
foreach ($activeScheduledJobList as $scheduledJob) {
|
||||
$scheduling = $scheduledJob->get('scheduling');
|
||||
$asSoonAsPossible = $scheduling === '* * * * *';
|
||||
$asSoonAsPossible = in_array($scheduling, $this->asSoonAsPossibleSchedulingList);
|
||||
|
||||
if ($asSoonAsPossible) {
|
||||
$nextDate = date('Y-m-d H:i:s');
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -119,6 +119,7 @@ class DataManager
|
||||
$metadata->init(true);
|
||||
|
||||
$ormData = $this->getContainer()->get('ormMetadata')->getData(true);
|
||||
$this->getContainer()->get('entityManager')->setMetadata($ormData);
|
||||
|
||||
$this->updateCacheTimestamp();
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -25,14 +25,11 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Exceptions;
|
||||
|
||||
class BadRequest extends \Exception
|
||||
{
|
||||
protected $code = 400;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -25,13 +25,11 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Exceptions;
|
||||
|
||||
class Conflict extends \Exception
|
||||
{
|
||||
protected $code = 409;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
* Copyright (C) 2014-2019 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
|
||||
@@ -25,7 +25,7 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Exceptions;
|
||||
|
||||
@@ -33,5 +33,3 @@ class Error extends InternalServerError
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user