mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-09 13:47:02 +00:00
Compare commits
764 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34b06b83aa | ||
|
|
da14681077 | ||
|
|
53e91ad683 | ||
|
|
06434bef99 | ||
|
|
16fab0ced0 | ||
|
|
bc3e531447 | ||
|
|
af038e3306 | ||
|
|
1a06b83d9d | ||
|
|
bcc3cfd143 | ||
|
|
b73123c137 | ||
|
|
8c47f94172 | ||
|
|
b03e17ce22 | ||
|
|
c0ed352293 | ||
|
|
e4eb8794ff | ||
|
|
830ba03448 | ||
|
|
45b2f267de | ||
|
|
891c0d6657 | ||
|
|
8583352033 | ||
|
|
76ea81465e | ||
|
|
9f4b558936 | ||
|
|
773d69c569 | ||
|
|
f03997c927 | ||
|
|
2fc9d405f8 | ||
|
|
4278895995 | ||
|
|
af41c263ee | ||
|
|
0466d6ce83 | ||
|
|
3a4e1d6b11 | ||
|
|
818f697b6b | ||
|
|
83e0d926ac | ||
|
|
782f22325a | ||
|
|
e896a7c960 | ||
|
|
1bb0035b34 | ||
|
|
5cdae539a6 | ||
|
|
bf131b7a0e | ||
|
|
cb08de46b0 | ||
|
|
81f1c3d6b2 | ||
|
|
6b7da3b649 | ||
|
|
05888ae2c3 | ||
|
|
bc97156569 | ||
|
|
e9103eb796 | ||
|
|
62b8b30e3a | ||
|
|
81897253c5 | ||
|
|
a242c9fd12 | ||
|
|
b299220dd0 | ||
|
|
3883881afc | ||
|
|
9061853666 | ||
|
|
20c8da511f | ||
|
|
d7f46e039e | ||
|
|
0532524a50 | ||
|
|
0f0bbff14c | ||
|
|
ce7fbe1471 | ||
|
|
b53d96b9df | ||
|
|
a184f63c00 | ||
|
|
75fb028f1a | ||
|
|
190c0d500a | ||
|
|
663fc784c1 | ||
|
|
38b985defc | ||
|
|
9d5cdea95c | ||
|
|
004c2a4646 | ||
|
|
05d88731e7 | ||
|
|
5b0d244c8a | ||
|
|
60cf844f63 | ||
|
|
02eba06a6d | ||
|
|
c9e148f4d0 | ||
|
|
d7f3e79ce8 | ||
|
|
5549a80e69 | ||
|
|
82f7202ec3 | ||
|
|
77c1db6b25 | ||
|
|
adb7165807 | ||
|
|
d1cfa84f06 | ||
|
|
f9aa080fc8 | ||
|
|
6d47e327cb | ||
|
|
a2f0d32c5f | ||
|
|
4e019a7e84 | ||
|
|
d3c7c6bfe4 | ||
|
|
ddc4cfb197 | ||
|
|
43696d91fc | ||
|
|
69ec7ea23b | ||
|
|
5b0a58372b | ||
|
|
38e2650cde | ||
|
|
307ba20f0a | ||
|
|
1659a731ad | ||
|
|
f28fcde90c | ||
|
|
21cda21b2e | ||
|
|
576d34e9bb | ||
|
|
d6b992ef50 | ||
|
|
f4c8931d7c | ||
|
|
8a17ff2ca3 | ||
|
|
a5681a75bb | ||
|
|
e6b1299293 | ||
|
|
01de38ce97 | ||
|
|
35940f28d2 | ||
|
|
1c1b40ff24 | ||
|
|
31cc9849e4 | ||
|
|
61fb2a0bbe | ||
|
|
0c5af4c6f0 | ||
|
|
bde04d8a4a | ||
|
|
9bbe2ba80d | ||
|
|
1a5e9d287d | ||
|
|
116f04d42a | ||
|
|
92e15f4252 | ||
|
|
192410420f | ||
|
|
5f9db6489a | ||
|
|
dcc97f4f26 | ||
|
|
513398c984 | ||
|
|
10955e3f56 | ||
|
|
261f6daf69 | ||
|
|
b352a194ea | ||
|
|
1c9095a9f4 | ||
|
|
3b69b83b3d | ||
|
|
882e92bbcf | ||
|
|
a5cfaabd13 | ||
|
|
8323d867fb | ||
|
|
d88b99a7f8 | ||
|
|
9bea92f35e | ||
|
|
1fe3aad25f | ||
|
|
10063eaaeb | ||
|
|
7b7c76c8d1 | ||
|
|
ebe0e1ade7 | ||
|
|
b1ac2ebb49 | ||
|
|
348e72ac37 | ||
|
|
fb9df5ff0e | ||
|
|
ad9f31c499 | ||
|
|
4ba0f902ce | ||
|
|
6606a7aef1 | ||
|
|
9b878148cf | ||
|
|
a1de3a1536 | ||
|
|
187e007653 | ||
|
|
6fb4f79f80 | ||
|
|
785eb8ab39 | ||
|
|
f096bf1949 | ||
|
|
a406bfe19f | ||
|
|
664610f283 | ||
|
|
cdc204710f | ||
|
|
b762aafdb2 | ||
|
|
4e1b6a00b0 | ||
|
|
1a7a7dd335 | ||
|
|
d16b967b7b | ||
|
|
9ec45a1730 | ||
|
|
41448ef7eb | ||
|
|
ebbf785701 | ||
|
|
82f9351414 | ||
|
|
b19f05af19 | ||
|
|
8336fe3f66 | ||
|
|
af1fc53e10 | ||
|
|
8607c95c6e | ||
|
|
3e76a51c4b | ||
|
|
8aabf3eb6b | ||
|
|
5c339648ba | ||
|
|
cd453664eb | ||
|
|
a7cb7125b2 | ||
|
|
e8366602f3 | ||
|
|
c25a23ae78 | ||
|
|
6fbafcfc36 | ||
|
|
05940b916f | ||
|
|
dbfcf35084 | ||
|
|
2dfe48d4b2 | ||
|
|
90c2e21788 | ||
|
|
9eb5cd69c5 | ||
|
|
72fee60900 | ||
|
|
d4fb9fc79a | ||
|
|
a4b3be8323 | ||
|
|
30a39f57ed | ||
|
|
3660aa3fc8 | ||
|
|
f970ac02f2 | ||
|
|
4d114bc2e8 | ||
|
|
ea0d53d0e6 | ||
|
|
8a2c0853c2 | ||
|
|
28c77b2890 | ||
|
|
4c3b4017eb | ||
|
|
a4240a7d89 | ||
|
|
c3e4f343a4 | ||
|
|
168077ad1b | ||
|
|
7679f019f9 | ||
|
|
f80ed523bb | ||
|
|
e58132b6b3 | ||
|
|
f98810d87f | ||
|
|
e3e5bf1651 | ||
|
|
99af4a6dc7 | ||
|
|
14510f9130 | ||
|
|
f9ae0d266e | ||
|
|
2ecc9ac10f | ||
|
|
2a0b8957fc | ||
|
|
4dc289f2bc | ||
|
|
107856f57d | ||
|
|
5eb4d27a83 | ||
|
|
8a4302a8d9 | ||
|
|
db5b37b221 | ||
|
|
34a191446f | ||
|
|
2a3e9c143f | ||
|
|
85b38f8119 | ||
|
|
9f70e7dce2 | ||
|
|
d73222875a | ||
|
|
a90098666d | ||
|
|
6f06c75fdd | ||
|
|
6977f1adaa | ||
|
|
67beeca698 | ||
|
|
acc6684e2d | ||
|
|
7eb4818739 | ||
|
|
a1caf22474 | ||
|
|
588887b9d8 | ||
|
|
2c480cc45b | ||
|
|
068eff9c94 | ||
|
|
ff627dd7dc | ||
|
|
bcf6a24b9f | ||
|
|
714907d498 | ||
|
|
14660ed0ae | ||
|
|
3632e53f12 | ||
|
|
f0f6455969 | ||
|
|
24546658b8 | ||
|
|
2fc728cce9 | ||
|
|
0ec1de2e8e | ||
|
|
8ec6a350fd | ||
|
|
2b824537eb | ||
|
|
c9caebca28 | ||
|
|
5fdae984db | ||
|
|
f6500d6c08 | ||
|
|
b3b04a5346 | ||
|
|
7aee43c2ff | ||
|
|
376ddbb5ff | ||
|
|
dc00c53731 | ||
|
|
eadfa783f7 | ||
|
|
5e0e644b5e | ||
|
|
e4a75a75d2 | ||
|
|
1d16a3cbfd | ||
|
|
8b27bb6fb4 | ||
|
|
3cf1db1e6f | ||
|
|
c2d0b2fb86 | ||
|
|
99dde4d4e1 | ||
|
|
0845baa72e | ||
|
|
1567fd4feb | ||
|
|
edf1bac058 | ||
|
|
f02a193bda | ||
|
|
a9dff223ed | ||
|
|
2bfb414495 | ||
|
|
d55b82a6ea | ||
|
|
c58ffc6cac | ||
|
|
6dfd2d49bb | ||
|
|
dc0a866277 | ||
|
|
32f07d81d4 | ||
|
|
44460362c5 | ||
|
|
1c5537bb55 | ||
|
|
2636ac0b31 | ||
|
|
e5cfe759b1 | ||
|
|
a6f7df72b5 | ||
|
|
5b4788825d | ||
|
|
c0355cb2b2 | ||
|
|
2eac1b3721 | ||
|
|
78aa4ce6c5 | ||
|
|
dd7bd118af | ||
|
|
225c6efe3e | ||
|
|
fa3a2b729b | ||
|
|
2a3e3dde0a | ||
|
|
878ce83448 | ||
|
|
db5d1850a9 | ||
|
|
9b6b4e4199 | ||
|
|
1b7a06b909 | ||
|
|
0925c6706e | ||
|
|
f5829310b6 | ||
|
|
43ab056313 | ||
|
|
57ef6f1b7e | ||
|
|
0525a0b3cd | ||
|
|
7a4cbec022 | ||
|
|
705f791e12 | ||
|
|
69f836575c | ||
|
|
f82b8ad49f | ||
|
|
2e388b32f3 | ||
|
|
de1e4abf0f | ||
|
|
c37c3d32aa | ||
|
|
01e252085c | ||
|
|
45b8764670 | ||
|
|
a21c6dda36 | ||
|
|
82be8d7fbd | ||
|
|
97ae13a27f | ||
|
|
edd2d6a630 | ||
|
|
8475e0a99c | ||
|
|
02e3d1823f | ||
|
|
6b6f522f1c | ||
|
|
80d695239c | ||
|
|
d3684df6e3 | ||
|
|
d2bf82d232 | ||
|
|
e6f4b337ce | ||
|
|
f4e58d9bee | ||
|
|
af9e77a5bb | ||
|
|
1d9af232b9 | ||
|
|
60b6c85864 | ||
|
|
709c301dda | ||
|
|
37dc6a1217 | ||
|
|
ba82989e97 | ||
|
|
731273c296 | ||
|
|
2a11d9e7ed | ||
|
|
67dea8fd5e | ||
|
|
8aff7316e5 | ||
|
|
6331300806 | ||
|
|
64d04e1d78 | ||
|
|
6258893aa8 | ||
|
|
3e27868760 | ||
|
|
cbf8301a89 | ||
|
|
1601a12e20 | ||
|
|
4420511e02 | ||
|
|
bbfe3c7366 | ||
|
|
64d31c8324 | ||
|
|
e93860101c | ||
|
|
04444aa03a | ||
|
|
6eba798cd8 | ||
|
|
c5555c2909 | ||
|
|
56164b9446 | ||
|
|
9f40bb4b1e | ||
|
|
d67323d35f | ||
|
|
3f26095281 | ||
|
|
d63871957d | ||
|
|
553c692b9a | ||
|
|
4a71ab5f5d | ||
|
|
3fbdff674e | ||
|
|
e6aad6eabc | ||
|
|
3b1d307fad | ||
|
|
66fc4c2294 | ||
|
|
a21e4b836d | ||
|
|
3159181c5c | ||
|
|
770cac9b87 | ||
|
|
ec4afe0e11 | ||
|
|
163d51770d | ||
|
|
364a5c50f0 | ||
|
|
581f09eb9b | ||
|
|
d75bc354cf | ||
|
|
5e3f00f11d | ||
|
|
ffe83d24ce | ||
|
|
ae874c44f5 | ||
|
|
e80269b61c | ||
|
|
2c4d5fb0f8 | ||
|
|
1fe222852a | ||
|
|
60ae87a3cb | ||
|
|
7f092ad31d | ||
|
|
fd8090e13d | ||
|
|
4aba2aab4c | ||
|
|
8c03b0a6cd | ||
|
|
e87fda3f3a | ||
|
|
4cabd6c2f1 | ||
|
|
f38361c7c7 | ||
|
|
ca3d10e7a2 | ||
|
|
e4cb9071d0 | ||
|
|
2b2777b3da | ||
|
|
83fd96a876 | ||
|
|
c1b1eaf847 | ||
|
|
f63cc22f44 | ||
|
|
3da1632e4b | ||
|
|
0bf4624839 | ||
|
|
0d38dfb385 | ||
|
|
70fff1167b | ||
|
|
196c300be5 | ||
|
|
a894f9a70b | ||
|
|
9e3c258c90 | ||
|
|
0893082326 | ||
|
|
18d12c1faf | ||
|
|
46d9dd7bea | ||
|
|
4fa562a283 | ||
|
|
1f02c8320b | ||
|
|
774aff1d17 | ||
|
|
74c142a1ac | ||
|
|
06d604796f | ||
|
|
f1db095fdc | ||
|
|
bac5bf46b5 | ||
|
|
a0f085e415 | ||
|
|
c69f13dda6 | ||
|
|
f6362b3aa5 | ||
|
|
4433325abb | ||
|
|
f2e5197568 | ||
|
|
bffcd3adb7 | ||
|
|
20e22c43f0 | ||
|
|
99f0194b80 | ||
|
|
a5422fd789 | ||
|
|
fc5203c3ba | ||
|
|
5deefc5f35 | ||
|
|
40531f4d4e | ||
|
|
78358057e6 | ||
|
|
a6b7b5ca61 | ||
|
|
0b71b4fc7d | ||
|
|
4b6c177af6 | ||
|
|
48c665b641 | ||
|
|
506f7cf410 | ||
|
|
a5cec0370e | ||
|
|
2e92adff81 | ||
|
|
1e3a3b909b | ||
|
|
1dbc41619f | ||
|
|
e4237abdbf | ||
|
|
b2e1ff0d5a | ||
|
|
790c34cd8a | ||
|
|
1e175429c8 | ||
|
|
575cdf8f5b | ||
|
|
02948e09c5 | ||
|
|
20b6dbe5ac | ||
|
|
328b6fcaa0 | ||
|
|
42355f3bec | ||
|
|
37a84f8cea | ||
|
|
f1ad8a734a | ||
|
|
870cdb19e3 | ||
|
|
56e5ce0bba | ||
|
|
576015fffe | ||
|
|
5f3d34b027 | ||
|
|
01bb105808 | ||
|
|
d9125a5204 | ||
|
|
93a26dca36 | ||
|
|
5c539b99d8 | ||
|
|
9e622bbfbd | ||
|
|
283a25162e | ||
|
|
0c44eec377 | ||
|
|
0cbdf88b21 | ||
|
|
2f06f0b7d2 | ||
|
|
cee9d21b7c | ||
|
|
c03afcce33 | ||
|
|
5e9ee92011 | ||
|
|
ad212d694f | ||
|
|
9530b2802b | ||
|
|
b4e79d57ea | ||
|
|
7efd36ebe8 | ||
|
|
9f90802fb2 | ||
|
|
18f4cd4587 | ||
|
|
fc01905134 | ||
|
|
91523553fb | ||
|
|
ca449b9952 | ||
|
|
3e0eade2f3 | ||
|
|
68cca25635 | ||
|
|
050fb4330e | ||
|
|
14d43bda1c | ||
|
|
34a8158284 | ||
|
|
8871842863 | ||
|
|
9392a26f81 | ||
|
|
8eac39bd50 | ||
|
|
2c8407581c | ||
|
|
b89349d0ee | ||
|
|
f554a6f649 | ||
|
|
e4a8383758 | ||
|
|
db94026d52 | ||
|
|
18e4aeb05d | ||
|
|
835ca877c7 | ||
|
|
89c1cf1f25 | ||
|
|
7cf512f75b | ||
|
|
d625647b29 | ||
|
|
21fbef7fb4 | ||
|
|
d18cc91341 | ||
|
|
76154ab765 | ||
|
|
11af93fcef | ||
|
|
23bccba214 | ||
|
|
f47ed9f249 | ||
|
|
816db335c3 | ||
|
|
9ec359df3d | ||
|
|
33a19fa6dd | ||
|
|
12d6831505 | ||
|
|
3f18484910 | ||
|
|
834fc25a62 | ||
|
|
ade06f0f7a | ||
|
|
d9f4a1c2e1 | ||
|
|
789e01c58d | ||
|
|
75514fc96d | ||
|
|
4250514792 | ||
|
|
53f0932ecf | ||
|
|
6d1cc60947 | ||
|
|
632fb63102 | ||
|
|
ac1c46303d | ||
|
|
8cb7689a61 | ||
|
|
b264dfbead | ||
|
|
aa2b89530a | ||
|
|
372fbc7771 | ||
|
|
7051d2c072 | ||
|
|
f489400947 | ||
|
|
1b61bdac91 | ||
|
|
05c74fa848 | ||
|
|
311f167814 | ||
|
|
9060d299da | ||
|
|
b274823087 | ||
|
|
42797edfb8 | ||
|
|
39ef9ebd3b | ||
|
|
5c4128e5ee | ||
|
|
f1fdeb38a0 | ||
|
|
8fa65bc965 | ||
|
|
db334baa2e | ||
|
|
af77ee2222 | ||
|
|
080f31fd8f | ||
|
|
52b7350278 | ||
|
|
6699e66c29 | ||
|
|
f3596df5f0 | ||
|
|
db134c7912 | ||
|
|
97dfe2e8d7 | ||
|
|
4b895ac442 | ||
|
|
9d832484dc | ||
|
|
38dfa91058 | ||
|
|
c404d47473 | ||
|
|
d5106a6f79 | ||
|
|
6f9259b750 | ||
|
|
db04a0550b | ||
|
|
30afaa56ab | ||
|
|
e05261bd17 | ||
|
|
79e2086e0c | ||
|
|
c36788ba26 | ||
|
|
548c76b93d | ||
|
|
bb2383076a | ||
|
|
a2e48e6252 | ||
|
|
89d2d01414 | ||
|
|
1f617e2103 | ||
|
|
ff4e696d74 | ||
|
|
3689ac0253 | ||
|
|
ee97d82ed5 | ||
|
|
02ab368256 | ||
|
|
8e5b05ff75 | ||
|
|
9c4345ec9e | ||
|
|
cd6ada92fd | ||
|
|
fc73ffb89a | ||
|
|
f1696df4f9 | ||
|
|
14deff7e0e | ||
|
|
7980887e50 | ||
|
|
fec23a0e93 | ||
|
|
f7e7bc43e3 | ||
|
|
a62e48f0bd | ||
|
|
07a84bac4f | ||
|
|
99b03e40ac | ||
|
|
1e31b26815 | ||
|
|
a999ed8177 | ||
|
|
735a7e6085 | ||
|
|
6eab2fb177 | ||
|
|
7bfd2f32de | ||
|
|
3d3cb031c1 | ||
|
|
f898beb199 | ||
|
|
c43578984b | ||
|
|
dfb8c22a14 | ||
|
|
6f9e6eecbf | ||
|
|
c8204dcd58 | ||
|
|
c62a5cf360 | ||
|
|
8ea8c54c9a | ||
|
|
143a2a8af2 | ||
|
|
b82aa1b305 | ||
|
|
338f03ca79 | ||
|
|
73183e8cf9 | ||
|
|
03ce2d1a04 | ||
|
|
b7c3f2b13e | ||
|
|
b6ee6f98f2 | ||
|
|
dd76e873fe | ||
|
|
3f772f6882 | ||
|
|
f032b24eee | ||
|
|
4ea6dc7c46 | ||
|
|
d9f3b83a41 | ||
|
|
96b2f9e1a6 | ||
|
|
1a3797cf59 | ||
|
|
500e8ca89b | ||
|
|
f7fb3f50c3 | ||
|
|
4763cc80c3 | ||
|
|
0d744c5e7f | ||
|
|
f132e06f67 | ||
|
|
2615cffd82 | ||
|
|
d2f87537c9 | ||
|
|
629f410204 | ||
|
|
3f40c6b18f | ||
|
|
34b3f52276 | ||
|
|
4b508e3295 | ||
|
|
dfdde2ef83 | ||
|
|
7dc5f4a557 | ||
|
|
ec4e86c332 | ||
|
|
e8978c654b | ||
|
|
cb29ee3304 | ||
|
|
88cac5c6c0 | ||
|
|
a968726810 | ||
|
|
9508903cf5 | ||
|
|
113649ba3d | ||
|
|
0fb9fe5e4c | ||
|
|
5e877dd374 | ||
|
|
bcf54d9fb0 | ||
|
|
5c42133e7b | ||
|
|
93c9afe338 | ||
|
|
5dc3492f34 | ||
|
|
9b12c5c9c1 | ||
|
|
3d96381b3f | ||
|
|
1bd4468f57 | ||
|
|
e183bb4fa6 | ||
|
|
a79ece4a3d | ||
|
|
93bfa83b46 | ||
|
|
97fa72042e | ||
|
|
d5069487ae | ||
|
|
0a5f852d04 | ||
|
|
dcc2fd0382 | ||
|
|
bf7f0d5cbc | ||
|
|
a337aef8a7 | ||
|
|
30dec3be52 | ||
|
|
604aca50c8 | ||
|
|
949dc96e7b | ||
|
|
fd4998b365 | ||
|
|
fc28bee3d4 | ||
|
|
d126cb5a25 | ||
|
|
d8bc83ae22 | ||
|
|
b1a1ea068a | ||
|
|
e4c2d4eae1 | ||
|
|
66bdb7b547 | ||
|
|
9fccc3c1f3 | ||
|
|
4e2bc0658d | ||
|
|
0effcab5c2 | ||
|
|
1f5ab5f45c | ||
|
|
4789fc15a5 | ||
|
|
6f2270eea7 | ||
|
|
a0f43c8f8f | ||
|
|
b36b5857c1 | ||
|
|
c6de42fd80 | ||
|
|
18f9026acf | ||
|
|
5e7f61b46d | ||
|
|
c5e41faa0f | ||
|
|
465377c67b | ||
|
|
f41cc85cba | ||
|
|
fdf08624cb | ||
|
|
5c89f4f389 | ||
|
|
acce8f1b1f | ||
|
|
f1382e802e | ||
|
|
f64e59b0de | ||
|
|
5b41abe76f | ||
|
|
f286d2277e | ||
|
|
b38c983e73 | ||
|
|
18ddd05631 | ||
|
|
be8cfcf47a | ||
|
|
a70d133471 | ||
|
|
bc3d488bfe | ||
|
|
e9578d8d44 | ||
|
|
4c38d96730 | ||
|
|
b962d1572a | ||
|
|
9f21a722ec | ||
|
|
4deb9d6d77 | ||
|
|
472073ee5a | ||
|
|
3f1f686bd1 | ||
|
|
dc962d868f | ||
|
|
9e32211168 | ||
|
|
0f9281812d | ||
|
|
56b099983f | ||
|
|
dbef224120 | ||
|
|
388e0f3478 | ||
|
|
280d7f328e | ||
|
|
6ec6ffc470 | ||
|
|
611bbb8fb2 | ||
|
|
7dc5d5583f | ||
|
|
cab31c7dc6 | ||
|
|
43d7b702f1 | ||
|
|
c8dbce18f7 | ||
|
|
b89b39cd44 | ||
|
|
24084d4c30 | ||
|
|
9a6e2d6578 | ||
|
|
3968caf2bc | ||
|
|
192faa9ce9 | ||
|
|
beedfa700d | ||
|
|
9f63c00f5c | ||
|
|
a851d71c1c | ||
|
|
f11b9c0bbc | ||
|
|
6ea109f712 | ||
|
|
275b3b879e | ||
|
|
70e2e49d88 | ||
|
|
fe36d049af | ||
|
|
f029ea2c81 | ||
|
|
1c3dc61264 | ||
|
|
c415ce677d | ||
|
|
927a580dce | ||
|
|
fa35516c94 | ||
|
|
e05eafb9a9 | ||
|
|
7c3f7dd494 | ||
|
|
b41ec363c5 | ||
|
|
bebbeecac3 | ||
|
|
424a365d5d | ||
|
|
3e63d03ced | ||
|
|
83bd4458a2 | ||
|
|
eac8ce736c | ||
|
|
0a096ce926 | ||
|
|
8e3b44c2e1 | ||
|
|
7a580599cf | ||
|
|
4048b7207b | ||
|
|
c82da61193 | ||
|
|
a87231552b | ||
|
|
0ec73779bf | ||
|
|
2a705fcc84 | ||
|
|
6eff3b3eae | ||
|
|
a260e15ba7 | ||
|
|
2a7d8cbc2e | ||
|
|
84f1d8f625 | ||
|
|
1b852fbd04 | ||
|
|
d770dd26e0 | ||
|
|
b79bd72c8a | ||
|
|
a234f503a1 | ||
|
|
55be5b12b2 | ||
|
|
1f400649f5 | ||
|
|
e6f65440f2 | ||
|
|
def8455d78 | ||
|
|
1ad2144432 | ||
|
|
c2828e3273 | ||
|
|
725e428626 | ||
|
|
b1f272215a | ||
|
|
032199d9c7 | ||
|
|
cce78ac258 | ||
|
|
ea41d2c40c | ||
|
|
befb2327a3 | ||
|
|
eae677f846 | ||
|
|
26f65def3e | ||
|
|
69b275deb1 | ||
|
|
95ccc38759 | ||
|
|
31099827d4 | ||
|
|
91944c617c | ||
|
|
67074f2b0a | ||
|
|
4f2f7c05ca | ||
|
|
c4bfa05e2f | ||
|
|
a8e86433ce | ||
|
|
3b1950bc6e | ||
|
|
8e666da93a | ||
|
|
7031afe9df | ||
|
|
b1da843702 | ||
|
|
ea3189ebc3 | ||
|
|
83e7e0b517 | ||
|
|
2c1fed8adf | ||
|
|
45e6f3bb34 | ||
|
|
f53708c38e | ||
|
|
d1aa3f721d | ||
|
|
0afe715d9a | ||
|
|
9cbe31300a | ||
|
|
dde139f0a1 | ||
|
|
5fb8b2c71c | ||
|
|
63c07a1f17 | ||
|
|
a338bbca59 | ||
|
|
157bf87d40 | ||
|
|
911a9f80de | ||
|
|
c9bbbeb2c4 | ||
|
|
109847f604 | ||
|
|
ff033e88d5 | ||
|
|
57803c0828 | ||
|
|
3d8be61fbf | ||
|
|
690e87a3fb | ||
|
|
72569af873 | ||
|
|
cd45f07e54 | ||
|
|
a35f9625af | ||
|
|
f5245ef3eb | ||
|
|
49e8fdff95 | ||
|
|
e9d35dd26d | ||
|
|
4ad9ef770b | ||
|
|
acbc74d858 | ||
|
|
8da3350523 | ||
|
|
496879dd79 | ||
|
|
84cda80fd8 | ||
|
|
50a81b1247 | ||
|
|
f0f225f349 | ||
|
|
d49fff1289 | ||
|
|
abaa1b302b | ||
|
|
0eaa7825ea | ||
|
|
1028b7c5b3 | ||
|
|
f319e5219d | ||
|
|
0daae5ced5 | ||
|
|
abee63d269 | ||
|
|
be33d90986 | ||
|
|
3a7cac824d | ||
|
|
7d616b075f | ||
|
|
b718765138 | ||
|
|
3104be7c99 | ||
|
|
a8d182b4cd | ||
|
|
3bfc99c88b | ||
|
|
ac3300a5cf | ||
|
|
636587a22c | ||
|
|
4ed2c71dfd | ||
|
|
723229d8e6 | ||
|
|
080ab488fa | ||
|
|
fd32696c5a | ||
|
|
9a56858f12 | ||
|
|
5923757810 | ||
|
|
62948a7740 | ||
|
|
821d57ce00 | ||
|
|
efd0505ead | ||
|
|
91c55965a7 | ||
|
|
974305e152 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
/data/preferences/*
|
||||
/data/.backup/*
|
||||
/data/config.php
|
||||
/data/tmp/*
|
||||
/build
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
@@ -13,6 +14,7 @@ npm-debug.log
|
||||
/tests/unit/testData/cache/*
|
||||
!/tests/unit/testData/cache/.data
|
||||
/tests/integration/config.php
|
||||
.phpunit.result.cache
|
||||
composer.phar
|
||||
vendor/
|
||||
/custom/Espo/Custom/*
|
||||
|
||||
@@ -20,5 +20,5 @@ DirectoryIndex index.php index.html
|
||||
|
||||
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
|
||||
|
||||
RewriteRule reset/?$ reset.html [QSA,L]
|
||||
RewriteRule /?web\.config - [F]
|
||||
</IfModule>
|
||||
@@ -4,6 +4,12 @@ Before we can merge your pull request you need to accept our CLA [here](https://
|
||||
|
||||
[Code Style Guidelines](https://github.com/espocrm/espocrm/wiki/Code-Style-Guidelines).
|
||||
|
||||
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.
|
||||
|
||||
## Issues
|
||||
|
||||
We don't provide developer help or any kind of support on github. Please use our [forum](https://forum.espocrm.com) for this.
|
||||
|
||||
160
Gruntfile.js
160
Gruntfile.js
@@ -2,7 +2,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -18,6 +18,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* * `grunt` - full build
|
||||
* * `grunt dev` - build only items needed for development (takes less time)
|
||||
* * `grunt offline` - build but skip *composer install*
|
||||
* * `grant release` - full build plus upgrade packages`
|
||||
* * `grant test` - build for test running
|
||||
* * `grant run-tests` - build and run unit and integratino tests
|
||||
*/
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
||||
var jsFilesToMinify = [
|
||||
@@ -71,6 +81,7 @@ module.exports = function (grunt) {
|
||||
'client/src/theme-manager.js',
|
||||
'client/src/session-storage.js',
|
||||
'client/src/view-helper.js',
|
||||
'client/src/page-title.js',
|
||||
|
||||
'client/src/app.js'
|
||||
];
|
||||
@@ -83,6 +94,10 @@ module.exports = function (grunt) {
|
||||
}
|
||||
|
||||
var fs = require('fs');
|
||||
var cp = require('child_process');
|
||||
var path = require('path');
|
||||
|
||||
var currentPath = path.dirname(fs.realpathSync(__filename));
|
||||
|
||||
var themeList = [];
|
||||
fs.readdirSync('application/Espo/Resources/metadata/themes').forEach(function (file) {
|
||||
@@ -108,8 +123,10 @@ module.exports = function (grunt) {
|
||||
lessData[theme] = o;
|
||||
});
|
||||
|
||||
var pkg = grunt.file.readJSON('package.json');
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
pkg: pkg,
|
||||
|
||||
mkdir: {
|
||||
tmp: {
|
||||
@@ -125,8 +142,13 @@ module.exports = function (grunt) {
|
||||
clean: {
|
||||
start: ['build/EspoCRM-*'],
|
||||
final: ['build/tmp'],
|
||||
release: ['build/EspoCRM-' + pkg.version],
|
||||
beforeFinal: {
|
||||
src: ['build/tmp/custom/Espo/Custom/*', '!build/tmp/custom/Espo/Custom/.htaccess', 'build/tmp/install/config.php']
|
||||
src: [
|
||||
'build/tmp/custom/Espo/Custom/*',
|
||||
'!build/tmp/custom/Espo/Custom/.htaccess',
|
||||
'build/tmp/install/config.php',
|
||||
]
|
||||
}
|
||||
},
|
||||
less: lessData,
|
||||
@@ -146,6 +168,9 @@ module.exports = function (grunt) {
|
||||
})
|
||||
},
|
||||
copy: {
|
||||
options: {
|
||||
mode: true,
|
||||
},
|
||||
frontendFolders: {
|
||||
expand: true,
|
||||
cwd: 'client',
|
||||
@@ -207,9 +232,6 @@ module.exports = function (grunt) {
|
||||
},
|
||||
},
|
||||
chmod: {
|
||||
options: {
|
||||
mode: '755'
|
||||
},
|
||||
php: {
|
||||
options: {
|
||||
mode: '644'
|
||||
@@ -238,7 +260,21 @@ module.exports = function (grunt) {
|
||||
'build/EspoCRM-<%= pkg.version %>/api/v1/portal-access',
|
||||
'build/EspoCRM-<%= pkg.version %>',
|
||||
]
|
||||
}
|
||||
},
|
||||
foldersWritable: {
|
||||
options: {
|
||||
mode: '775'
|
||||
},
|
||||
src: [
|
||||
'build/EspoCRM-<%= pkg.version %>/data',
|
||||
'build/EspoCRM-<%= pkg.version %>/custom',
|
||||
'build/EspoCRM-<%= pkg.version %>/custom/Espo',
|
||||
'build/EspoCRM-<%= pkg.version %>/custom/Espo/Custom',
|
||||
'build/EspoCRM-<%= pkg.version %>/client/custom',
|
||||
'build/EspoCRM-<%= pkg.version %>/client/modules',
|
||||
'build/EspoCRM-<%= pkg.version %>/application/Espo/Modules',
|
||||
]
|
||||
},
|
||||
},
|
||||
replace: {
|
||||
version: {
|
||||
@@ -258,17 +294,57 @@ module.exports = function (grunt) {
|
||||
]
|
||||
}
|
||||
},
|
||||
compress: {
|
||||
final: {
|
||||
options: {
|
||||
archive: 'build/EspoCRM-<%= pkg.version %>.zip',
|
||||
mode: 'zip'
|
||||
},
|
||||
src: ['**'],
|
||||
cwd: 'build/EspoCRM-<%= pkg.version %>',
|
||||
dest: 'EspoCRM-<%= pkg.version %>'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask("chmod-folders", function() {
|
||||
cp.execSync("find . -type d -exec chmod 755 {} + ", {stdio: 'ignore', cwd: 'build/EspoCRM-' + pkg.version});
|
||||
});
|
||||
|
||||
grunt.registerTask("composer", function() {
|
||||
cp.execSync("composer install --ignore-platform-reqs --no-dev", {stdio: 'ignore'});
|
||||
});
|
||||
|
||||
grunt.registerTask("composer-dev", function() {
|
||||
cp.execSync("composer install --ignore-platform-reqs", {stdio: 'ignore'});
|
||||
});
|
||||
|
||||
grunt.registerTask("upgrade", function() {
|
||||
cp.execSync("node diff --all --vendor", {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
grunt.registerTask("unit-tests-run", function() {
|
||||
cp.execSync("vendor/bin/phpunit --bootstrap=vendor/autoload.php tests/unit", {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
grunt.registerTask("integration-tests-run", function() {
|
||||
cp.execSync("vendor/bin/phpunit --bootstrap=vendor/autoload.php tests/integration", {stdio: 'inherit'});
|
||||
});
|
||||
|
||||
grunt.registerTask("zip", function() {
|
||||
var fs = require('fs');
|
||||
|
||||
var resolve = this.async();
|
||||
|
||||
var folder = 'EspoCRM-' + pkg.version;
|
||||
|
||||
var zipPath = 'build/' + folder +'.zip';
|
||||
if (fs.existsSync(zipPath)) fs.unlinkSync(zipPath);
|
||||
|
||||
var archiver = require('archiver');
|
||||
var archive = archiver('zip');
|
||||
|
||||
archive.on('error', function (err) {
|
||||
grunt.fail.warn(err);
|
||||
});
|
||||
var zipOutput = fs.createWriteStream(zipPath);
|
||||
zipOutput.on('close', function () {
|
||||
console.log("EspoCRM package has been built.");
|
||||
resolve();
|
||||
});
|
||||
|
||||
archive.directory(currentPath + '/build/' + folder, folder).pipe(zipOutput);
|
||||
|
||||
archive.finalize();
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
@@ -278,10 +354,9 @@ module.exports = function (grunt) {
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-replace');
|
||||
grunt.loadNpmTasks('grunt-contrib-compress');
|
||||
grunt.loadNpmTasks('grunt-chmod');
|
||||
|
||||
grunt.registerTask('default', [
|
||||
grunt.registerTask('offline', [
|
||||
'clean:start',
|
||||
'mkdir:tmp',
|
||||
'less',
|
||||
@@ -293,7 +368,48 @@ module.exports = function (grunt) {
|
||||
'replace',
|
||||
'clean:beforeFinal',
|
||||
'copy:final',
|
||||
'chmod',
|
||||
'clean:final'
|
||||
'chmod-folders',
|
||||
'chmod:php',
|
||||
'chmod:folders',
|
||||
'chmod:foldersWritable',
|
||||
'clean:final',
|
||||
]);
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'composer',
|
||||
'offline',
|
||||
]);
|
||||
|
||||
grunt.registerTask('release', [
|
||||
'default',
|
||||
'upgrade',
|
||||
'zip',
|
||||
'clean:release',
|
||||
]);
|
||||
|
||||
grunt.registerTask('run-tests', [
|
||||
'test',
|
||||
'unit-tests-run',
|
||||
'integration-tests-run',
|
||||
]);
|
||||
|
||||
grunt.registerTask('run-unit-tests', [
|
||||
'composer-dev',
|
||||
'unit-tests-run',
|
||||
]);
|
||||
|
||||
grunt.registerTask('run-integration-tests', [
|
||||
'test',
|
||||
'integration-tests-run',
|
||||
]);
|
||||
|
||||
grunt.registerTask('dev', [
|
||||
'composer-dev',
|
||||
'less',
|
||||
]);
|
||||
|
||||
grunt.registerTask('test', [
|
||||
'composer-dev',
|
||||
'offline',
|
||||
]);
|
||||
};
|
||||
|
||||
62
README.md
62
README.md
@@ -1,21 +1,21 @@
|
||||
## EspoCRM
|
||||
|
||||
<a href='http://www.espocrm.com'>EspoCRM is an Open Source CRM</a> (Customer Relationship Management) software that allows you to see, enter and evaluate all your company relationships regardless of the type. People, companies or opportunities - all in an easy and intuitive interface.
|
||||
[EspoCRM is an Open Source CRM](https://www.espocrm.com) (Customer Relationship Management) software that allows you to see, enter and evaluate all your company relationships regardless of the type. People, companies or opportunities - all in an easy and intuitive interface.
|
||||
|
||||
It's a web application with a frontend designed as a single page application based on backbone.js and a REST API backend written in PHP.
|
||||
It's a web application with a frontend designed as a single page application and REST API backend written in PHP.
|
||||
|
||||
Download the latest release from our [website](http://www.espocrm.com).
|
||||
[Download](https://www.espocrm.com/download/) the latest release from our website.
|
||||
|
||||
### Requirements
|
||||
|
||||
* PHP 7.1 or above (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.6.0 or above, or MariaDB.
|
||||
* PHP 7.2 and later (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.7 (and later), or MariaDB 10.1 (and later).
|
||||
|
||||
For more information about server configuration see [this article](https://www.espocrm.com/documentation/administration/server-configuration/).
|
||||
For more information about server configuration see [this article](https://docs.espocrm.com/administration/server-configuration/).
|
||||
|
||||
### Documentation
|
||||
|
||||
Documentation for administrators, users and developers is available [here](https://www.espocrm.com/documentation/).
|
||||
Documentation for administrators, users and developers is available [here](https://docs.espocrm.com).
|
||||
|
||||
### How to report a bug
|
||||
|
||||
@@ -23,30 +23,13 @@ Create an issue [here](https://github.com/espocrm/espocrm/issues) or post on our
|
||||
|
||||
### How to install a stable version
|
||||
|
||||
[Download](https://www.espocrm.com/download/) the latest version. See the [instructions](https://www.espocrm.com/documentation/administration/installation/) about installation.
|
||||
[Download](https://www.espocrm.com/download/) the latest version. See the [instructions](https://docs.espocrm.com/administration/installation/) about installation.
|
||||
|
||||
### How to get started (for developers)
|
||||
### Development
|
||||
|
||||
1. Clone repository to your local computer.
|
||||
2. Change to the project's root directory.
|
||||
3. Install [composer](https://getcomposer.org/doc/00-intro.md).
|
||||
4. Run `composer install` if composer is installed globally or `php composer.phar install` if locally.
|
||||
|
||||
Never update composer dependencies if you are going to contribute code back.
|
||||
|
||||
Now you can build. Build will create compiled css files.
|
||||
|
||||
To compose a proper config.php and populate database you can run install by opening `http(s)://{YOUR_CRM_URL}/install` location in a browser. Then open `data/config.php` file and add `isDeveloperMode => true`.
|
||||
|
||||
### How to build (for developers)
|
||||
|
||||
You need to have nodejs and Grunt CLI installed.
|
||||
|
||||
1. Change to the project's root directory.
|
||||
2. Install project dependencies with `npm install`.
|
||||
3. Run Grunt with `grunt`.
|
||||
|
||||
The build will be created in the `build` directory.
|
||||
* [Getting started](https://docs.espocrm.com/development/how-to-start)
|
||||
* [Running tests](https://docs.espocrm.com/development/tests)
|
||||
* [Making translation](https://docs.espocrm.com/development/translation)
|
||||
|
||||
### How to contribute
|
||||
|
||||
@@ -54,24 +37,9 @@ Before we can merge your pull request you need to accept our CLA [here](https://
|
||||
|
||||
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:
|
||||
`node po.js en_EN`
|
||||
(specify needed language instead of en_EN)
|
||||
|
||||
After that translate the generated po file.
|
||||
|
||||
Build json files from the translated po file:
|
||||
|
||||
1. Put your po file espocrm-en_EN.po into `build` directory
|
||||
2. Run `node lang.js en_EN`
|
||||
|
||||
Json files will be created in build directory grouped by folders.
|
||||
* *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.
|
||||
|
||||
### License
|
||||
|
||||
|
||||
9
SECURITY.md
Normal file
9
SECURITY.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
If you believe you have discovered a vulnerability in EspoCRM please contacts us via [this](https://www.espocrm.com/contacts/) or [this](https://www.espocrm.com/support/) forms.
|
||||
|
||||
## Supported versions
|
||||
|
||||
For severe vulnerabilities we provide fixes for 2 minor versions (the second number in the version string) back from the current stable version. Separate patches or manual fix guidelines will be provided for more old versions.
|
||||
@@ -9,4 +9,6 @@ RewriteEngine On
|
||||
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
|
||||
RewriteRule /?web\.config - [F]
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -9,4 +9,6 @@ RewriteEngine On
|
||||
RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
|
||||
RewriteRule /?web\.config - [F]
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -39,6 +39,16 @@ class User extends \Espo\Core\Acl\Base
|
||||
return $user->id === $entity->id;
|
||||
}
|
||||
|
||||
public function checkEntityRead(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if (!$user->isAdmin() && $entity->isPortal()) {
|
||||
if ($this->getAclManager()->get($user, 'portalPermission') === 'yes') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return $this->checkEntity($user, $entity, $data, 'read');
|
||||
}
|
||||
|
||||
public function checkEntityCreate(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if (!$user->isAdmin()) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -63,11 +63,6 @@ class ActionHistoryRecord extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassDelete()
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function beforeMassConvertCurrency()
|
||||
{
|
||||
throw new Forbidden();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -57,4 +57,21 @@ class Attachment extends \Espo\Core\Controllers\Record
|
||||
|
||||
return $this->getRecordService()->getCopiedAttachment($data)->getValueMap();
|
||||
}
|
||||
|
||||
public function getActionFile($params, $data, $request, $response)
|
||||
{
|
||||
$id = $params['id'] ?? null;
|
||||
|
||||
if (!$id) throw new BadRequest();
|
||||
|
||||
$fileData = $this->getRecordService()->getFileData($id);
|
||||
|
||||
$response->headers->set('Content-Type', $fileData->type);
|
||||
$response->headers->set('Content-Disposition', 'Content-Disposition: attachment; filename="'.$fileData->name.'"');
|
||||
if ($fileData->size) {
|
||||
$response->headers->set('Content-Length', $fileData->size);
|
||||
}
|
||||
|
||||
return $fileData->contents;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
59
application/Espo/Controllers/CurrencyRate.php
Normal file
59
application/Espo/Controllers/CurrencyRate.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class CurrencyRate extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getAcl()->check('Currency')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function getActionIndex()
|
||||
{
|
||||
if ($this->getAcl()->getLevel('Currency', 'read') !== 'yes') throw new Forbidden();
|
||||
|
||||
return $this->getService('CurrencyRate')->get();
|
||||
}
|
||||
|
||||
public function putActionUpdate($params, $data)
|
||||
{
|
||||
if ($this->getAcl()->getLevel('Currency', 'edit') !== 'yes') throw new Forbidden();
|
||||
|
||||
if (empty($data) || !is_object($data)) throw new BadRequest();
|
||||
|
||||
return $this->getService('CurrencyRate')->set($data);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -75,7 +75,7 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
throw new NotFound();
|
||||
}
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
if ($emailAccount->get('assigniedUserId') !== $this->getUser()->id) {
|
||||
if ($emailAccount->get('assignedUserId') !== $this->getUser()->id) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -60,7 +60,7 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
$name = filter_var($name, \FILTER_SANITIZE_STRING);
|
||||
$type = filter_var($type, \FILTER_SANITIZE_STRING);
|
||||
|
||||
$params = array();
|
||||
$params = [];
|
||||
|
||||
if (!empty($data['labelSingular'])) {
|
||||
$params['labelSingular'] = $data['labelSingular'];
|
||||
@@ -187,19 +187,19 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
$paramList = [
|
||||
'entity',
|
||||
'entityForeign',
|
||||
'link',
|
||||
'linkForeign',
|
||||
'label',
|
||||
'labelForeign',
|
||||
'linkType'
|
||||
'linkType',
|
||||
];
|
||||
|
||||
$additionalParamList = [
|
||||
'entityForeign',
|
||||
'relationName',
|
||||
'labelForeign',
|
||||
];
|
||||
|
||||
$params = array();
|
||||
$params = [];
|
||||
|
||||
foreach ($paramList as $item) {
|
||||
if (empty($data[$item])) {
|
||||
@@ -209,9 +209,11 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
|
||||
foreach ($additionalParamList as $item) {
|
||||
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
|
||||
$params[$item] = filter_var($data[$item] ?? null, \FILTER_SANITIZE_STRING);
|
||||
}
|
||||
|
||||
$params['labelForeign'] = $params['labelForeign'] ?? $params['linkForeign'];
|
||||
|
||||
if (array_key_exists('linkMultipleField', $data)) {
|
||||
$params['linkMultipleField'] = $data['linkMultipleField'];
|
||||
}
|
||||
@@ -225,6 +227,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (array_key_exists('auditedForeign', $data)) {
|
||||
$params['auditedForeign'] = $data['auditedForeign'];
|
||||
}
|
||||
if (array_key_exists('parentEntityTypeList', $data)) {
|
||||
$params['parentEntityTypeList'] = $data['parentEntityTypeList'];
|
||||
}
|
||||
if (array_key_exists('foreignLinkEntityTypeList', $data)) {
|
||||
$params['foreignLinkEntityTypeList'] = $data['foreignLinkEntityTypeList'];
|
||||
}
|
||||
|
||||
$result = $this->getContainer()->get('entityManagerUtil')->createLink($params);
|
||||
|
||||
@@ -251,12 +259,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
'link',
|
||||
'linkForeign',
|
||||
'label',
|
||||
'labelForeign'
|
||||
'labelForeign',
|
||||
];
|
||||
|
||||
$additionalParamList = [];
|
||||
|
||||
$params = array();
|
||||
$params = [];
|
||||
foreach ($paramList as $item) {
|
||||
if (array_key_exists($item, $data)) {
|
||||
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
|
||||
@@ -280,6 +288,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (array_key_exists('auditedForeign', $data)) {
|
||||
$params['auditedForeign'] = $data['auditedForeign'];
|
||||
}
|
||||
if (array_key_exists('parentEntityTypeList', $data)) {
|
||||
$params['parentEntityTypeList'] = $data['parentEntityTypeList'];
|
||||
}
|
||||
if (array_key_exists('foreignLinkEntityTypeList', $data)) {
|
||||
$params['foreignLinkEntityTypeList'] = $data['foreignLinkEntityTypeList'];
|
||||
}
|
||||
|
||||
$result = $this->getContainer()->get('entityManagerUtil')->updateLink($params);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -75,7 +75,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
$id = $request->get('id');
|
||||
list($integration, $userId) = explode('__', $id);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -93,12 +93,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
list($integration, $userId) = explode('__', $params['id']);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$entity = $this->getEntityManager()->getEntity('ExternalAccount', $params['id']);
|
||||
return $entity->toArray();
|
||||
return $this->getRecordService()->read($params['id'])->getValueMap();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
@@ -114,7 +109,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
|
||||
list($integration, $userId) = explode('__', $params['id']);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
@@ -140,7 +135,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
|
||||
list($integration, $userId) = explode('__', $id);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
if ($this->getUser()->id != $userId && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -30,62 +30,49 @@
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use Espo\Core\Utils as Utils;
|
||||
use \Espo\Core\Exceptions\NotFound;
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
use Espo\Core\Exceptions\NotFound;
|
||||
use Espo\Core\Exceptions\Error;
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Layout extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
public function actionRead($params, $data)
|
||||
public function getActionRead($params, $data)
|
||||
{
|
||||
return $this->getServiceFactory()->create('Layout')->getForFrontend($params['scope'], $params['name']);
|
||||
$scope = $params['scope'] ?? null;
|
||||
$name = $params['name'] ?? null;
|
||||
|
||||
return $this->getServiceFactory()->create('Layout')->getForFrontend($scope, $name);
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
public function putActionUpdate($params, $data, $request)
|
||||
{
|
||||
if (is_object($data)) {
|
||||
$data = get_object_vars($data);
|
||||
}
|
||||
if (is_object($data)) $data = get_object_vars($data);
|
||||
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
if (!$request->isPut() && !$request->isPatch()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$scope = $params['scope'] ?? null;
|
||||
$name = $params['name'] ?? null;
|
||||
$setId = $params['setId'] ?? null;
|
||||
|
||||
$layoutManager = $this->getContainer()->get('layout');
|
||||
$layoutManager->set($data, $params['scope'], $params['name']);
|
||||
$result = $layoutManager->save();
|
||||
|
||||
if ($result === false) {
|
||||
throw new Error("Error while saving layout.");
|
||||
}
|
||||
|
||||
$this->getContainer()->get('dataManager')->updateCacheTimestamp();
|
||||
|
||||
return $layoutManager->get($params['scope'], $params['name']);
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
return $this->actionUpdate($params, $data, $request);
|
||||
return $this->getServiceFactory()->create('Layout')->update($scope, $name, $setId, $data);
|
||||
}
|
||||
|
||||
public function postActionResetToDefault($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
if (empty($data->scope) || empty($data->name)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (empty($data->scope) || empty($data->name)) throw new BadRequest();
|
||||
|
||||
$this->getContainer()->get('dataManager')->updateCacheTimestamp();
|
||||
return $this->getServiceFactory()->create('Layout')->resetToDefault($data->scope, $data->name, $data->setId ?? null);
|
||||
}
|
||||
|
||||
return $this->getContainer()->get('layout')->resetToDefault($data->scope, $data->name);
|
||||
public function getActionGetOriginal($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
return $this->getServiceFactory()->create('Layout')->getOriginal(
|
||||
$request->get('scope'), $request->get('name'), $request->get('setId')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
42
application/Espo/Controllers/LayoutSet.php
Normal file
42
application/Espo/Controllers/LayoutSet.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class LayoutSet extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
37
application/Espo/Controllers/PhoneNumber.php
Normal file
37
application/Espo/Controllers/PhoneNumber.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class PhoneNumber extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -182,12 +182,13 @@ class Table
|
||||
return 'no';
|
||||
}
|
||||
|
||||
public function getHighestLevel($action)
|
||||
public function getHighestLevel($scope, $action)
|
||||
{
|
||||
if (in_array($action, $this->booleanActionList)) {
|
||||
return 'yes';
|
||||
} else {
|
||||
return 'all';
|
||||
$level = $this->metadata->get(['scopes', $scope, $this->type . 'HighestLevel']);
|
||||
return $level ?? 'all';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -134,7 +134,7 @@ class AclManager
|
||||
public function getLevel(User $user, $scope, $action)
|
||||
{
|
||||
if ($user->isAdmin()) {
|
||||
return $this->getTable($user)->getHighestLevel($action);
|
||||
return $this->getTable($user)->getHighestLevel($scope, $action);
|
||||
}
|
||||
return $this->getTable($user)->getLevel($scope, $action);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
65
application/Espo/Core/AppParams/TemplateEntityTypeList.php
Normal file
65
application/Espo/Core/AppParams/TemplateEntityTypeList.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\AppParams;
|
||||
|
||||
class TemplateEntityTypeList extends \Espo\Core\Injectable
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->addDependency('acl');
|
||||
$this->addDependency('selectManagerFactory');
|
||||
$this->addDependency('entityManager');
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
if (!$this->getInjection('acl')->checkScope('Template')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$list = [];
|
||||
|
||||
$selectManager = $this->getInjection('selectManagerFactory')->create('Template');
|
||||
|
||||
$selectParams = $selectManager->getEmptySelectParams();
|
||||
$selectManager->applyAccess($selectParams);
|
||||
|
||||
$templateList = $this->getInjection('entityManager')->getRepository('Template')
|
||||
->select(['entityType'])
|
||||
->groupBy(['entityType'])
|
||||
->find($selectParams);
|
||||
|
||||
foreach ($templateList as $template) {
|
||||
$list[] = $template->get('entityType');
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -48,6 +48,7 @@ class Application
|
||||
$GLOBALS['log'] = $this->getContainer()->get('log');
|
||||
|
||||
$this->initAutoloads();
|
||||
$this->initPreloads();
|
||||
}
|
||||
|
||||
protected function initContainer()
|
||||
@@ -259,6 +260,9 @@ class Application
|
||||
$route = $slim->router()->getCurrentRoute();
|
||||
$conditions = $route->getConditions();
|
||||
|
||||
$response = $slim->response();
|
||||
$response->headers->set('Content-Type', 'application/json');
|
||||
|
||||
if (isset($conditions['useController']) && $conditions['useController'] == false) {
|
||||
return;
|
||||
}
|
||||
@@ -303,13 +307,16 @@ class Application
|
||||
});
|
||||
|
||||
$this->getSlim()->hook('slim.after.router', function () use (&$slim) {
|
||||
$slim->contentType('application/json');
|
||||
$response = $slim->response();
|
||||
|
||||
$res = $slim->response();
|
||||
$res->header('Expires', '0');
|
||||
$res->header('Last-Modified', gmdate("D, d M Y H:i:s") . " GMT");
|
||||
$res->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
|
||||
$res->header('Pragma', 'no-cache');
|
||||
if (!$response->headers->has('Content-Type')) {
|
||||
$response->headers->set('Content-Type', 'application/json');
|
||||
}
|
||||
|
||||
$response->headers->set('Expires', '0');
|
||||
$response->headers->set('Last-Modified', gmdate("D, d M Y H:i:s") . " GMT");
|
||||
$response->headers->set('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
|
||||
$response->headers->set('Pragma', 'no-cache');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -346,6 +353,15 @@ class Application
|
||||
$autoload->register();
|
||||
}
|
||||
|
||||
protected function initPreloads()
|
||||
{
|
||||
foreach ($this->getMetadata()->get(['app', 'containerServices']) ?? [] as $name => $defs) {
|
||||
if ($defs['preload'] ?? false) {
|
||||
$this->getContainer()->get($name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setBasePath($basePath)
|
||||
{
|
||||
$this->getContainer()->get('clientManager')->setBasePath($basePath);
|
||||
|
||||
63
application/Espo/Core/Cleanup/Base.php
Normal file
63
application/Espo/Core/Cleanup/Base.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Cleanup;
|
||||
|
||||
abstract class Base extends \Espo\Core\Injectable
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->addDependency('config');
|
||||
$this->addDependency('metadata');
|
||||
$this->addDependency('entityManager');
|
||||
$this->addDependency('fileManager');
|
||||
}
|
||||
|
||||
protected function getConfig()
|
||||
{
|
||||
return $this->getInjection('config');
|
||||
}
|
||||
|
||||
protected function getMetadata()
|
||||
{
|
||||
return $this->getInjection('metadata');
|
||||
}
|
||||
|
||||
protected function getEntityManager()
|
||||
{
|
||||
return $this->getInjection('entityManager');
|
||||
}
|
||||
|
||||
protected function getFileManager()
|
||||
{
|
||||
return $this->getInjection('fileManager');
|
||||
}
|
||||
|
||||
abstract public function process();
|
||||
}
|
||||
50
application/Espo/Core/Cleanup/Reminders.php
Normal file
50
application/Espo/Core/Cleanup/Reminders.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Cleanup;
|
||||
|
||||
class Reminders extends Base
|
||||
{
|
||||
protected $cleanupRemindersPeriod = '15 days';
|
||||
|
||||
public function process()
|
||||
{
|
||||
$period = '-' . $this->getConfig()->get('cleanupRemindersPeriod', $this->cleanupRemindersPeriod);
|
||||
|
||||
$datetime = new \DateTime();
|
||||
$datetime->modify($period);
|
||||
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
|
||||
$query = "DELETE FROM `reminder` WHERE DATE(remind_at) < " . $pdo->quote($datetime->format('Y-m-d'));
|
||||
|
||||
$sth = $pdo->prepare($query);
|
||||
$sth->execute();
|
||||
}
|
||||
}
|
||||
59
application/Espo/Core/Cleanup/WebhookQueue.php
Normal file
59
application/Espo/Core/Cleanup/WebhookQueue.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Cleanup;
|
||||
|
||||
class WebhookQueue extends Base
|
||||
{
|
||||
protected $cleanupWebhookQueuePeriod = '10 days';
|
||||
|
||||
public function process()
|
||||
{
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
|
||||
$period = '-' . $this->getConfig()->get('cleanupWebhookQueuePeriod', $this->cleanupWebhookQueuePeriod);
|
||||
$datetime = new \DateTime();
|
||||
$datetime->modify($period);
|
||||
$from = $datetime->format('Y-m-d H:i:s');
|
||||
|
||||
$query = "
|
||||
DELETE FROM `webhook_queue_item`
|
||||
WHERE
|
||||
DATE(created_at) < ".$pdo->quote($from)." AND
|
||||
(status <> 'Pending' OR deleted = 1)
|
||||
";
|
||||
$pdo->query($query);
|
||||
|
||||
$query = "
|
||||
DELETE FROM `webhook_event_queue_item`
|
||||
WHERE DATE(created_at) < ".$pdo->quote($from)." AND (is_processed = 1 OR deleted = 1)
|
||||
";
|
||||
$pdo->query($query);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
195
application/Espo/Core/Console/Commands/Extension.php
Normal file
195
application/Espo/Core/Console/Commands/Extension.php
Normal file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Console\Commands;
|
||||
|
||||
use Espo\Core\Exceptions\Error;
|
||||
|
||||
class Extension extends Base
|
||||
{
|
||||
protected $extensionManager = null;
|
||||
|
||||
public function run($options, $flagList, $argumentList)
|
||||
{
|
||||
if (in_array('u', $flagList)) {
|
||||
// uninstall
|
||||
|
||||
$name = $options['name'] ?? null;
|
||||
$id = $options['id'] ?? null;
|
||||
if (!$name && !$id) {
|
||||
$this->out("Can't uninstall. Specify --name=\"Extension Name\".\n");
|
||||
return;
|
||||
}
|
||||
$params = [];
|
||||
if ($id) {
|
||||
$params['id'] = $id;
|
||||
} else {
|
||||
$params['name'] = $name;
|
||||
}
|
||||
$params['delete'] = !in_array('k', $flagList);
|
||||
|
||||
$this->runUninstall($params);
|
||||
return;
|
||||
} else {
|
||||
// install
|
||||
|
||||
$file = $options['file'] ?? null;
|
||||
if (!$file) {
|
||||
$this->out("Can't install. Specify --file=\"path/to/package.zip\".\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$this->runInstall($file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected function runInstall(string $file)
|
||||
{
|
||||
$manager = $this->createExtensionManager();
|
||||
|
||||
if (!file_exists($file)) {
|
||||
$this->out("File does not exist.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$fileData = file_get_contents($file);
|
||||
$fileData = 'data:application/zip;base64,' . base64_encode($fileData);
|
||||
|
||||
try {
|
||||
$id = $manager->upload($fileData);
|
||||
} catch (\Throwable $e) {
|
||||
$this->out($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$manifest = $manager->getManifestById($id);
|
||||
|
||||
$name = $manifest['name'] ?? null;
|
||||
$version = $manifest['version'] ?? null;
|
||||
|
||||
if (!$name) {
|
||||
$this->out("Can't install. Bad manifest.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$this->out("Installing... Do not close the terminal. This may take a while...");
|
||||
|
||||
try {
|
||||
$manager->install(['id' => $id]);
|
||||
} catch (\Throwable $e) {
|
||||
$this->out("\n");
|
||||
$this->out($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$this->out("\n");
|
||||
$this->out("Extension '{$name}' version {$version} is installed.\nExtension ID: '{$id}'.\n");
|
||||
}
|
||||
|
||||
protected function runUninstall(array $params)
|
||||
{
|
||||
$id = $params['id'] ?? null;
|
||||
|
||||
if ($id) {
|
||||
$record = $this->getEntityManager()->getRepository('Extension')->where([
|
||||
'id' => $id,
|
||||
'isInstalled' => true,
|
||||
])->findOne();
|
||||
|
||||
if (!$record) {
|
||||
$this->out("Extension with ID '{$id}' is not installed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$name = $record->get('name');
|
||||
} else {
|
||||
$name = $params['name'] ?? null;
|
||||
if (!$name) {
|
||||
$this->out("Can't uninstall. No --name or --id specified.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$record = $this->getEntityManager()->getRepository('Extension')->where([
|
||||
'name' => $name,
|
||||
'isInstalled' => true,
|
||||
])->findOne();
|
||||
|
||||
if (!$record) {
|
||||
$this->out("Extension '{$name}' is not installed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$id = $record->id;
|
||||
}
|
||||
|
||||
$manager = $this->createExtensionManager();
|
||||
|
||||
$this->out("Uninstalling... Do not close the terminal. This may take a while...");
|
||||
|
||||
try {
|
||||
$manager->uninstall(['id' => $id]);
|
||||
} catch (\Throwable $e) {
|
||||
$this->out("\n");
|
||||
$this->out($e->getMessage() . "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$this->out("\n");
|
||||
|
||||
if ($params['delete'] ?? false) {
|
||||
try {
|
||||
$manager->delete(['id' => $id]);
|
||||
} catch (\Throwable $e) {
|
||||
$this->out($e->getMessage() . "\n");
|
||||
$this->out("Extension '{$name}' is uninstalled but could not be deleted.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
$this->out("Extension '{$name}' is uninstalled and deleted.\n");
|
||||
} else {
|
||||
$this->out("Extension '{$name}' is uninstalled.\n");
|
||||
}
|
||||
}
|
||||
|
||||
protected function createExtensionManager()
|
||||
{
|
||||
return new \Espo\Core\ExtensionManager($this->getContainer());
|
||||
}
|
||||
|
||||
protected function getEntityManager()
|
||||
{
|
||||
return $this->getContainer()->get('entityManager');
|
||||
}
|
||||
|
||||
protected function out(string $string)
|
||||
{
|
||||
fwrite(\STDOUT, $string);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2020 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user