Compare commits
769 Commits
backport/7
...
automated/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b92586571a | ||
|
|
90f51f931f | ||
|
|
0115fee075 | ||
|
|
42cf69a05c | ||
|
|
20b5716e33 | ||
|
|
60d02ff837 | ||
|
|
604018008c | ||
|
|
5cf486150a | ||
|
|
64741e455d | ||
|
|
9a7eb9b8de | ||
|
|
8ad3c9ac5c | ||
|
|
445d842481 | ||
|
|
6a7c02d8d8 | ||
|
|
f347f96474 | ||
|
|
5828f90163 | ||
|
|
6ccb4b7c3f | ||
|
|
094efdaa06 | ||
|
|
161003faf9 | ||
|
|
fa31256b8a | ||
|
|
c590c25f68 | ||
|
|
05832f69e9 | ||
|
|
c9bacabd4c | ||
|
|
4abf895d22 | ||
|
|
d216e56dac | ||
|
|
15514162f3 | ||
|
|
b3bb29157c | ||
|
|
12b656dd8c | ||
|
|
661eea3018 | ||
|
|
ecd3cb42de | ||
|
|
f49c8f6ee4 | ||
|
|
96b56a2447 | ||
|
|
26badb58dd | ||
|
|
04d9433bdd | ||
|
|
a69eb654fd | ||
|
|
ab5ccb7bc1 | ||
|
|
f054cc2fbd | ||
|
|
1afc5cdbcc | ||
|
|
1a6e5929b2 | ||
|
|
74a3ab5008 | ||
|
|
0ebd05e649 | ||
|
|
3611c8f8ac | ||
|
|
da3b857ab0 | ||
|
|
199b698cb7 | ||
|
|
fb1132652a | ||
|
|
f78c3d42df | ||
|
|
4a879ab1fb | ||
|
|
b4e9dd39cc | ||
|
|
9035a23af8 | ||
|
|
bffa4d0925 | ||
|
|
516294ee23 | ||
|
|
5a39996357 | ||
|
|
569a0961fd | ||
|
|
376f46b7ba | ||
|
|
447dc60f37 | ||
|
|
480af39d56 | ||
|
|
7d18f3a48b | ||
|
|
51f5b8f023 | ||
|
|
1e68e1ff03 | ||
|
|
a13619690e | ||
|
|
3115363c28 | ||
|
|
6ace1867e1 | ||
|
|
af4a610a25 | ||
|
|
d40661a985 | ||
|
|
0a14a0dfd8 | ||
|
|
72d3cfa771 | ||
|
|
411c0d9d46 | ||
|
|
ec33c26fe4 | ||
|
|
8fcb4a47ae | ||
|
|
44d244f9aa | ||
|
|
3ed1fbcc40 | ||
|
|
7394cb2d48 | ||
|
|
4f39328d59 | ||
|
|
b877c58343 | ||
|
|
6334b36666 | ||
|
|
f08eeec3a8 | ||
|
|
eec2ccd9ed | ||
|
|
3c8728c9ee | ||
|
|
684cf519ce | ||
|
|
215a4637b0 | ||
|
|
cab45170e5 | ||
|
|
cd50becc49 | ||
|
|
d778a48afb | ||
|
|
0a1ed8e0c2 | ||
|
|
a200afa168 | ||
|
|
3277de5cb4 | ||
|
|
34effdc00e | ||
|
|
014372a21a | ||
|
|
7674a85f68 | ||
|
|
357c6c1c5a | ||
|
|
23be704099 | ||
|
|
2571d48290 | ||
|
|
c513b1d5b5 | ||
|
|
b80e0d9297 | ||
|
|
382c05ed8d | ||
|
|
1283b8d78a | ||
|
|
465f24f2f1 | ||
|
|
ba0d211720 | ||
|
|
23f56be988 | ||
|
|
87f2d65a96 | ||
|
|
c95b3b746d | ||
|
|
a3fa72341d | ||
|
|
da850b18ae | ||
|
|
771cf93cf6 | ||
|
|
0ed8b21b3c | ||
|
|
6f4f59a976 | ||
|
|
f80d7a5e79 | ||
|
|
e3843f9808 | ||
|
|
1ec7f1a971 | ||
|
|
eee35ac6ad | ||
|
|
152181ff67 | ||
|
|
18eea3584e | ||
|
|
844d492c8d | ||
|
|
840e9f309f | ||
|
|
fe53440ee4 | ||
|
|
162dbf25dd | ||
|
|
17de153ec8 | ||
|
|
58027c8294 | ||
|
|
79eba77b49 | ||
|
|
0efdfab232 | ||
|
|
ba9d2a4514 | ||
|
|
5744944957 | ||
|
|
1c1e3e944e | ||
|
|
85bb603103 | ||
|
|
90f10190ac | ||
|
|
ab3b2aa23c | ||
|
|
b9c0d454d5 | ||
|
|
438825530c | ||
|
|
c346c3cdf8 | ||
|
|
f1da8b30a4 | ||
|
|
8229d40981 | ||
|
|
244d61c783 | ||
|
|
879e59c003 | ||
|
|
10dc1fe9c1 | ||
|
|
4741817594 | ||
|
|
af99211d6b | ||
|
|
b120ce868d | ||
|
|
f0ea3f3ce5 | ||
|
|
2f0caac403 | ||
|
|
cc93386da6 | ||
|
|
5573a8bb1a | ||
|
|
c2e2e73b88 | ||
|
|
e509ac77d4 | ||
|
|
909af7e1bb | ||
|
|
6828144815 | ||
|
|
1d9382429e | ||
|
|
f68f7b54d6 | ||
|
|
dd4da2dd34 | ||
|
|
327bfff315 | ||
|
|
0b6c492c75 | ||
|
|
bbe1b37dfe | ||
|
|
3b5bf56049 | ||
|
|
97ab42ad5c | ||
|
|
42d3e54841 | ||
|
|
8dd62dd8d9 | ||
|
|
160900f2bb | ||
|
|
020107d3f4 | ||
|
|
68fb689df9 | ||
|
|
97d8018cd1 | ||
|
|
d666cba097 | ||
|
|
a8c337eb07 | ||
|
|
a3a46012a4 | ||
|
|
1aa7105ceb | ||
|
|
a042a4b076 | ||
|
|
d0f992ecbb | ||
|
|
fc245759a3 | ||
|
|
60bba3332b | ||
|
|
c93e07e0bd | ||
|
|
9e6975b22b | ||
|
|
979f9b2c53 | ||
|
|
307bdf5e68 | ||
|
|
4380533a66 | ||
|
|
3a1fbb90c3 | ||
|
|
dd64e0c73d | ||
|
|
8a9751ac6b | ||
|
|
c16f26d8d2 | ||
|
|
c7edec8f6e | ||
|
|
a6de59fe9c | ||
|
|
81e2c4768b | ||
|
|
3c917f3b2d | ||
|
|
6fd24ffa45 | ||
|
|
8c891c7f57 | ||
|
|
b73c2becda | ||
|
|
a9235e00c7 | ||
|
|
f8ad05b55b | ||
|
|
be497a741c | ||
|
|
62a9ce3131 | ||
|
|
7799854df4 | ||
|
|
bf961c3de4 | ||
|
|
5f73d97e4e | ||
|
|
32f0852a23 | ||
|
|
d80c9b3eec | ||
|
|
002bac60b1 | ||
|
|
08756b6c5d | ||
|
|
71bb838964 | ||
|
|
6c55e3cd70 | ||
|
|
8391d843d5 | ||
|
|
7cb9f8b966 | ||
|
|
1dfbec4278 | ||
|
|
26861c890d | ||
|
|
6841d4c068 | ||
|
|
4e70286629 | ||
|
|
54a5a1ecb2 | ||
|
|
4139f8b94a | ||
|
|
5c21cd2cf5 | ||
|
|
af253270aa | ||
|
|
6a64b4fc75 | ||
|
|
4b260a047c | ||
|
|
8d41f9730f | ||
|
|
2adacaa39e | ||
|
|
69fcd9bfdf | ||
|
|
c0b3775232 | ||
|
|
df0e909be4 | ||
|
|
96905c891c | ||
|
|
58c8dd5221 | ||
|
|
e21c82b38e | ||
|
|
02afc218ff | ||
|
|
50d199dd08 | ||
|
|
ff74bfbf13 | ||
|
|
a64bec0ecd | ||
|
|
d66e6408b1 | ||
|
|
324eb05598 | ||
|
|
9938a6d57f | ||
|
|
c2e4165bf7 | ||
|
|
7de0d6f1c4 | ||
|
|
5631741b6b | ||
|
|
724ad74c47 | ||
|
|
c8897477a7 | ||
|
|
7ac93d311c | ||
|
|
be8806102a | ||
|
|
f6a5877b85 | ||
|
|
9360a49d50 | ||
|
|
3aee848221 | ||
|
|
2f53f8a1d6 | ||
|
|
d63764fa78 | ||
|
|
d06ec0ad98 | ||
|
|
4bf086b55e | ||
|
|
99e2912d7c | ||
|
|
10aed3660c | ||
|
|
6628c42eca | ||
|
|
dbe1ced6b0 | ||
|
|
04b4da39c9 | ||
|
|
530a695e6f | ||
|
|
02d7dd469e | ||
|
|
71340b1217 | ||
|
|
153a9d2b7d | ||
|
|
e18f73a333 | ||
|
|
127f1b2d40 | ||
|
|
fe4c8df97e | ||
|
|
d5582535d6 | ||
|
|
7ec112ae1d | ||
|
|
aa747d7d62 | ||
|
|
d97f6c1a5f | ||
|
|
8e0b585662 | ||
|
|
c0f7e16463 | ||
|
|
71b4700a07 | ||
|
|
688649f5a8 | ||
|
|
03cdc47540 | ||
|
|
9f06a43d4b | ||
|
|
d31e31735d | ||
|
|
4a05762c0a | ||
|
|
a72f48f9ce | ||
|
|
7e6f23fa82 | ||
|
|
a72f4e3aa3 | ||
|
|
ec8945bb54 | ||
|
|
760f771e11 | ||
|
|
f0a443cbb6 | ||
|
|
69b9c09a14 | ||
|
|
7c93108172 | ||
|
|
899d8a6531 | ||
|
|
60b34d190a | ||
|
|
438a149304 | ||
|
|
9a2fcf6925 | ||
|
|
e3c802c0f3 | ||
|
|
ea84743864 | ||
|
|
abd38e0c15 | ||
|
|
0ec1f7151c | ||
|
|
a27cbf8bad | ||
|
|
f4a1424e90 | ||
|
|
a92dc282a8 | ||
|
|
e3ffbf73c3 | ||
|
|
c6e075af92 | ||
|
|
144f293231 | ||
|
|
6d78bc70f3 | ||
|
|
bf15865957 | ||
|
|
d2e5c0c515 | ||
|
|
933f2515db | ||
|
|
17bf361767 | ||
|
|
1df731396f | ||
|
|
968ea30fd4 | ||
|
|
8f75c7f92d | ||
|
|
234be011cc | ||
|
|
fa2f5bcab8 | ||
|
|
685014ec48 | ||
|
|
1cd6c55d30 | ||
|
|
6dbcf5d17b | ||
|
|
f84d7c372b | ||
|
|
8be8647f6d | ||
|
|
eb878055ae | ||
|
|
00b334d3d9 | ||
|
|
5905154fe0 | ||
|
|
8280f0796f | ||
|
|
18ea2f9a7e | ||
|
|
3cbddae6bc | ||
|
|
aac11e96b5 | ||
|
|
2e62a9c82a | ||
|
|
ec18ec758b | ||
|
|
8f3e2ae1d9 | ||
|
|
7f00601007 | ||
|
|
175c10c146 | ||
|
|
8dc0933c47 | ||
|
|
8c52b9bad9 | ||
|
|
a1c9396946 | ||
|
|
b0fbb386b8 | ||
|
|
e77a2fcd79 | ||
|
|
89152325be | ||
|
|
03cb9e2bc5 | ||
|
|
3c6f8ec419 | ||
|
|
3cfb1f6bfe | ||
|
|
96ad191ce2 | ||
|
|
52d4039dc8 | ||
|
|
73b3517840 | ||
|
|
3d78802446 | ||
|
|
8a99e6d539 | ||
|
|
0e08ad16e1 | ||
|
|
d04ab25315 | ||
|
|
19d35c65a0 | ||
|
|
1783914d3a | ||
|
|
c837dd4db6 | ||
|
|
db22052729 | ||
|
|
116babcaaf | ||
|
|
94da732bfb | ||
|
|
86d42b7060 | ||
|
|
122387a195 | ||
|
|
028f26a969 | ||
|
|
13c13b8dde | ||
|
|
5df4a49ff5 | ||
|
|
97902d2f6a | ||
|
|
db6221d1c9 | ||
|
|
0223dd9a3a | ||
|
|
974a4c979a | ||
|
|
51ba51fe33 | ||
|
|
4d5c69f250 | ||
|
|
9bddab4928 | ||
|
|
6dcb1d4b8b | ||
|
|
9ed384fa20 | ||
|
|
7cdc79a9ef | ||
|
|
852770c574 | ||
|
|
74afeb85d0 | ||
|
|
12a494720b | ||
|
|
b3261e0b56 | ||
|
|
88dbb010d0 | ||
|
|
d8adaf5fe6 | ||
|
|
2a36b45072 | ||
|
|
4e6474fa99 | ||
|
|
dbe7536339 | ||
|
|
b5e08110ab | ||
|
|
a7f2558aab | ||
|
|
3c3e6fa7d2 | ||
|
|
6a2b092ad6 | ||
|
|
5f2c300b21 | ||
|
|
439e44128a | ||
|
|
55056e27f1 | ||
|
|
22c36a0d77 | ||
|
|
1ebaa0c41f | ||
|
|
a2dbb94179 | ||
|
|
6f6f54965c | ||
|
|
5a833ec367 | ||
|
|
f1161be49f | ||
|
|
c0731ce142 | ||
|
|
4534ad5a92 | ||
|
|
6788210c27 | ||
|
|
1051dea281 | ||
|
|
eb9fce2e5f | ||
|
|
955a16f1c5 | ||
|
|
f38773473b | ||
|
|
b15254f1ed | ||
|
|
6dd623f796 | ||
|
|
41e97d7281 | ||
|
|
1b2a352df1 | ||
|
|
7fcad2425d | ||
|
|
5fb43086b6 | ||
|
|
7b4586a43a | ||
|
|
aaa76f7bd0 | ||
|
|
8260296d64 | ||
|
|
b02bc530f1 | ||
|
|
1b4e859431 | ||
|
|
acc61ad584 | ||
|
|
cb1d5c49e0 | ||
|
|
0c7b1c4731 | ||
|
|
629ef85d64 | ||
|
|
914f1d76ac | ||
|
|
0923070c45 | ||
|
|
bbf51952e0 | ||
|
|
1d1c2df8f3 | ||
|
|
0780b10170 | ||
|
|
fd6ef9b6eb | ||
|
|
da4a54900c | ||
|
|
53bd32d6b6 | ||
|
|
f7fa419105 | ||
|
|
023ab01e93 | ||
|
|
615d5ef871 | ||
|
|
a52b7b9742 | ||
|
|
dcbc6bc604 | ||
|
|
ce13d89e07 | ||
|
|
7114b10871 | ||
|
|
100404d25f | ||
|
|
60bfc192d3 | ||
|
|
fd090c7749 | ||
|
|
d735308bd3 | ||
|
|
4ec068ca62 | ||
|
|
f5e3e5e0f8 | ||
|
|
94aee3e07a | ||
|
|
b1f7c623a1 | ||
|
|
afa95d3c50 | ||
|
|
ba8e77abfe | ||
|
|
8c09047203 | ||
|
|
baa85e8947 | ||
|
|
f1e5acc52e | ||
|
|
d76b7a4667 | ||
|
|
df32a3ee34 | ||
|
|
2fa74662db | ||
|
|
d5fd80d116 | ||
|
|
97afe9fa85 | ||
|
|
141e2dbc08 | ||
|
|
7a0b243885 | ||
|
|
e662e621ad | ||
|
|
98c3e4acbd | ||
|
|
7b21a9a7ea | ||
|
|
90af63d757 | ||
|
|
facca9c7e6 | ||
|
|
37119c22e4 | ||
|
|
be748f5f6f | ||
|
|
fa23a3852f | ||
|
|
c5c8a6ef71 | ||
|
|
047fcb6584 | ||
|
|
75be929077 | ||
|
|
46c4c7d4fd | ||
|
|
aa3a829592 | ||
|
|
351af0bd39 | ||
|
|
66fbaac8d7 | ||
|
|
3b4fc9db20 | ||
|
|
1292f68340 | ||
|
|
2861d9f89f | ||
|
|
a552bde7c7 | ||
|
|
0f593eda27 | ||
|
|
0c71403859 | ||
|
|
facb5f4a33 | ||
|
|
13d6a79b1f | ||
|
|
8104df7c14 | ||
|
|
a35489bee3 | ||
|
|
fe1c4e5b34 | ||
|
|
eeda7b4fb9 | ||
|
|
052774397c | ||
|
|
f2c30afe8a | ||
|
|
ea01d84419 | ||
|
|
e2cc8c3bd9 | ||
|
|
c630d3e809 | ||
|
|
97eb0a2c5e | ||
|
|
59fa3cd11c | ||
|
|
bdaf28eef4 | ||
|
|
00a1fa8b85 | ||
|
|
76792c61a1 | ||
|
|
989db86f83 | ||
|
|
61019d5625 | ||
|
|
ba45022c79 | ||
|
|
1fa8c5ff35 | ||
|
|
e98adcd65c | ||
|
|
92e6659301 | ||
|
|
96957af0ce | ||
|
|
7cd8946e20 | ||
|
|
9c55a2dde0 | ||
|
|
6d81cb3ddd | ||
|
|
5e92394dc7 | ||
|
|
6ceecd4f9b | ||
|
|
774b5f11cd | ||
|
|
fb236edf8c | ||
|
|
5aeebc1ed8 | ||
|
|
60b7357ef4 | ||
|
|
22bb8d65e9 | ||
|
|
8f77cce542 | ||
|
|
be783d244c | ||
|
|
4d17f10675 | ||
|
|
3391a40b77 | ||
|
|
d829a28ddf | ||
|
|
0a48954f18 | ||
|
|
2e0f0d29b6 | ||
|
|
1fe20dcc1d | ||
|
|
838b648ef6 | ||
|
|
55c44ef6d4 | ||
|
|
e436cb921a | ||
|
|
f6df55dd2d | ||
|
|
f8bdc3e864 | ||
|
|
443c7f852e | ||
|
|
86cb011a5c | ||
|
|
b3cdbdced8 | ||
|
|
ba953c9b09 | ||
|
|
e8ed8bc9d3 | ||
|
|
1b781b43a0 | ||
|
|
b79cb2e89d | ||
|
|
517fc14847 | ||
|
|
9058acaa58 | ||
|
|
326fb861a4 | ||
|
|
39097b424a | ||
|
|
5f9fb3c08f | ||
|
|
91458331bc | ||
|
|
368d5e4f63 | ||
|
|
3e52dc0ae2 | ||
|
|
36a1932786 | ||
|
|
53a83a788d | ||
|
|
48d0edd243 | ||
|
|
cc00efb40a | ||
|
|
27ec8beda2 | ||
|
|
a8dd7837c1 | ||
|
|
ae0460e5b7 | ||
|
|
246e270dc6 | ||
|
|
554b1edd52 | ||
|
|
bb78592b70 | ||
|
|
79419cdb96 | ||
|
|
7c22c706b0 | ||
|
|
389d72c30c | ||
|
|
ff2672b8f3 | ||
|
|
0ff9520e22 | ||
|
|
61ed059f13 | ||
|
|
587e2d4dcd | ||
|
|
bd44ea27d3 | ||
|
|
702206b9c3 | ||
|
|
47c4b58468 | ||
|
|
8dbea68b8f | ||
|
|
d44267d06c | ||
|
|
7d04b5a6b7 | ||
|
|
ac02ddfc4d | ||
|
|
606a53aac6 | ||
|
|
c4272d46a5 | ||
|
|
b492f7a6cf | ||
|
|
9cd320188d | ||
|
|
4d8f9763b8 | ||
|
|
a1d5c911e8 | ||
|
|
bf5f5ad09f | ||
|
|
1c0bc1f09a | ||
|
|
32c67cd3fb | ||
|
|
4da6a42bdf | ||
|
|
60dbf606be | ||
|
|
345ca761c7 | ||
|
|
d69a123d0e | ||
|
|
3e4bf0eb99 | ||
|
|
4ad732a7c4 | ||
|
|
f66e3e8172 | ||
|
|
c45a63da02 | ||
|
|
8e111f26f2 | ||
|
|
dc131fc681 | ||
|
|
ca24876463 | ||
|
|
10af76bdf0 | ||
|
|
bc746fec21 | ||
|
|
dc5a2a5914 | ||
|
|
79dfcc7e5a | ||
|
|
5d7913a377 | ||
|
|
dcc912919d | ||
|
|
5738e0851a | ||
|
|
83797f4e4a | ||
|
|
55778a26e6 | ||
|
|
c2c2519601 | ||
|
|
1184f18108 | ||
|
|
c80a087f6d | ||
|
|
d23c7eecd3 | ||
|
|
fb24eddaf8 | ||
|
|
cb09583c0b | ||
|
|
b08f0b80aa | ||
|
|
9f5bfbf8ff | ||
|
|
299e54baa9 | ||
|
|
bd1bd0ac41 | ||
|
|
af680cb37e | ||
|
|
ac68516579 | ||
|
|
876a68eb46 | ||
|
|
4372b4ac27 | ||
|
|
e4fb4655db | ||
|
|
ec76abe744 | ||
|
|
82fe8c8cf2 | ||
|
|
11e01b58eb | ||
|
|
00df27020c | ||
|
|
784a1462da | ||
|
|
abca5d19d7 | ||
|
|
3ceee99a69 | ||
|
|
02b17b8cf6 | ||
|
|
d688090dfc | ||
|
|
d36c127dc8 | ||
|
|
9b5c419c29 | ||
|
|
fff42693df | ||
|
|
192518decd | ||
|
|
51f4e2e415 | ||
|
|
a7eba9dcfd | ||
|
|
fff6395b3a | ||
|
|
4438d775f0 | ||
|
|
69e3e4a80b | ||
|
|
1868e66911 | ||
|
|
b4903c983d | ||
|
|
4bc033a2e9 | ||
|
|
f0a0b8d08e | ||
|
|
6a8784c184 | ||
|
|
f4a70cda51 | ||
|
|
101499df1e | ||
|
|
26f82d9ef6 | ||
|
|
4d9395982e | ||
|
|
12ae50d67b | ||
|
|
90e0cab306 | ||
|
|
7a414a0ca3 | ||
|
|
be4e8438ab | ||
|
|
f9580003cc | ||
|
|
761d0ce4fe | ||
|
|
cb6d8dbaf5 | ||
|
|
9eefd22422 | ||
|
|
7e2c170d1b | ||
|
|
351c72a590 | ||
|
|
ea5f3f2d70 | ||
|
|
4441107360 | ||
|
|
529c4defb3 | ||
|
|
e7a2306268 | ||
|
|
1ffee422b6 | ||
|
|
9fba14f1d3 | ||
|
|
e0185a39a8 | ||
|
|
0e49d72a67 | ||
|
|
786d2583de | ||
|
|
3ebdaf694d | ||
|
|
db50b78cb6 | ||
|
|
60f0719380 | ||
|
|
c68d223670 | ||
|
|
5c1e3ec50a | ||
|
|
e0b11a0171 | ||
|
|
e7a53ce31a | ||
|
|
d83b8b809d | ||
|
|
1020f6e344 | ||
|
|
6591466620 | ||
|
|
4505f2c426 | ||
|
|
1484a1445c | ||
|
|
28fa6a4372 | ||
|
|
a3724d61be | ||
|
|
439c2b422e | ||
|
|
2a7c5b9c9c | ||
|
|
bd6475c93f | ||
|
|
ae14c299f6 | ||
|
|
95ab566607 | ||
|
|
e19b78d5cf | ||
|
|
b20c5821e7 | ||
|
|
1b0f545d06 | ||
|
|
806d1074ea | ||
|
|
789930e10e | ||
|
|
1231e267aa | ||
|
|
b95e9756ab | ||
|
|
deea984d57 | ||
|
|
2b6877e771 | ||
|
|
5274b16253 | ||
|
|
3ef0985ae1 | ||
|
|
da6914d563 | ||
|
|
855d6cc4b9 | ||
|
|
22f1b9076a | ||
|
|
4900aca82e | ||
|
|
dafdf10755 | ||
|
|
ca3f6747e2 | ||
|
|
26129e724b | ||
|
|
93c5a6eb0f | ||
|
|
e91a4698f3 | ||
|
|
5cd2c51d19 | ||
|
|
b87047320a | ||
|
|
93d77fdbec | ||
|
|
37a807c108 | ||
|
|
706b564c01 | ||
|
|
93dc26aa6e | ||
|
|
0bf25619e0 | ||
|
|
fede0908bf | ||
|
|
b0bafb9212 | ||
|
|
ca75c14252 | ||
|
|
0076026fad | ||
|
|
b49ba034a0 | ||
|
|
0b53a4746d | ||
|
|
b636796851 | ||
|
|
46b81edc9e | ||
|
|
9f6f4eb475 | ||
|
|
7e3dc511c0 | ||
|
|
a329df397e | ||
|
|
6f25fc7e19 | ||
|
|
599844a87e | ||
|
|
088905dd7a | ||
|
|
4ffbafdbf2 | ||
|
|
2be3b85b09 | ||
|
|
76c709287b | ||
|
|
1f7b3cc480 | ||
|
|
40ac9b6c3e | ||
|
|
06fcf8f2cd | ||
|
|
2f0241df2e | ||
|
|
34ff6f4aac | ||
|
|
40f7f0907a | ||
|
|
0e5006616e | ||
|
|
792a513bb5 | ||
|
|
a9b65de341 | ||
|
|
a0fc1bbeb8 | ||
|
|
482bcb3149 | ||
|
|
cf0b90369a | ||
|
|
a0bcbc5cc6 | ||
|
|
e73eec8ba4 | ||
|
|
c1ed33848c | ||
|
|
d9d75fdfe4 | ||
|
|
c348b824c8 | ||
|
|
39987a0303 | ||
|
|
0906b06192 | ||
|
|
434f59d06d | ||
|
|
af4c01abd4 | ||
|
|
516bc6d5fc | ||
|
|
d7b3aedab4 | ||
|
|
fb641946d6 | ||
|
|
b3bc532e81 | ||
|
|
fe1006d643 | ||
|
|
9a37d6dbfc | ||
|
|
bf704309ad | ||
|
|
635cf3962f | ||
|
|
e986ca31a1 | ||
|
|
43a0fec9a6 | ||
|
|
c6c41c59d2 | ||
|
|
fb54b8126a | ||
|
|
a4f2a99776 | ||
|
|
dbca6bc0d7 | ||
|
|
e647faf31c | ||
|
|
fdd05853af | ||
|
|
afd8372baa | ||
|
|
f99d1f516c | ||
|
|
1aa23407f1 | ||
|
|
83d59dd3a9 | ||
|
|
2233786605 | ||
|
|
2d2f7c6772 | ||
|
|
ba3e97b73d | ||
|
|
4107481b07 | ||
|
|
6e158992dc | ||
|
|
0e4c60c23f | ||
|
|
702672de28 | ||
|
|
48bdf83887 | ||
|
|
520a0f8c26 | ||
|
|
b84564b0f7 | ||
|
|
ba33a83e9f | ||
|
|
b645c1e974 | ||
|
|
3daad1b9bc | ||
|
|
5416a2b3a1 | ||
|
|
5c3098afa1 | ||
|
|
e25470ece3 | ||
|
|
87a65e9b0f | ||
|
|
4c9459ac57 | ||
|
|
67bd5dcb1f | ||
|
|
beb563e74e | ||
|
|
3e1805b09b | ||
|
|
ee568ec307 | ||
|
|
37b355b530 | ||
|
|
a5de97ff42 | ||
|
|
3f4cdf7293 | ||
|
|
2a35b627a0 | ||
|
|
517347533d | ||
|
|
f0d021560a | ||
|
|
d49093f6b6 | ||
|
|
1c2f3683a5 | ||
|
|
bd0f8fb4c4 | ||
|
|
061a04142b | ||
|
|
092af73794 | ||
|
|
0f3359e417 | ||
|
|
90272cdc12 | ||
|
|
7891f017c9 | ||
|
|
cb5b67ed09 | ||
|
|
201c121e34 | ||
|
|
a1ea3b772b | ||
|
|
4d6a05915c | ||
|
|
0c5b4b0ebe | ||
|
|
be263513b3 | ||
|
|
db4db8a696 | ||
|
|
c2425f3c33 |
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"image": "ghcr.io/juliushaertl/nextcloud-dev-php81:latest",
|
"image": "ghcr.io/juliusknorr/nextcloud-dev-php81:latest",
|
||||||
"forwardPorts": [80],
|
"forwardPorts": [80],
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"NEXTCLOUD_AUTOINSTALL_APPS": "deck",
|
"NEXTCLOUD_AUTOINSTALL_APPS": "deck",
|
||||||
|
|||||||
2
.github/CODEOWNERS
vendored
Normal file
2
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# App maintainers
|
||||||
|
* @luka-nextcloud @grnd-alt @elzody
|
||||||
18
.github/dependabot.yml
vendored
18
.github/dependabot.yml
vendored
@@ -14,13 +14,13 @@ updates:
|
|||||||
- luka-nextcloud
|
- luka-nextcloud
|
||||||
|
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
target-branch: stable29
|
target-branch: stable32
|
||||||
versioning-strategy: lockfile-only
|
versioning-strategy: lockfile-only
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: saturday
|
day: saturday
|
||||||
time: "03:00"
|
time: "03:15"
|
||||||
timezone: Europe/Paris
|
timezone: Europe/Paris
|
||||||
ignore:
|
ignore:
|
||||||
- dependency-name: "*"
|
- dependency-name: "*"
|
||||||
@@ -31,13 +31,13 @@ updates:
|
|||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
target-branch: stable28
|
target-branch: stable31
|
||||||
versioning-strategy: lockfile-only
|
versioning-strategy: lockfile-only
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: saturday
|
day: saturday
|
||||||
time: "03:00"
|
time: "03:15"
|
||||||
timezone: Europe/Paris
|
timezone: Europe/Paris
|
||||||
ignore:
|
ignore:
|
||||||
- dependency-name: "*"
|
- dependency-name: "*"
|
||||||
@@ -48,13 +48,13 @@ updates:
|
|||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
target-branch: stable27
|
target-branch: stable30
|
||||||
versioning-strategy: lockfile-only
|
versioning-strategy: lockfile-only
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: saturday
|
day: saturday
|
||||||
time: "03:00"
|
time: "03:30"
|
||||||
timezone: Europe/Paris
|
timezone: Europe/Paris
|
||||||
ignore:
|
ignore:
|
||||||
- dependency-name: "*"
|
- dependency-name: "*"
|
||||||
@@ -69,7 +69,7 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: saturday
|
day: saturday
|
||||||
time: "03:00"
|
time: "03:45"
|
||||||
timezone: Europe/Paris
|
timezone: Europe/Paris
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
reviewers:
|
reviewers:
|
||||||
@@ -81,7 +81,7 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: saturday
|
day: saturday
|
||||||
time: "03:00"
|
time: "04:00"
|
||||||
timezone: Europe/Paris
|
timezone: Europe/Paris
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
reviewers:
|
reviewers:
|
||||||
@@ -93,7 +93,7 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
day: saturday
|
day: saturday
|
||||||
time: "03:00"
|
time: "04:15"
|
||||||
timezone: Europe/Paris
|
timezone: Europe/Paris
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
reviewers:
|
reviewers:
|
||||||
|
|||||||
6
.github/workflows/appbuild.yml
vendored
6
.github/workflows/appbuild.yml
vendored
@@ -16,15 +16,15 @@ jobs:
|
|||||||
node-version: [16.x]
|
node-version: [16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.2.2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Set up npm7
|
- name: Set up npm7
|
||||||
run: npm i -g npm@7
|
run: npm i -g npm@7
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@2.31.1
|
uses: shivammathur/setup-php@2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: '7.4'
|
php-version: '7.4'
|
||||||
tools: composer
|
tools: composer
|
||||||
|
|||||||
10
.github/workflows/appstore-build-publish.yml
vendored
10
.github/workflows/appstore-build-publish.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: ${{ env.APP_NAME }}
|
path: ${{ env.APP_NAME }}
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||||
# Skip if no package.json
|
# Skip if no package.json
|
||||||
if: ${{ steps.versions.outputs.nodeVersion }}
|
if: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
||||||
|
|
||||||
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
|
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ steps.php-versions.outputs.php-min }}
|
php-version: ${{ steps.php-versions.outputs.php-min }}
|
||||||
coverage: none
|
coverage: none
|
||||||
@@ -149,7 +149,7 @@ jobs:
|
|||||||
unzip latest-$NCVERSION.zip
|
unzip latest-$NCVERSION.zip
|
||||||
|
|
||||||
- name: Checkout server master fallback
|
- name: Checkout server master fallback
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
if: ${{ steps.server-checkout.outcome != 'success' }}
|
if: ${{ steps.server-checkout.outcome != 'success' }}
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
@@ -173,7 +173,7 @@ jobs:
|
|||||||
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
|
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Attach tarball to github release
|
- name: Attach tarball to github release
|
||||||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
|
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
|
||||||
id: attach_to_release
|
id: attach_to_release
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
51
.github/workflows/command-rebase.yml
vendored
51
.github/workflows/command-rebase.yml
vendored
@@ -1,51 +0,0 @@
|
|||||||
# This workflow is provided via the organization template repository
|
|
||||||
#
|
|
||||||
# https://github.com/nextcloud/.github
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
|
||||||
|
|
||||||
name: Rebase command
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: created
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
rebase:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
|
|
||||||
# On pull requests and if the comment starts with `/rebase`
|
|
||||||
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Add reaction on start
|
|
||||||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
|
||||||
repository: ${{ github.event.repository.full_name }}
|
|
||||||
comment-id: ${{ github.event.comment.id }}
|
|
||||||
reaction-type: "+1"
|
|
||||||
|
|
||||||
- name: Checkout the latest code
|
|
||||||
uses: actions/checkout@v4.1.7 # v3.5.2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
|
||||||
|
|
||||||
- name: Automatic Rebase
|
|
||||||
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
|
|
||||||
|
|
||||||
- name: Add reaction on failure
|
|
||||||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
|
||||||
repository: ${{ github.event.repository.full_name }}
|
|
||||||
comment-id: ${{ github.event.comment.id }}
|
|
||||||
reaction-type: "-1"
|
|
||||||
12
.github/workflows/cypress-e2e.yml
vendored
12
.github/workflows/cypress-e2e.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
node-version: [20.x]
|
node-version: [20.x]
|
||||||
# containers: [1, 2, 3]
|
# containers: [1, 2, 3]
|
||||||
php-versions: [ '8.2' ]
|
php-versions: [ '8.2' ]
|
||||||
server-versions: [ 'stable30' ]
|
server-versions: [ 'master' ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
|
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV
|
echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout server
|
- name: Checkout server
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
repository: nextcloud/server
|
repository: nextcloud/server
|
||||||
ref: ${{ matrix.server-versions }}
|
ref: ${{ matrix.server-versions }}
|
||||||
@@ -64,12 +64,12 @@ jobs:
|
|||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||||
|
|
||||||
- name: Checkout ${{ env.APP_NAME }}
|
- name: Checkout ${{ env.APP_NAME }}
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
path: apps/${{ env.APP_NAME }}
|
path: apps/${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Checkout text
|
- name: Checkout text
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
repository: nextcloud/text
|
repository: nextcloud/text
|
||||||
ref: ${{ env.text_app_ref }}
|
ref: ${{ env.text_app_ref }}
|
||||||
@@ -91,7 +91,7 @@ jobs:
|
|||||||
restore-keys: ${{ steps.extcache.outputs.key }}
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@2.31.1
|
uses: shivammathur/setup-php@2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: ${{ env.extensions }}
|
extensions: ${{ env.extensions }}
|
||||||
|
|||||||
14
.github/workflows/integration.yml
vendored
14
.github/workflows/integration.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
php-versions: ['8.1']
|
php-versions: ['8.1']
|
||||||
databases: ['sqlite', 'mysql', 'pgsql']
|
databases: ['sqlite', 'mysql', 'pgsql']
|
||||||
server-versions: ['stable30']
|
server-versions: ['master']
|
||||||
|
|
||||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout server
|
- name: Checkout server
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
repository: nextcloud/server
|
repository: nextcloud/server
|
||||||
ref: ${{ matrix.server-versions }}
|
ref: ${{ matrix.server-versions }}
|
||||||
@@ -66,19 +66,19 @@ jobs:
|
|||||||
cd build/integration && composer require --dev phpunit/phpunit:~9
|
cd build/integration && composer require --dev phpunit/phpunit:~9
|
||||||
|
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
path: apps/${{ env.APP_NAME }}
|
path: apps/${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Checkout activity
|
- name: Checkout activity
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
repository: nextcloud/activity
|
repository: nextcloud/activity
|
||||||
ref: ${{ matrix.server-versions }}
|
ref: ${{ matrix.server-versions }}
|
||||||
path: apps/activity
|
path: apps/activity
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@2.31.1
|
uses: shivammathur/setup-php@2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu, gd
|
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu, gd
|
||||||
@@ -112,6 +112,10 @@ jobs:
|
|||||||
working-directory: apps/${{ env.APP_NAME }}/tests/integration
|
working-directory: apps/${{ env.APP_NAME }}/tests/integration
|
||||||
run: ./run.sh
|
run: ./run.sh
|
||||||
|
|
||||||
|
- name: Print log
|
||||||
|
if: always()
|
||||||
|
run: cat data/nextcloud.log
|
||||||
|
|
||||||
- name: Query count
|
- name: Query count
|
||||||
if: ${{ matrix.databases == 'mysql' }}
|
if: ${{ matrix.databases == 'mysql' }}
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
|||||||
6
.github/workflows/lint-eslint.yml
vendored
6
.github/workflows/lint-eslint.yml
vendored
@@ -56,7 +56,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
- name: Read package.json node and npm engines version
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
||||||
@@ -66,7 +68,7 @@ jobs:
|
|||||||
fallbackNpm: '^10'
|
fallbackNpm: '^10'
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/lint-php-cs.yml
vendored
8
.github/workflows/lint-php-cs.yml
vendored
@@ -25,14 +25,16 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Get php version
|
- name: Get php version
|
||||||
id: versions
|
id: versions
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
||||||
|
|
||||||
- name: Set up php${{ steps.versions.outputs.php-available }}
|
- name: Set up php${{ steps.versions.outputs.php-min }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ steps.versions.outputs.php-min }}
|
php-version: ${{ steps.versions.outputs.php-min }}
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||||
|
|||||||
11
.github/workflows/lint-php.yml
vendored
11
.github/workflows/lint-php.yml
vendored
@@ -24,7 +24,10 @@ jobs:
|
|||||||
php-versions: ${{ steps.versions.outputs.php-versions }}
|
php-versions: ${{ steps.versions.outputs.php-versions }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Get version matrix
|
- name: Get version matrix
|
||||||
id: versions
|
id: versions
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
|
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
|
||||||
@@ -40,10 +43,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||||
|
|||||||
6
.github/workflows/lint-stylelint.yml
vendored
6
.github/workflows/lint-stylelint.yml
vendored
@@ -25,7 +25,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
- name: Read package.json node and npm engines version
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
||||||
@@ -35,7 +37,7 @@ jobs:
|
|||||||
fallbackNpm: '^10'
|
fallbackNpm: '^10'
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@@ -12,9 +12,9 @@ jobs:
|
|||||||
node-version: [14.x]
|
node-version: [14.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.2.2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Set up npm7
|
- name: Set up npm7
|
||||||
|
|||||||
20
.github/workflows/npm-audit-fix.yml
vendored
20
.github/workflows/npm-audit-fix.yml
vendored
@@ -14,6 +14,9 @@ on:
|
|||||||
# At 2:30 on Sundays
|
# At 2:30 on Sundays
|
||||||
- cron: '30 2 * * 0'
|
- cron: '30 2 * * 0'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -21,15 +24,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
branches: ['main', 'master', 'stable29', 'stable28', 'stable27']
|
branches: ['main', 'master', 'stable32', 'stable31', 'stable30']
|
||||||
|
|
||||||
name: npm-audit-fix-${{ matrix.branches }}
|
name: npm-audit-fix-${{ matrix.branches }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
id: checkout
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
|
persist-credentials: false
|
||||||
ref: ${{ matrix.branches }}
|
ref: ${{ matrix.branches }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
- name: Read package.json node and npm engines version
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
||||||
@@ -39,7 +45,7 @@ jobs:
|
|||||||
fallbackNpm: '^10'
|
fallbackNpm: '^10'
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
|
|
||||||
@@ -48,10 +54,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Fix npm audit
|
- name: Fix npm audit
|
||||||
id: npm-audit
|
id: npm-audit
|
||||||
uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0
|
uses: nextcloud-libraries/npm-audit-action@1b1728b2b4a7a78d69de65608efcf4db0e3e42d0 # v0.2.0
|
||||||
|
|
||||||
- name: Run npm ci and npm run build
|
- name: Run npm ci and npm run build
|
||||||
if: always()
|
if: steps.checkout.outcome == 'success'
|
||||||
env:
|
env:
|
||||||
CYPRESS_INSTALL_BINARY: 0
|
CYPRESS_INSTALL_BINARY: 0
|
||||||
run: |
|
run: |
|
||||||
@@ -59,8 +65,8 @@ jobs:
|
|||||||
npm run build --if-present
|
npm run build --if-present
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: always()
|
if: steps.checkout.outcome == 'success'
|
||||||
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||||
commit-message: 'fix(deps): Fix npm audit'
|
commit-message: 'fix(deps): Fix npm audit'
|
||||||
|
|||||||
10
.github/workflows/phpunit-mysql.yml
vendored
10
.github/workflows/phpunit-mysql.yml
vendored
@@ -24,7 +24,9 @@ jobs:
|
|||||||
matrix: ${{ steps.versions.outputs.sparse-matrix }}
|
matrix: ${{ steps.versions.outputs.sparse-matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Get version matrix
|
- name: Get version matrix
|
||||||
id: versions
|
id: versions
|
||||||
@@ -87,7 +89,7 @@ jobs:
|
|||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout server
|
- name: Checkout server
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -95,13 +97,13 @@ jobs:
|
|||||||
ref: ${{ matrix.server-versions }}
|
ref: ${{ matrix.server-versions }}
|
||||||
|
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: apps/${{ env.APP_NAME }}
|
path: apps/${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||||
|
|||||||
10
.github/workflows/phpunit-pgsql.yml
vendored
10
.github/workflows/phpunit-pgsql.yml
vendored
@@ -25,7 +25,9 @@ jobs:
|
|||||||
server-max: ${{ steps.versions.outputs.branches-max-list }}
|
server-max: ${{ steps.versions.outputs.branches-max-list }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Get version matrix
|
- name: Get version matrix
|
||||||
id: versions
|
id: versions
|
||||||
@@ -90,7 +92,7 @@ jobs:
|
|||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout server
|
- name: Checkout server
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -98,13 +100,13 @@ jobs:
|
|||||||
ref: ${{ matrix.server-versions }}
|
ref: ${{ matrix.server-versions }}
|
||||||
|
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: apps/${{ env.APP_NAME }}
|
path: apps/${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||||
|
|||||||
10
.github/workflows/phpunit-sqlite.yml
vendored
10
.github/workflows/phpunit-sqlite.yml
vendored
@@ -25,7 +25,9 @@ jobs:
|
|||||||
server-max: ${{ steps.versions.outputs.branches-max-list }}
|
server-max: ${{ steps.versions.outputs.branches-max-list }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Get version matrix
|
- name: Get version matrix
|
||||||
id: versions
|
id: versions
|
||||||
@@ -79,7 +81,7 @@ jobs:
|
|||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout server
|
- name: Checkout server
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -87,13 +89,13 @@ jobs:
|
|||||||
ref: ${{ matrix.server-versions }}
|
ref: ${{ matrix.server-versions }}
|
||||||
|
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
path: apps/${{ env.APP_NAME }}
|
path: apps/${{ env.APP_NAME }}
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||||
|
|||||||
7
.github/workflows/pr-feedback.yml
vendored
7
.github/workflows/pr-feedback.yml
vendored
@@ -15,12 +15,17 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '30 1 * * *'
|
- cron: '30 1 * * *'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr-feedback:
|
pr-feedback:
|
||||||
|
if: ${{ github.repository_owner == 'nextcloud' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: The get-github-handles-from-website action
|
- name: The get-github-handles-from-website action
|
||||||
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
|
uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1
|
||||||
id: scrape
|
id: scrape
|
||||||
with:
|
with:
|
||||||
website: 'https://nextcloud.com/team/'
|
website: 'https://nextcloud.com/team/'
|
||||||
|
|||||||
8
.github/workflows/psalm.yml
vendored
8
.github/workflows/psalm.yml
vendored
@@ -24,7 +24,9 @@ jobs:
|
|||||||
name: static-psalm-analysis
|
name: static-psalm-analysis
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Get php version
|
- name: Get php version
|
||||||
id: versions
|
id: versions
|
||||||
@@ -33,8 +35,8 @@ jobs:
|
|||||||
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
|
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
|
||||||
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
|
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
|
||||||
|
|
||||||
- name: Set up php${{ steps.versions.outputs.php-available }}
|
- name: Set up php${{ steps.versions.outputs.php-min }}
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: ${{ steps.versions.outputs.php-min }}
|
php-version: ${{ steps.versions.outputs.php-min }}
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||||
|
|||||||
8
.github/workflows/reuse.yml
vendored
8
.github/workflows/reuse.yml
vendored
@@ -16,10 +16,12 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
reuse-compliance-check:
|
reuse-compliance-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest-low
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: REUSE Compliance Check
|
- name: REUSE Compliance Check
|
||||||
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0
|
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
|
||||||
|
|||||||
8
.github/workflows/update-nextcloud-ocp.yml
vendored
8
.github/workflows/update-nextcloud-ocp.yml
vendored
@@ -23,13 +23,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
branches: ['main', 'master', 'stable29', 'stable28', 'stable27']
|
branches: ['main', 'master', 'stable32', 'stable31', 'stable30']
|
||||||
|
|
||||||
name: update-nextcloud-ocp-${{ matrix.branches }}
|
name: update-nextcloud-ocp-${{ matrix.branches }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- id: checkout
|
- id: checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
ref: ${{ matrix.branches }}
|
ref: ${{ matrix.branches }}
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up php8.2
|
- name: Set up php8.2
|
||||||
if: steps.checkout.outcome == 'success'
|
if: steps.checkout.outcome == 'success'
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||||
with:
|
with:
|
||||||
php-version: 8.2
|
php-version: 8.2
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: steps.checkout.outcome == 'success'
|
if: steps.checkout.outcome == 'success'
|
||||||
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||||
commit-message: 'chore(dev-deps): Bump nextcloud/ocp package'
|
commit-message: 'chore(dev-deps): Bump nextcloud/ocp package'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
/.editorconfig
|
/.editorconfig
|
||||||
/.eslintrc.js
|
/.eslintrc.js
|
||||||
/.nextcloudignore
|
/.nextcloudignore
|
||||||
/webpack.*.js
|
/webpack.js
|
||||||
/.codecov.yml
|
/.codecov.yml
|
||||||
/composer.json
|
/composer.json
|
||||||
/composer.lock
|
/composer.lock
|
||||||
@@ -26,3 +26,10 @@
|
|||||||
/package-lock.json
|
/package-lock.json
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/src/
|
/src/
|
||||||
|
/cypress/
|
||||||
|
/cypress.config.js
|
||||||
|
/.devcontainer/
|
||||||
|
/.php-cs-fixer.dist.php
|
||||||
|
/psalm.xml
|
||||||
|
/relativeci.config.js
|
||||||
|
/stylelint.config.js
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
- Adrian Missy <adrian.missy@onewavestudios.com>
|
- Adrian Missy <adrian.missy@onewavestudios.com>
|
||||||
- Alexandru Puiu <alexpuiu20@yahoo.com>
|
- Alexandru Puiu <alexpuiu20@yahoo.com>
|
||||||
|
- Arne Bartelt <arne.bartelt@gmail.com>
|
||||||
- Chandi Langecker <git@chandi.it>
|
- Chandi Langecker <git@chandi.it>
|
||||||
- Christoph Wurst <christoph@winzerhof-wurst.at>
|
- Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||||
- Gary Kim <gary@garykim.dev>
|
- Gary Kim <gary@garykim.dev>
|
||||||
|
|||||||
98
CHANGELOG.md
98
CHANGELOG.md
@@ -5,83 +5,31 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## 1.14.6
|
## 1.16.0-beta.1
|
||||||
### Fixed
|
|
||||||
* [stable30] fix: update DeleteCron to remove deleted lists by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7028
|
|
||||||
* [stable30] fix: not show Share with a Deck card for unauthorized users by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7060
|
|
||||||
* [stable30] fix: add retry and show warning on description saving error by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7090
|
|
||||||
* [stable30] fix: styling for new stack input field by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7112
|
|
||||||
* [stable30] fix:allow foreign label deletion by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7129
|
|
||||||
* [stable30] fix: acl check when delete, update board acl by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7133
|
|
||||||
|
|
||||||
## 1.14.5
|
|
||||||
### Fixed
|
|
||||||
* [stable30] Clear selected stack when selected board changed by @backportbot in https://github.com/nextcloud/deck/pull/6914
|
|
||||||
* [stable30] perf: Skip doing a query just to check if a board is deleted by @backportbot in https://github.com/nextcloud/deck/pull/6895
|
|
||||||
* [stable30] fix: only delete assignments on unshared board by @grnd-alt in https://github.com/nextcloud/deck/pull/6935
|
|
||||||
* [stable30] fix: Limit label actions to labels of the cards board by @backportbot in https://github.com/nextcloud/deck/pull/6953
|
|
||||||
|
|
||||||
### Maintenance
|
|
||||||
* Chore(deps): Bump @babel/runtime from 7.26.10 to 7.27.0 by @dependabot in https://github.com/nextcloud/deck/pull/6866
|
|
||||||
* Chore(deps): Bump dompurify from 3.2.4 to 3.2.5 by @dependabot in https://github.com/nextcloud/deck/pull/6881
|
|
||||||
* Chore(deps): Bump @nextcloud/vue from 8.23.1 to 8.24.0 by @dependabot in https://github.com/nextcloud/deck/pull/6882
|
|
||||||
* [stable30] Fix npm audit by @nextcloud-command in https://github.com/nextcloud/deck/pull/6887
|
|
||||||
* Chore(deps-dev): Bump @nextcloud/webpack-vue-config from 6.2.0 to 6.3.0 by @dependabot in https://github.com/nextcloud/deck/pull/6909
|
|
||||||
* [stable30] Fix npm audit by @nextcloud-command in https://github.com/nextcloud/deck/pull/6911
|
|
||||||
* Chore(deps): Bump @nextcloud/vue from 8.24.0 to 8.25.1 by @dependabot in https://github.com/nextcloud/deck/pull/6923
|
|
||||||
* [stable30] chore: update workflows from templates by @backportbot in https://github.com/nextcloud/deck/pull/6921
|
|
||||||
* Chore(deps): Bump @nextcloud/vue from 8.25.1 to 8.26.0 by @dependabot in https://github.com/nextcloud/deck/pull/6939
|
|
||||||
* [stable30] Fix npm audit by @nextcloud-command in https://github.com/nextcloud/deck/pull/6948
|
|
||||||
|
|
||||||
## 1.14.4
|
|
||||||
### Fixed
|
|
||||||
- fix: skip exporting a deleted card #6722
|
|
||||||
- fix: Properly show attachment extension #6673
|
|
||||||
|
|
||||||
### Maintenance
|
|
||||||
- Update nextcloud/ocp dependency #6769
|
|
||||||
- Update nextcloud/ocp dependency #6718
|
|
||||||
- Update nextcloud/ocp dependency #6700
|
|
||||||
- Update nextcloud/ocp dependency #6656
|
|
||||||
|
|
||||||
## 1.14.3
|
|
||||||
### Fixed
|
|
||||||
- fix: two close buttons on card modal @app/backportbot [#6659](https://github.com/nextcloud/deck/pull/6659)
|
|
||||||
- fix: Catch not found card @app/backportbot [#6652](https://github.com/nextcloud/deck/pull/6652)
|
|
||||||
- fix: close modal after deleting card @app/backportbot [#6619](https://github.com/nextcloud/deck/pull/6619)
|
|
||||||
- fix: Use new query builder @app/backportbot [#6612](https://github.com/nextcloud/deck/pull/6612)
|
|
||||||
- fix: new card input spacing @app/backportbot [#6576](https://github.com/nextcloud/deck/pull/6576)
|
|
||||||
- fix(sharing): list accounts with matches in email @app/backportbot [#6524](https://github.com/nextcloud/deck/pull/6524)
|
|
||||||
|
|
||||||
## 1.14.2
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- fix: board bubble preview widget [#6477](https://github.com/nextcloud/deck/pull/6477)
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Update nextcloud/ocp dependency @nextcloud-command [#6470](https://github.com/nextcloud/deck/pull/6470)
|
|
||||||
- Fix npm audit @nextcloud-command [#6450](https://github.com/nextcloud/deck/pull/6450)
|
|
||||||
|
|
||||||
## 1.14.1
|
|
||||||
### Fixed
|
|
||||||
- fix: Load archived card if URL is opened directly #6326
|
|
||||||
- Update nextcloud/ocp dependency #6322
|
|
||||||
|
|
||||||
## 1.14.0
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- feat: update default content @luka-nextcloud [#6740](https://github.com/nextcloud/deck/pull/6740)
|
||||||
|
- feat: add board import and export @luka-nextcloud [#6872](https://github.com/nextcloud/deck/pull/6872)
|
||||||
|
- feat: use outline icons @luka-nextcloud [#7114](https://github.com/nextcloud/deck/pull/7114)
|
||||||
|
- Add OCC commands for global calendar feature opt-in and opt-out in Deck @Fledermaus-20 [#7080](https://github.com/nextcloud/deck/pull/7080)
|
||||||
|
|
||||||
- export json data of commments @grnd-alt [#6119](https://github.com/nextcloud/deck/pull/6119)
|
### Fixed
|
||||||
|
- CSV export fixes @gidan80 [#6800](https://github.com/nextcloud/deck/pull/6800)
|
||||||
|
|
||||||
|
## 1.15.0-beta.1
|
||||||
|
### Fixed
|
||||||
|
- fix: Catch not found card @juliusknorr [#6646](https://github.com/nextcloud/deck/pull/6646)
|
||||||
|
- fix: Avoid failing on public dav URLs @juliusknorr [#6642](https://github.com/nextcloud/deck/pull/6642)
|
||||||
|
- fix: Proper rich object formats @juliusknorr [#6641](https://github.com/nextcloud/deck/pull/6641)
|
||||||
|
- fix(notifications): Notifier::prepare() threw \InvalidArgumentExcepti… @nickvergessen [#6623](https://github.com/nextcloud/deck/pull/6623)
|
||||||
|
- fix: close modal after deleting card @ludij [#6617](https://github.com/nextcloud/deck/pull/6617)
|
||||||
|
- fix: Use new query builder @juliusknorr [#6611](https://github.com/nextcloud/deck/pull/6611)
|
||||||
|
- fix: new card input spacing @luka-nextcloud [#6574](https://github.com/nextcloud/deck/pull/6574)
|
||||||
|
|
||||||
|
## 1.14.0-beta.1
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- fix: losing focus while editing title field @luka-nextcloud [#6140](https://github.com/nextcloud/deck/pull/6140)
|
|
||||||
- Fix UI with the new compact design [#6258](https://github.com/nextcloud/deck/pull/6258)
|
|
||||||
- Translation call fix [#6261](https://github.com/nextcloud/deck/pull/6261)
|
|
||||||
- fix: 30 design issues [#6265](https://github.com/nextcloud/deck/pull/6265)
|
|
||||||
- copy labels when moving cards between boards [#6289](https://github.com/nextcloud/deck/pull/6289)
|
|
||||||
- Bug fix collection [#6307](https://github.com/nextcloud/deck/pull/6307)
|
|
||||||
- fix: card details focus issue with screen reader @luka-nextcloud [#5858](https://github.com/nextcloud/deck/pull/5858)
|
- fix: card details focus issue with screen reader @luka-nextcloud [#5858](https://github.com/nextcloud/deck/pull/5858)
|
||||||
- Cleaning up unused indicies @mintsoft [#5612](https://github.com/nextcloud/deck/pull/5612)
|
- Cleaning up unused indicies @mintsoft [#5612](https://github.com/nextcloud/deck/pull/5612)
|
||||||
- Change import command's config default argument @JimMadge [#5722](https://github.com/nextcloud/deck/pull/5722)
|
- Change import command's config default argument @JimMadge [#5722](https://github.com/nextcloud/deck/pull/5722)
|
||||||
@@ -94,17 +42,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
- fix: remove redundant log @luka-nextcloud [#6115](https://github.com/nextcloud/deck/pull/6115)
|
- fix: remove redundant log @luka-nextcloud [#6115](https://github.com/nextcloud/deck/pull/6115)
|
||||||
- fix: Adjust dependencies to fix filepicker @susnux [#5964](https://github.com/nextcloud/deck/pull/5964)
|
- fix: Adjust dependencies to fix filepicker @susnux [#5964](https://github.com/nextcloud/deck/pull/5964)
|
||||||
- fix: Remove bindParam usage with simpler query @juliushaertl [#6065](https://github.com/nextcloud/deck/pull/6065)
|
- fix: Remove bindParam usage with simpler query @juliushaertl [#6065](https://github.com/nextcloud/deck/pull/6065)
|
||||||
- add Order when cloning board @grnd-alt [#6117](https://github.com/nextcloud/deck/pull/6117)
|
|
||||||
- use deleted_users for users that do not exist @grnd-alt [#6201](https://github.com/nextcloud/deck/pull/6201)
|
|
||||||
- chore: Clean up permission service @juliushaertl [#6011](https://github.com/nextcloud/deck/pull/6011)
|
|
||||||
|
|
||||||
### Other
|
### Other
|
||||||
|
|
||||||
- fix(files): fix appstore-build-publish.yml @JuliaKirschenheuter [#6142](https://github.com/nextcloud/deck/pull/6142)
|
|
||||||
- tests: Add environment variable and document commands to run behat tests locally @juliushaertl [#6137](https://github.com/nextcloud/deck/pull/6137)
|
|
||||||
- chore(CI): Adjust testing matrix for Nextcloud 30 on stable30 @nickvergessen [#6205](https://github.com/nextcloud/deck/pull/6205)
|
|
||||||
- Adds link to Nextcloud Deck for iOS in README.md file @StCyr [#5886](https://github.com/nextcloud/deck/pull/5886)
|
- Adds link to Nextcloud Deck for iOS in README.md file @StCyr [#5886](https://github.com/nextcloud/deck/pull/5886)
|
||||||
- choir(i18n): Change filter title @rakekniven [#5957](https://github.com/nextcloud/deck/pull/5957)
|
- choir(i18n): Change filter title @rakekniven [#5957](https://github.com/nextcloud/deck/pull/5957)
|
||||||
|
- chore: Clean up permission service @juliushaertl [#6011](https://github.com/nextcloud/deck/pull/6011)
|
||||||
- Update User_documentation_en.md @StCyr [#6029](https://github.com/nextcloud/deck/pull/6029)
|
- Update User_documentation_en.md @StCyr [#6029](https://github.com/nextcloud/deck/pull/6029)
|
||||||
- chore: Move comments event handler to use proper event dispatcher @juliushaertl [#6008](https://github.com/nextcloud/deck/pull/6008)
|
- chore: Move comments event handler to use proper event dispatcher @juliushaertl [#6008](https://github.com/nextcloud/deck/pull/6008)
|
||||||
- Migrate REUSE to TOML format @AndyScherzinger [#6084](https://github.com/nextcloud/deck/pull/6084)
|
- Migrate REUSE to TOML format @AndyScherzinger [#6084](https://github.com/nextcloud/deck/pull/6084)
|
||||||
@@ -940,3 +883,4 @@ Android app team for helping to improve our REST API:
|
|||||||
- Assign labels
|
- Assign labels
|
||||||
- Markdown notes for each card
|
- Markdown notes for each card
|
||||||
- Archive cards
|
- Archive cards
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ Deck is a kanban style organization tool aimed at personal planning and project
|
|||||||
|
|
||||||
- [Nextcloud Deck app for Android](https://github.com/stefan-niedermann/nextcloud-deck) - It is available in [F-Droid](https://f-droid.org/de/packages/it.niedermann.nextcloud.deck/) and the [Google Play Store](https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play)
|
- [Nextcloud Deck app for Android](https://github.com/stefan-niedermann/nextcloud-deck) - It is available in [F-Droid](https://f-droid.org/de/packages/it.niedermann.nextcloud.deck/) and the [Google Play Store](https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play)
|
||||||
- [Nextcloud Deck app for iOS](https://github.com/StCyr/deck-react-native) - It is available in [Apple App store](https://apps.apple.com/ml/app/nextcloud-deck/id1570892788)
|
- [Nextcloud Deck app for iOS](https://github.com/StCyr/deck-react-native) - It is available in [Apple App store](https://apps.apple.com/ml/app/nextcloud-deck/id1570892788)
|
||||||
- [deck NG for Android and iOS](https://github.com/meltzow/deck-ng) - It is available in [Google Play Store](https://play.google.com/store/apps/details?id=net.meltzow.deckng) and [Apple App Store](https://apps.apple.com/us/app/deck-ng/id6443334702)
|
|
||||||
|
|
||||||
### 3rd-Party Integrations
|
### 3rd-Party Integrations
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ SPDX-FileCopyrightText = "none"
|
|||||||
SPDX-License-Identifier = "CC0-1.0"
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = ["l10n/**.js", "l10n/**.json", "js/**.js.map", "js/**.js", "js/**.mjs", "js/**.mjs.map", "js/templates/**.handlebars", "lib/Service/Importer/fixtures/config-deckJson-schema.json", "lib/Service/Importer/fixtures/config-trelloApi-schema.json", "lib/Service/Importer/fixtures/config-trelloJson-schema.json", "screenshots/screenshot1.png", "src/assets/file-placeholder.svg", "img/favicon.ico", "img/favicon.png", "img/favicon.svg", "img/activity.svg", "img/activity-dark.svg", "img/deck.svg", "img/deck-current.svg", "img/deck-dark.svg", "img/details-white.svg", "img/card.svg"]
|
path = ["l10n/**.js", "l10n/**.json", "js/**.js.map", "js/**.js", "js/**.mjs", "js/**.mjs.map", "js/templates/**.handlebars", "lib/Service/Importer/fixtures/config-deckJson-schema.json", "lib/Service/Importer/fixtures/config-trelloApi-schema.json", "lib/Service/Importer/fixtures/config-trelloJson-schema.json", "lib/Service/fixtures/default-board.json", "screenshots/screenshot1.png", "src/assets/file-placeholder.svg", "img/favicon.ico", "img/favicon.png", "img/favicon.svg", "img/activity.svg", "img/activity-dark.svg", "img/deck.svg", "img/deck-current.svg", "img/deck-dark.svg", "img/details-white.svg", "img/card.svg", "img/sample-image.jpg"]
|
||||||
precedence = "aggregate"
|
precedence = "aggregate"
|
||||||
SPDX-FileCopyrightText = "2019 Nextcloud GmbH and Nextcloud contributors"
|
SPDX-FileCopyrightText = "2019 Nextcloud GmbH and Nextcloud contributors"
|
||||||
SPDX-License-Identifier = "AGPL-3.0-or-later"
|
SPDX-License-Identifier = "AGPL-3.0-or-later"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -20,17 +20,17 @@
|
|||||||
- 🚀 Get your project organized
|
- 🚀 Get your project organized
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
<version>1.14.6</version>
|
<version>2.0.0-dev.0</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author>Julius Härtl</author>
|
<author>Julius Härtl</author>
|
||||||
<documentation>
|
|
||||||
<user>https://deck.readthedocs.io/en/latest/User_documentation_en/</user>
|
|
||||||
<developer>https://deck.readthedocs.io/en/latest/API/</developer>
|
|
||||||
</documentation>
|
|
||||||
<namespace>Deck</namespace>
|
<namespace>Deck</namespace>
|
||||||
<types>
|
<types>
|
||||||
<dav/>
|
<dav/>
|
||||||
</types>
|
</types>
|
||||||
|
<documentation>
|
||||||
|
<user>https://deck.readthedocs.io/en/latest/User_documentation_en/</user>
|
||||||
|
<developer>https://deck.readthedocs.io/en/latest/API/</developer>
|
||||||
|
</documentation>
|
||||||
<category>organization</category>
|
<category>organization</category>
|
||||||
<category>office</category>
|
<category>office</category>
|
||||||
<website>https://github.com/nextcloud/deck</website>
|
<website>https://github.com/nextcloud/deck</website>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<database min-version="9.4">pgsql</database>
|
<database min-version="9.4">pgsql</database>
|
||||||
<database>sqlite</database>
|
<database>sqlite</database>
|
||||||
<database min-version="8.0">mysql</database>
|
<database min-version="8.0">mysql</database>
|
||||||
<nextcloud min-version="30" max-version="30"/>
|
<nextcloud min-version="33" max-version="33"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<background-jobs>
|
<background-jobs>
|
||||||
<job>OCA\Deck\Cron\DeleteCron</job>
|
<job>OCA\Deck\Cron\DeleteCron</job>
|
||||||
@@ -54,11 +54,15 @@
|
|||||||
<live-migration>
|
<live-migration>
|
||||||
<step>OCA\Deck\Migration\DeletedCircleCleanup</step>
|
<step>OCA\Deck\Migration\DeletedCircleCleanup</step>
|
||||||
</live-migration>
|
</live-migration>
|
||||||
|
<post-migration>
|
||||||
|
<step>OCA\Deck\Migration\LabelMismatchCleanup</step>
|
||||||
|
</post-migration>
|
||||||
</repair-steps>
|
</repair-steps>
|
||||||
<commands>
|
<commands>
|
||||||
<command>OCA\Deck\Command\UserExport</command>
|
<command>OCA\Deck\Command\UserExport</command>
|
||||||
<command>OCA\Deck\Command\BoardImport</command>
|
<command>OCA\Deck\Command\BoardImport</command>
|
||||||
<command>OCA\Deck\Command\TransferOwnership</command>
|
<command>OCA\Deck\Command\TransferOwnership</command>
|
||||||
|
<command>OCA\Deck\Command\CalendarToggle</command>
|
||||||
</commands>
|
</commands>
|
||||||
<activity>
|
<activity>
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -28,6 +29,7 @@ return [
|
|||||||
['name' => 'board#clone', 'url' => '/boards/{boardId}/clone', 'verb' => 'POST'],
|
['name' => 'board#clone', 'url' => '/boards/{boardId}/clone', 'verb' => 'POST'],
|
||||||
['name' => 'board#transferOwner', 'url' => '/boards/{boardId}/transferOwner', 'verb' => 'PUT'],
|
['name' => 'board#transferOwner', 'url' => '/boards/{boardId}/transferOwner', 'verb' => 'PUT'],
|
||||||
['name' => 'board#export', 'url' => '/boards/{boardId}/export', 'verb' => 'GET'],
|
['name' => 'board#export', 'url' => '/boards/{boardId}/export', 'verb' => 'GET'],
|
||||||
|
['name' => 'board#import', 'url' => '/boards/import', 'verb' => 'POST'],
|
||||||
|
|
||||||
// stacks
|
// stacks
|
||||||
['name' => 'stack#index', 'url' => '/stacks/{boardId}', 'verb' => 'GET'],
|
['name' => 'stack#index', 'url' => '/stacks/{boardId}', 'verb' => 'GET'],
|
||||||
@@ -102,6 +104,8 @@ return [
|
|||||||
['name' => 'card_api#assignUser', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/assignUser', 'verb' => 'PUT'],
|
['name' => 'card_api#assignUser', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/assignUser', 'verb' => 'PUT'],
|
||||||
['name' => 'card_api#unassignUser', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/unassignUser', 'verb' => 'PUT'],
|
['name' => 'card_api#unassignUser', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/unassignUser', 'verb' => 'PUT'],
|
||||||
['name' => 'card_api#reorder', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/reorder', 'verb' => 'PUT'],
|
['name' => 'card_api#reorder', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/reorder', 'verb' => 'PUT'],
|
||||||
|
['name' => 'card_api#archive', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/archive', 'verb' => 'PUT'],
|
||||||
|
['name' => 'card_api#unarchive', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}/unarchive', 'verb' => 'PUT'],
|
||||||
['name' => 'card_api#delete', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}', 'verb' => 'DELETE'],
|
['name' => 'card_api#delete', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/{stackId}/cards/{cardId}', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
['name' => 'card_api#findAllWithDue', 'url' => '/api/v{apiVersion}/dashboard/due', 'verb' => 'GET'],
|
['name' => 'card_api#findAllWithDue', 'url' => '/api/v{apiVersion}/dashboard/due', 'verb' => 'GET'],
|
||||||
@@ -136,6 +140,8 @@ return [
|
|||||||
['name' => 'comments_api#update', 'url' => '/api/v{apiVersion}/cards/{cardId}/comments/{commentId}', 'verb' => 'PUT'],
|
['name' => 'comments_api#update', 'url' => '/api/v{apiVersion}/cards/{cardId}/comments/{commentId}', 'verb' => 'PUT'],
|
||||||
['name' => 'comments_api#delete', 'url' => '/api/v{apiVersion}/cards/{cardId}/comments/{commentId}', 'verb' => 'DELETE'],
|
['name' => 'comments_api#delete', 'url' => '/api/v{apiVersion}/cards/{cardId}/comments/{commentId}', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
|
['name' => 'card#clone', 'url' => '/api/v{apiVersion}/cards/{cardId}/clone', 'verb' => 'POST'],
|
||||||
|
|
||||||
['name' => 'overview_api#upcomingCards', 'url' => '/api/v{apiVersion}/overview/upcoming', 'verb' => 'GET'],
|
['name' => 'overview_api#upcomingCards', 'url' => '/api/v{apiVersion}/overview/upcoming', 'verb' => 'GET'],
|
||||||
|
|
||||||
['name' => 'search#search', 'url' => '/api/v{apiVersion}/search', 'verb' => 'GET'],
|
['name' => 'search#search', 'url' => '/api/v{apiVersion}/search', 'verb' => 'GET'],
|
||||||
|
|||||||
@@ -9,31 +9,35 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"justinrainbow/json-schema": "^6.0"
|
"justinrainbow/json-schema": "^6.0",
|
||||||
|
"bamarni/composer-bin-plugin": "^1.8"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"roave/security-advisories": "dev-master",
|
"roave/security-advisories": "dev-master",
|
||||||
"phpunit/phpunit": "^9",
|
"phpunit/phpunit": "^9",
|
||||||
"nextcloud/coding-standard": "^1.1",
|
"nextcloud/coding-standard": "^1.1",
|
||||||
"nextcloud/ocp": "dev-stable30",
|
"nextcloud/ocp": "dev-master"
|
||||||
"psalm/phar": "^5.13"
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"composer/package-versions-deprecated": true
|
"composer/package-versions-deprecated": true,
|
||||||
|
"bamarni/composer-bin-plugin": true
|
||||||
},
|
},
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "8.0"
|
"php": "8.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"post-install-cmd": [
|
||||||
|
"@composer bin all install --ansi"
|
||||||
|
],
|
||||||
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
|
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
|
||||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||||
"cs:fix": "php-cs-fixer fix",
|
"cs:fix": "php-cs-fixer fix",
|
||||||
"psalm": "psalm.phar",
|
"psalm": "psalm",
|
||||||
"psalm:update-baseline": "psalm.phar --update-baseline",
|
"psalm:update-baseline": "psalm --threads=$(nproc) --no-cache --update-baseline",
|
||||||
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
|
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
|
||||||
"test": [
|
"test": [
|
||||||
"@test:unit",
|
"@test:unit",
|
||||||
"@test:integration"
|
"@test:integration"
|
||||||
|
|||||||
916
composer.lock
generated
916
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
input[type=submit].icon-confirm {
|
input[type=submit].icon-confirm {
|
||||||
border-color: var(--color-border-maxcontrast) !important;
|
border-color: var(--color-border-maxcontrast) !important;
|
||||||
|
border-style: solid;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { randUser } from '../utils/index.js'
|
import { randUser } from '../utils/index.js'
|
||||||
const user = randUser()
|
const user = randUser()
|
||||||
const recipient = randUser()
|
const recipient = randUser()
|
||||||
|
import { sampleBoard } from '../utils/sampleBoard'
|
||||||
|
|
||||||
describe('Board', function() {
|
describe('Board', function() {
|
||||||
|
|
||||||
@@ -58,3 +59,151 @@ describe('Board', function() {
|
|||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('Board cloning', function() {
|
||||||
|
before(function() {
|
||||||
|
cy.createUser(user)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Clones a board without cards', function() {
|
||||||
|
const boardName = 'Clone board original'
|
||||||
|
const board = sampleBoard(boardName)
|
||||||
|
cy.createExampleBoard({ user, board }).then((board) => {
|
||||||
|
const boardId = board.id
|
||||||
|
cy.visit(`/apps/deck/board/${boardId}`)
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + '")')
|
||||||
|
.parent()
|
||||||
|
.find('button[aria-label="Actions"]')
|
||||||
|
.click()
|
||||||
|
cy.get('button:contains("Clone board")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.modal-container button:contains("Clone")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + '")')
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + ' (copy)")')
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
cy.get('.board-title h2').contains(boardName + ' (copy)')
|
||||||
|
|
||||||
|
cy.get('h3[aria-label="TestList"]')
|
||||||
|
.should('be.visible')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Clones a board with cards', function() {
|
||||||
|
const boardName = 'Clone with cards'
|
||||||
|
const board = sampleBoard(boardName)
|
||||||
|
cy.createExampleBoard({ user, board }).then((board) => {
|
||||||
|
const boardId = board.id
|
||||||
|
cy.visit(`/apps/deck/board/${boardId}`)
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + '")')
|
||||||
|
.parent()
|
||||||
|
.find('button[aria-label="Actions"]')
|
||||||
|
.click()
|
||||||
|
cy.get('button:contains("Clone board")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.checkbox-content__text:contains("Clone cards")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.modal-container button:contains("Clone")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + '")')
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + ' (copy)")')
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
cy.get('.board-title h2').contains(boardName + ' (copy)')
|
||||||
|
|
||||||
|
cy.get('h3[aria-label="TestList"]')
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
cy.get('.card:contains("Hello world")')
|
||||||
|
.should('be.visible')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Board export', function() {
|
||||||
|
before(function() {
|
||||||
|
cy.createUser(user)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Exports a board as JSON', function() {
|
||||||
|
const boardName = 'Export JSON board'
|
||||||
|
const board = sampleBoard(boardName)
|
||||||
|
cy.createExampleBoard({ user, board }).then((board) => {
|
||||||
|
const boardId = board.id
|
||||||
|
cy.visit(`/apps/deck/board/${boardId}`)
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + '")')
|
||||||
|
.parent()
|
||||||
|
.find('button[aria-label="Actions"]')
|
||||||
|
.click()
|
||||||
|
cy.get('button:contains("Export board")')
|
||||||
|
.click()
|
||||||
|
cy.get('.modal-container .checkbox-radio-switch__text:contains("Export as JSON")')
|
||||||
|
.click()
|
||||||
|
cy.get('.modal-container button:contains("Export")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
const downloadsFolder = Cypress.config('downloadsFolder')
|
||||||
|
cy.readFile(`${downloadsFolder}/${boardName}.json`)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Exports a board as CSV', function() {
|
||||||
|
const boardName = 'Export CSV board'
|
||||||
|
const board = sampleBoard(boardName)
|
||||||
|
cy.createExampleBoard({ user, board }).then((board) => {
|
||||||
|
const boardId = board.id
|
||||||
|
cy.visit(`/apps/deck/board/${boardId}`)
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("' + boardName + '")')
|
||||||
|
.parent()
|
||||||
|
.find('button[aria-label="Actions"]')
|
||||||
|
.click()
|
||||||
|
cy.get('button:contains("Export board")')
|
||||||
|
.click()
|
||||||
|
cy.get('.modal-container .checkbox-radio-switch__text:contains("Export as CSV")')
|
||||||
|
.click()
|
||||||
|
cy.get('.modal-container button:contains("Export")')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
const downloadsFolder = Cypress.config('downloadsFolder')
|
||||||
|
cy.readFile(`${downloadsFolder}/${boardName}.csv`)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Board import', function() {
|
||||||
|
before(function () {
|
||||||
|
cy.createUser(user)
|
||||||
|
})
|
||||||
|
beforeEach(function() {
|
||||||
|
cy.login(user)
|
||||||
|
cy.visit('/apps/deck')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Imports a board from JSON', function() {
|
||||||
|
cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry:contains("Import board")')
|
||||||
|
.should('be.visible')
|
||||||
|
.click()
|
||||||
|
|
||||||
|
// Upload a JSON file
|
||||||
|
cy.get('input[type="file"]')
|
||||||
|
.selectFile([
|
||||||
|
{
|
||||||
|
contents: 'cypress/fixtures/import-board.json',
|
||||||
|
fileName: 'import-board.json',
|
||||||
|
},
|
||||||
|
], { force: true })
|
||||||
|
|
||||||
|
cy.get('.app-navigation__list .app-navigation-entry:contains("Imported board")')
|
||||||
|
.should('be.visible')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ const useModal = (useModal) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('Card', function() {
|
describe('Card', function () {
|
||||||
let boardId
|
let boardId
|
||||||
before(function() {
|
before(function () {
|
||||||
cy.createUser(user)
|
cy.createUser(user)
|
||||||
cy.login(user)
|
cy.login(user)
|
||||||
cy.createExampleBoard({
|
cy.createExampleBoard({
|
||||||
@@ -38,11 +38,11 @@ describe('Card', function() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function () {
|
||||||
cy.login(user)
|
cy.login(user)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Can add a card', function() {
|
it('Can add a card', function () {
|
||||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
const newCardTitle = 'Write some cypress tests'
|
const newCardTitle = 'Write some cypress tests'
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ describe('Card', function() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Create card from overview', function() {
|
it('Create card from overview', function () {
|
||||||
cy.visit(`/apps/deck/#/`)
|
cy.visit(`/apps/deck/#/`)
|
||||||
const newCardTitle = 'Test create from overview'
|
const newCardTitle = 'Test create from overview'
|
||||||
cy.intercept({ method: 'POST', url: '**/apps/deck/cards' }).as('save')
|
cy.intercept({ method: 'POST', url: '**/apps/deck/cards' }).as('save')
|
||||||
@@ -71,6 +71,10 @@ describe('Card', function() {
|
|||||||
|
|
||||||
cy.get('.button-vue[aria-label*="Add card"]')
|
cy.get('.button-vue[aria-label*="Add card"]')
|
||||||
.first().click()
|
.first().click()
|
||||||
|
|
||||||
|
// Somehow this avoids the electron crash
|
||||||
|
cy.wait(2000)
|
||||||
|
|
||||||
cy.get('.modal-mask.card-selector .card-title').should('be.visible').click().type(newCardTitle)
|
cy.get('.modal-mask.card-selector .card-title').should('be.visible').click().type(newCardTitle)
|
||||||
cy.get('.modal-mask.card-selector .multiselect-board').should('be.visible').click()
|
cy.get('.modal-mask.card-selector .multiselect-board').should('be.visible').click()
|
||||||
cy.get('.vs__dropdown-menu [data-cy="board-select-title"]:contains("' + boardData.title + '")').should('be.visible').click()
|
cy.get('.vs__dropdown-menu [data-cy="board-select-title"]:contains("' + boardData.title + '")').should('be.visible').click()
|
||||||
@@ -83,22 +87,85 @@ describe('Card', function() {
|
|||||||
cy.get('.modal-mask.card-selector button.button-vue--vue-primary').should('be.visible').click()
|
cy.get('.modal-mask.card-selector button.button-vue--vue-primary').should('be.visible').click()
|
||||||
cy.wait('@save', { timeout: 7000 })
|
cy.wait('@save', { timeout: 7000 })
|
||||||
|
|
||||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
|
||||||
cy.reload()
|
cy.reload()
|
||||||
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
cy.get('.board .stack').eq(0).within(() => {
|
cy.get('.board .stack').eq(0).within(() => {
|
||||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('Card with link reference', () => {
|
||||||
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
|
const absoluteUrl = `https://example.com`
|
||||||
|
cy.get('.board .stack').eq(0).within(() => {
|
||||||
|
cy.get('.button-vue[aria-label*="Add card"]')
|
||||||
|
.first().click()
|
||||||
|
|
||||||
|
cy.get('.stack__card-add form input#new-stack-input-main')
|
||||||
|
.type(absoluteUrl)
|
||||||
|
cy.get('.stack__card-add form input[type=submit]')
|
||||||
|
.first().click()
|
||||||
|
cy.get('.card:contains("Example Domain")')
|
||||||
|
.should('be.visible')
|
||||||
|
.click()
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.get('.app-sidebar-header', { timeout: 10000 })
|
||||||
|
.should('be.visible')
|
||||||
|
.find('h2').contains('Example Domain').should('be.visible')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Rename card with link', () => {
|
||||||
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
|
const absoluteUrl = `https://example.com`
|
||||||
|
const plainTitle = 'New title'
|
||||||
|
cy.get('.board .stack').eq(0).within(() => {
|
||||||
|
cy.get('.button-vue[aria-label*="Add card"]')
|
||||||
|
.first().click()
|
||||||
|
|
||||||
|
cy.get('.stack__card-add form input#new-stack-input-main')
|
||||||
|
.type(absoluteUrl)
|
||||||
|
cy.get('.stack__card-add form input[type=submit]')
|
||||||
|
.first().click()
|
||||||
|
cy.get('.card:contains("Example Domain")')
|
||||||
|
.should('be.visible')
|
||||||
|
})
|
||||||
|
|
||||||
|
// Rename link to plain title
|
||||||
|
cy.get('.card:contains("Example Domain")')
|
||||||
|
.last() // A duplicate card might be created in other test case, so we select the last one
|
||||||
|
.find('.action-item__menutoggle')
|
||||||
|
.click()
|
||||||
|
cy.get('.v-popper__popper button:contains("Edit title")')
|
||||||
|
.click()
|
||||||
|
cy.get(`h4:contains("${absoluteUrl}") span[contenteditable="true"]`)
|
||||||
|
.type(`{selectAll}${plainTitle}{enter}`)
|
||||||
|
cy.get(`.card:contains("${plainTitle}")`)
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
// Rename plain title to link
|
||||||
|
cy.get('.card:contains("New title")')
|
||||||
|
.find('.action-item__menutoggle')
|
||||||
|
.click()
|
||||||
|
cy.get('.v-popper__popper button:contains("Edit title")')
|
||||||
|
.click()
|
||||||
|
cy.get('h4:contains("New title") span[contenteditable="true"]')
|
||||||
|
.type(`{selectAll}${absoluteUrl}{enter}`)
|
||||||
|
cy.get('.board').click()
|
||||||
|
cy.get('.card:contains("Example Domain")')
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
describe('Modal', () => {
|
describe('Modal', () => {
|
||||||
beforeEach(function() {
|
beforeEach(function () {
|
||||||
cy.login(user)
|
cy.login(user)
|
||||||
useModal(true).then(() => {
|
useModal(true).then(() => {
|
||||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Can show card details modal', function() {
|
it('Can show card details modal', function () {
|
||||||
cy.getNavigationEntry(boardData.title)
|
cy.getNavigationEntry(boardData.title)
|
||||||
.first().click({ force: true })
|
.first().click({ force: true })
|
||||||
|
|
||||||
@@ -121,10 +188,11 @@ describe('Card', function() {
|
|||||||
cy.get('.file-picker__main [data-filename="welcome.txt"]', { timeout: 30000 }).should('be.visible')
|
cy.get('.file-picker__main [data-filename="welcome.txt"]', { timeout: 30000 }).should('be.visible')
|
||||||
.click()
|
.click()
|
||||||
cy.get('.dialog__actions button.button-vue--vue-primary').click()
|
cy.get('.dialog__actions button.button-vue--vue-primary').click()
|
||||||
cy.get('.attachment-list .basename').contains('welcome.txt')
|
cy.get('.attachment-list .filename').contains('welcome')
|
||||||
|
cy.get('.attachment-list .filename .extension').contains('txt')
|
||||||
})
|
})
|
||||||
|
|
||||||
it.only('Shows the modal with the editor', () => {
|
it('Shows the modal with the editor', () => {
|
||||||
cy.get('.card:contains("Hello world")').should('be.visible').click()
|
cy.get('.card:contains("Hello world")').should('be.visible').click()
|
||||||
cy.intercept({ method: 'PUT', url: '**/apps/deck/cards/*' }).as('save')
|
cy.intercept({ method: 'PUT', url: '**/apps/deck/cards/*' }).as('save')
|
||||||
cy.get('.modal__card').should('be.visible')
|
cy.get('.modal__card').should('be.visible')
|
||||||
@@ -161,9 +229,9 @@ describe('Card', function() {
|
|||||||
cy.get('.reference-picker-modal--content .reference-picker .multiselect-list').should('be.visible').contains(boardData.stacks[0].title)
|
cy.get('.reference-picker-modal--content .reference-picker .multiselect-list').should('be.visible').contains(boardData.stacks[0].title)
|
||||||
cy.get('.reference-picker-modal--content .reference-picker button.button-vue--vue-primary').should('be.visible').click()
|
cy.get('.reference-picker-modal--content .reference-picker button.button-vue--vue-primary').should('be.visible').click()
|
||||||
cy.wait('@save', { timeout: 7000 })
|
cy.wait('@save', { timeout: 7000 })
|
||||||
cy.get('.modal__card .ProseMirror').contains('/index.php/apps/deck/card/').should('be.visible')
|
cy.get('.modal__card .ProseMirror').contains('/index.php/apps/deck/card/').should('have.length', 1)
|
||||||
|
|
||||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
cy.visit(`/apps/deck/board/${boardId}`)
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.get('.board .stack').eq(0).within(() => {
|
cy.get('.board .stack').eq(0).within(() => {
|
||||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible')
|
||||||
@@ -172,7 +240,7 @@ describe('Card', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('Sidebar', () => {
|
describe('Sidebar', () => {
|
||||||
beforeEach(function() {
|
beforeEach(function () {
|
||||||
cy.login(user)
|
cy.login(user)
|
||||||
useModal(false).then(() => {
|
useModal(false).then(() => {
|
||||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
@@ -185,7 +253,7 @@ describe('Card', function() {
|
|||||||
.find('.ProseMirror h1').contains('Hello world writing more text').should('be.visible')
|
.find('.ProseMirror h1').contains('Hello world writing more text').should('be.visible')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Set a due date', function() {
|
it('Set a due date', function () {
|
||||||
const newCardTitle = 'Card with a due date'
|
const newCardTitle = 'Card with a due date'
|
||||||
|
|
||||||
cy.get('.button-vue[aria-label*="Add card"]')
|
cy.get('.button-vue[aria-label*="Add card"]')
|
||||||
@@ -223,7 +291,7 @@ describe('Card', function() {
|
|||||||
cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state]').should('not.exist')
|
cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state]').should('not.exist')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Add a label', function() {
|
it('Add a label', function () {
|
||||||
const newCardTitle = 'Card with labels'
|
const newCardTitle = 'Card with labels'
|
||||||
|
|
||||||
cy.get('.button-vue[aria-label*="Add card"]')
|
cy.get('.button-vue[aria-label*="Add card"]')
|
||||||
@@ -234,6 +302,9 @@ describe('Card', function() {
|
|||||||
.first().click()
|
.first().click()
|
||||||
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click()
|
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click()
|
||||||
|
|
||||||
|
// Add delay to ensure the events are bound
|
||||||
|
cy.wait(1000)
|
||||||
|
|
||||||
cy.get('#app-sidebar-vue [data-test="tag-selector"] .vs__dropdown-toggle').should('be.visible').click()
|
cy.get('#app-sidebar-vue [data-test="tag-selector"] .vs__dropdown-toggle').should('be.visible').click()
|
||||||
cy.get('.vs__dropdown-menu .tag:contains("Action needed")').should('be.visible').click()
|
cy.get('.vs__dropdown-menu .tag:contains("Action needed")').should('be.visible').click()
|
||||||
cy.get('.vs__dropdown-menu .tag:contains("Later")').should('be.visible').click()
|
cy.get('.vs__dropdown-menu .tag:contains("Later")').should('be.visible').click()
|
||||||
@@ -252,7 +323,7 @@ describe('Card', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('Card actions', () => {
|
describe('Card actions', () => {
|
||||||
beforeEach(function() {
|
beforeEach(function () {
|
||||||
cy.login(user)
|
cy.login(user)
|
||||||
useModal(false).then(() => {
|
useModal(false).then(() => {
|
||||||
cy.visit(`/apps/deck/#/board/${boardId}`)
|
cy.visit(`/apps/deck/#/board/${boardId}`)
|
||||||
@@ -298,5 +369,21 @@ describe('Card', function() {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('clone card', () => {
|
||||||
|
cy.intercept({ method: 'POST', url: '**/apps/deck/**/cards/*/clone' }).as('clone')
|
||||||
|
cy.get('.card:contains("Hello world")').should('be.visible').click()
|
||||||
|
cy.get('#app-sidebar-vue')
|
||||||
|
.find('.ProseMirror h1').contains('Hello world').should('be.visible')
|
||||||
|
|
||||||
|
cy.get('.app-sidebar-header .action-item__menutoggle').click()
|
||||||
|
cy.get('.v-popper__popper button:contains("Move/copy card")').click()
|
||||||
|
cy.get('.vs__dropdown-menu span[title="MyTestBoard"]').should('be.visible').click()
|
||||||
|
cy.get('[data-cy="select-stack"] .vs__dropdown-toggle').should('be.visible').click()
|
||||||
|
cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click()
|
||||||
|
cy.get('.modal-container button:contains("Copy card")').click()
|
||||||
|
cy.wait('@clone', { timeout: 7000 })
|
||||||
|
cy.get('.card:contains("Hello world")').should('have.length', 2)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ describe('Deck dashboard', function() {
|
|||||||
.should($el => expect($el.text().trim()).to.equal('Upcoming cards'))
|
.should($el => expect($el.text().trim()).to.equal('Upcoming cards'))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Can see the default "Personal Board" created for user by default', function() {
|
it('Can see the default "Welcome Board" created for user by default', function() {
|
||||||
cy.visit('/apps/deck')
|
cy.visit('/apps/deck')
|
||||||
|
|
||||||
const defaultBoard = 'Personal'
|
const defaultBoard = 'Welcome to Nextcloud Deck!'
|
||||||
|
|
||||||
cy.get('.app-navigation-entry-wrapper[icon=icon-deck]')
|
cy.get('.app-navigation-entry-wrapper[icon=icon-deck]')
|
||||||
.find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + defaultBoard + ')')
|
.find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + defaultBoard + ')')
|
||||||
|
|||||||
102
cypress/fixtures/import-board.json
Normal file
102
cypress/fixtures/import-board.json
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"boards": [
|
||||||
|
{
|
||||||
|
"id": 70,
|
||||||
|
"title": "Imported board",
|
||||||
|
"owner": "unvjrmwuag",
|
||||||
|
"color": "00ff00",
|
||||||
|
"archived": false,
|
||||||
|
"labels": [
|
||||||
|
{
|
||||||
|
"id": 293,
|
||||||
|
"title": "Finished",
|
||||||
|
"color": "31CC7C",
|
||||||
|
"boardId": 70,
|
||||||
|
"cardId": null,
|
||||||
|
"lastModified": 0,
|
||||||
|
"ETag": "cfcd208495d565ef66e7dff9f98764da"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 294,
|
||||||
|
"title": "To review",
|
||||||
|
"color": "317CCC",
|
||||||
|
"boardId": 70,
|
||||||
|
"cardId": null,
|
||||||
|
"lastModified": 0,
|
||||||
|
"ETag": "cfcd208495d565ef66e7dff9f98764da"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 295,
|
||||||
|
"title": "Action needed",
|
||||||
|
"color": "FF7A66",
|
||||||
|
"boardId": 70,
|
||||||
|
"cardId": null,
|
||||||
|
"lastModified": 0,
|
||||||
|
"ETag": "cfcd208495d565ef66e7dff9f98764da"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 296,
|
||||||
|
"title": "Later",
|
||||||
|
"color": "F1DB50",
|
||||||
|
"boardId": 70,
|
||||||
|
"cardId": null,
|
||||||
|
"lastModified": 0,
|
||||||
|
"ETag": "cfcd208495d565ef66e7dff9f98764da"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"acl": [],
|
||||||
|
"permissions": [],
|
||||||
|
"users": [],
|
||||||
|
"stacks": {
|
||||||
|
"114": {
|
||||||
|
"id": 114,
|
||||||
|
"title": "TestList",
|
||||||
|
"boardId": 70,
|
||||||
|
"deletedAt": 0,
|
||||||
|
"lastModified": 1743495533,
|
||||||
|
"cards": [
|
||||||
|
{
|
||||||
|
"id": 124,
|
||||||
|
"title": "Hello world",
|
||||||
|
"description": "# Hello world",
|
||||||
|
"descriptionPrev": null,
|
||||||
|
"stackId": 114,
|
||||||
|
"type": "plain",
|
||||||
|
"lastModified": 1743495533,
|
||||||
|
"lastEditor": null,
|
||||||
|
"createdAt": 1743495533,
|
||||||
|
"labels": [],
|
||||||
|
"assignedUsers": null,
|
||||||
|
"attachments": null,
|
||||||
|
"attachmentCount": null,
|
||||||
|
"owner": {
|
||||||
|
"primaryKey": "unvjrmwuag",
|
||||||
|
"uid": "unvjrmwuag",
|
||||||
|
"displayname": "unvjrmwuag",
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
"order": 999,
|
||||||
|
"archived": false,
|
||||||
|
"done": null,
|
||||||
|
"duedate": null,
|
||||||
|
"notified": false,
|
||||||
|
"deletedAt": 0,
|
||||||
|
"commentsUnread": 0,
|
||||||
|
"commentsCount": 0,
|
||||||
|
"relatedStack": null,
|
||||||
|
"relatedBoard": null,
|
||||||
|
"ETag": "aa85bb973089e7fbc0bbf122e926c23f"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"order": 0,
|
||||||
|
"ETag": "aa85bb973089e7fbc0bbf122e926c23f"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"activeSessions": [],
|
||||||
|
"deletedAt": 0,
|
||||||
|
"lastModified": 1743495533,
|
||||||
|
"settings": [],
|
||||||
|
"ETag": "aa85bb973089e7fbc0bbf122e926c23f"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -102,7 +102,11 @@ Cypress.Commands.add('shareBoardWithUi', (query, userId=query) => {
|
|||||||
cy.intercept({ method: 'GET', url: `**/ocs/v2.php/apps/files_sharing/api/v1/sharees?search=${query}*` }).as('fetchRecipients')
|
cy.intercept({ method: 'GET', url: `**/ocs/v2.php/apps/files_sharing/api/v1/sharees?search=${query}*` }).as('fetchRecipients')
|
||||||
cy.get('[aria-label="Open details"]').click()
|
cy.get('[aria-label="Open details"]').click()
|
||||||
cy.get('.app-sidebar').should('be.visible')
|
cy.get('.app-sidebar').should('be.visible')
|
||||||
cy.get('.select input').type(`${query}`)
|
|
||||||
|
// Add delay to ensure the events are bound
|
||||||
|
cy.wait(1000)
|
||||||
|
|
||||||
|
cy.get('.select input').click().type(`${query}`)
|
||||||
cy.wait('@fetchRecipients', { timeout: 7000 })
|
cy.wait('@fetchRecipients', { timeout: 7000 })
|
||||||
|
|
||||||
cy.get('.vs__dropdown-menu .option').first().contains(query)
|
cy.get('.vs__dropdown-menu .option').first().contains(query)
|
||||||
|
|||||||
71
docs/API.md
71
docs/API.md
@@ -6,7 +6,7 @@ The REST API provides access for authenticated users to their data inside the De
|
|||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
|
|
||||||
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`.
|
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`. This does not apply to the endpoint for uploading attachments, which consumes `multipart/form-data`.
|
||||||
- The API is located at https://nextcloud.local/index.php/apps/deck/api/v1.0
|
- The API is located at https://nextcloud.local/index.php/apps/deck/api/v1.0
|
||||||
- All request parameters are required, unless otherwise specified
|
- All request parameters are required, unless otherwise specified
|
||||||
|
|
||||||
@@ -347,6 +347,34 @@ A 403 response might be returned if the users ability to create new boards has b
|
|||||||
|
|
||||||
##### 200 Success
|
##### 200 Success
|
||||||
|
|
||||||
|
### PUT /boards/{boardId}/stacks/{stackId}/cards/{cardId}/archive - Archive a card
|
||||||
|
|
||||||
|
#### Request parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Description |
|
||||||
|
| --------- | ------- | --------------------------------------- |
|
||||||
|
| boardId | Integer | The id of the board the card belongs to |
|
||||||
|
| stackId | Integer | The id of the stack the card belongs to |
|
||||||
|
| cardId | Integer | The id of the card |
|
||||||
|
|
||||||
|
#### Response
|
||||||
|
|
||||||
|
##### 200 Success
|
||||||
|
|
||||||
|
### PUT /boards/{boardId}/stacks/{stackId}/cards/{cardId}/unarchive - Unarchive a card
|
||||||
|
|
||||||
|
#### Request parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Description |
|
||||||
|
| --------- | ------- | --------------------------------------- |
|
||||||
|
| boardId | Integer | The id of the board the card belongs to |
|
||||||
|
| stackId | Integer | The id of the stack the card belongs to |
|
||||||
|
| cardId | Integer | The id of the card |
|
||||||
|
|
||||||
|
#### Response
|
||||||
|
|
||||||
|
##### 200 Success
|
||||||
|
|
||||||
### DELETE /boards/{boardId} - Delete a board
|
### DELETE /boards/{boardId} - Delete a board
|
||||||
|
|
||||||
#### Request parameters
|
#### Request parameters
|
||||||
@@ -423,6 +451,25 @@ A 403 response might be returned if the users ability to create new boards has b
|
|||||||
|
|
||||||
##### 200 Success
|
##### 200 Success
|
||||||
|
|
||||||
|
### POST /boards/{boardId}/clone - Clone a board
|
||||||
|
|
||||||
|
Creates a copy of the board.
|
||||||
|
|
||||||
|
#### Request body
|
||||||
|
|
||||||
|
| Parameter | Type | Description |
|
||||||
|
| --------- | ------ | ---------------------------------------------------- |
|
||||||
|
| withCards | Bool | Setting if the cards should be copied (Default: false) |
|
||||||
|
| withAssignments | Bool | Setting if the card assignments should be cloned (Default: false) |
|
||||||
|
| withLabels | Bool | Setting if the card labels should be cloned (Default: false) |
|
||||||
|
| withDueDate | Bool | Setting if the card due dates should be cloned (Default: false) |
|
||||||
|
| moveCardsToLeftStack | Bool | Setting if all cards should be moved to the most left column (useful for To-Do / Doing / Done boards) (Default: false) |
|
||||||
|
| restoreArchivedCards | Bool | Setting if the archived cards should be unarchived (Default: false) |
|
||||||
|
|
||||||
|
#### Response
|
||||||
|
|
||||||
|
##### 200 Success
|
||||||
|
|
||||||
### DELETE /boards/{boardId}/acl/{aclId} - Delete an acl rule
|
### DELETE /boards/{boardId}/acl/{aclId} - Delete an acl rule
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
@@ -686,6 +733,7 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------- | --------------------------------------- |
|
| --------- | ------- | --------------------------------------- |
|
||||||
| labelId | Integer | The label id to assign to the card |
|
| labelId | Integer | The label id to assign to the card |
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
##### 200 Success
|
##### 200 Success
|
||||||
@@ -950,10 +998,12 @@ The request can fail with a bad request response for the following reasons:
|
|||||||
|
|
||||||
#### Request data
|
#### Request data
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
The request is performed as `multipart/form-data`.
|
||||||
| --------- | ------- | --------------------------------------------- |
|
|
||||||
| type | String | The type of the attachement |
|
| Parameter | Type | Description |
|
||||||
| file | Binary | File data to add as an attachment |
|
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
|
||||||
|
| type | String | The type of the attachement. Use `file` or `deck_file`. |
|
||||||
|
| file | Binary | File data to add as an attachment together with the `filename` parameter according to RFC 7578. |
|
||||||
|
|
||||||
- Prior to Deck version v1.3.0 (API v1.0), attachments were stored within deck. For this type of attachments `deck_file` was used as the default type of attachments
|
- Prior to Deck version v1.3.0 (API v1.0), attachments were stored within deck. For this type of attachments `deck_file` was used as the default type of attachments
|
||||||
- Starting with Deck version 1.3.0 (API v1.1) files are stored within the users regular Nextcloud files and the type `file` has been introduced for that
|
- Starting with Deck version 1.3.0 (API v1.1) files are stored within the users regular Nextcloud files and the type `file` has been introduced for that
|
||||||
@@ -975,12 +1025,13 @@ The request can fail with a bad request response for the following reasons:
|
|||||||
|
|
||||||
#### Request data
|
#### Request data
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
The request is performed as `multipart/form-data`.
|
||||||
| --------- | ------- | --------------------------------------------- |
|
|
||||||
| type | String | The type of the attachement |
|
| Parameter | Type | Description |
|
||||||
| file | Binary | File data to add as an attachment |
|
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
|
||||||
|
| type | String | The type of the attachement. For now only `deck_file` is supported as an attachment type. |
|
||||||
|
| file | Binary | File data to add as an attachment together with the `filename` parameter according to RFC 7578. |
|
||||||
|
|
||||||
For now only `deck_file` is supported as an attachment type.
|
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ The Deck application plugin uses the [markdown-it](https://github.com/markdown-i
|
|||||||
|
|
||||||
## Supported Markdown
|
## Supported Markdown
|
||||||
|
|
||||||
Markdown comes in may flavors. The best way to learn markdown and understand how to use it, is simply to [try it](https://markdown-it.github.io) on the original script official playground.
|
Markdown comes in many flavors. The best way to learn markdown and understand how to use it, is simply to [try it](https://markdown-it.github.io) on the original script official playground.
|
||||||
That same link offers also a comprehensive list of what is supported, and what is not - rendering it unnecessary to duplicate that content in here.
|
That same link offers also a comprehensive list of what is supported, and what is not - rendering it unnecessary to duplicate that content in here.
|
||||||
|
|
||||||
[CommonMark Markdown Reference](http://commonmark.org/help/)
|
[CommonMark Markdown Reference](http://commonmark.org/help/)
|
||||||
|
|||||||
@@ -105,17 +105,21 @@ It is possible to import from the following sources:
|
|||||||
|
|
||||||
#### Trello JSON
|
#### Trello JSON
|
||||||
|
|
||||||
Steps:
|
**Limitations:**
|
||||||
* Create the data file
|
* Comments with more than 1000 characters are placed as attached files to the card.
|
||||||
* Access Trello
|
|
||||||
* go to the board you want to export
|
|
||||||
* Follow the steps in [Trello documentation](https://help.trello.com/article/747-exporting-data-from-trello-1) and export as JSON
|
|
||||||
* Create the configuration file
|
|
||||||
* Execute the import informing the import file path, data file and source as `Trello JSON`
|
|
||||||
|
|
||||||
Create the configuration file respecting the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloJson-schema.json) for import `Trello JSON`
|
**Steps:**
|
||||||
|
1. Create the data file:
|
||||||
|
* Access Trello.
|
||||||
|
* Go to the board you want to export.
|
||||||
|
* Follow the steps in [Trello documentation](https://help.trello.com/article/747-exporting-data-from-trello-1) and export as JSON.
|
||||||
|
2. Create the configuration file.
|
||||||
|
3. Execute the import, specifying the import file path, data file, and source as `Trello JSON`.
|
||||||
|
|
||||||
|
Create the configuration file respecting the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloJson-schema.json) for importing `Trello JSON`.
|
||||||
|
|
||||||
Example configuration file:
|
Example configuration file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"owner": "admin",
|
"owner": "admin",
|
||||||
@@ -126,26 +130,22 @@ Example configuration file:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Limitations**:
|
**Additional Limitations**:
|
||||||
|
* Importing from a JSON file imports up to 1000 actions. To find out how many actions the board to be imported has, check the number of actions in the JSON.
|
||||||
Importing from a JSON file imports up to 1000 actions. To find out how many actions the board to be imported has, identify how many actions the JSON has.
|
|
||||||
|
|
||||||
#### Trello API
|
#### Trello API
|
||||||
|
|
||||||
Import using API is recommended for boards with more than 1000 actions.
|
Importing via API is recommended for boards with more than 1000 actions. Trello allows attaching links to a card, but Deck does not support this feature. Attachment links are instead added in a markdown table at the end of the description for each imported card.
|
||||||
|
|
||||||
Trello makes it possible to attach links to a card. Deck does not have this feature. Attachments and attachment links are added in a markdown table at the end of the description for every imported card that has attachments in Trello.
|
1. Get the API Key and Token [here](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#authentication-and-authorization).
|
||||||
|
2. Obtain the ID of the board you want to import by making a request to:
|
||||||
* Get the API Key and API Token [here](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#authentication-and-authorization)
|
```
|
||||||
* Get the ID of the board you want to import by making a request to:
|
https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}&fields=id,name
|
||||||
https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}&fields=id,name
|
```
|
||||||
|
3. Create the configuration file, ensuring it follows the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloApi-schema.json) for `Trello JSON`.
|
||||||
This ID you will use in the configuration file in the `board` property
|
|
||||||
* Create the configuration file
|
|
||||||
|
|
||||||
Create the configuration file respecting the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloApi-schema.json) for import `Trello JSON`
|
|
||||||
|
|
||||||
Example configuration file:
|
Example configuration file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"owner": "admin",
|
"owner": "admin",
|
||||||
|
|||||||
@@ -4,18 +4,19 @@
|
|||||||
-->
|
-->
|
||||||
## Export
|
## Export
|
||||||
|
|
||||||
Deck currently supports exporting all boards a user owns in a single JSON file. The format is based on the database schema that deck uses. It can be used to re-import boards on the same or other instances.
|
Deck currently supports exporting all boards a user owns in a single JSON file. The format is based on the database schema that Deck uses. It can be used to re-import boards on the same or other instances.
|
||||||
|
|
||||||
The export currently has some kown limitations in terms of specific data not included:
|
The export currently has some known limitations in terms of specific data not included:
|
||||||
- Activity information
|
- Activity information
|
||||||
- File attachments to deck cards
|
- File attachments to Deck cards
|
||||||
- Comments
|
- Comments
|
||||||
-
|
|
||||||
```
|
|
||||||
occ deck:export > my-file.json
|
|
||||||
```
|
|
||||||
|
|
||||||
## Import boards
|
```
|
||||||
|
occ deck:export userid > userid-deck-export.json
|
||||||
|
```
|
||||||
|
*(`userid` = username as seen in the admin user accounts page)*
|
||||||
|
|
||||||
|
## Import Boards
|
||||||
|
|
||||||
Importing can be done using the API or the `occ` `deck:import` command.
|
Importing can be done using the API or the `occ` `deck:import` command.
|
||||||
|
|
||||||
@@ -23,39 +24,57 @@ It is possible to import from the following sources:
|
|||||||
|
|
||||||
### Deck JSON
|
### Deck JSON
|
||||||
|
|
||||||
A json file that has been obtained from the above described `occ deck:export [userid]` command can be imported.
|
A JSON file that has been obtained from the above-described `occ deck:export [userid] > userid-deck-export.json` command can be imported.
|
||||||
|
|
||||||
```
|
```
|
||||||
occ deck:import my-file.json
|
occ deck:import userid-deck-export.json
|
||||||
```
|
```
|
||||||
|
|
||||||
In case you are importing from a different instance you may use an additional config file to provide custom user id mapping in case users have different identifiers.
|
You will be asked to provide a path to a config file.
|
||||||
|
|
||||||
```
|
To know what to put in there:
|
||||||
|
- Have a look at your `userid-deck-export.json`
|
||||||
|
- Near the top, you will see `"uid"` with a username.
|
||||||
|
- Search for additional `"uid"` entries to find all the usernames involved and note them.
|
||||||
|
- Search for `"acl"`, where `"uid"`s of groups are also present; note them too.
|
||||||
|
|
||||||
|
If you are importing from a different instance, you must provide custom user ID mapping in case users have different identifiers.
|
||||||
|
|
||||||
|
Create a config file, e.g., `deck-import-config-file-userid.json`, and adjust the content of this example as described above. User IDs on the new instance can be seen in the admin user accounts page.
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"owner": "admin",
|
"owner": "useridofnewownerofallboards",
|
||||||
"uidRelation": {
|
"uidRelation": {
|
||||||
"johndoe": "test-user-1"
|
"userid1onoldinstance": "userid1onnewinstance",
|
||||||
|
"userid2onoldinstance": "userid2onnewinstance",
|
||||||
|
"groupid1onoldinstance": "groupid1onnewinstance"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
After pressing enter, everything will be imported.
|
||||||
|
|
||||||
|
Additional info:
|
||||||
|
- If you export a user’s boards, all boards that the user has access to will be exported (including those shared with that user).
|
||||||
|
|
||||||
#### Trello JSON
|
#### Trello JSON
|
||||||
|
|
||||||
Limitations:
|
**Limitations:**
|
||||||
* Comments with more than 1000 characters are placed as attached files to the card.
|
* Comments with more than 1000 characters are placed as attached files to the card.
|
||||||
|
|
||||||
Steps:
|
**Steps:**
|
||||||
* Create the data file
|
1. Create the data file:
|
||||||
* Access Trello
|
* Access Trello.
|
||||||
* go to the board you want to export
|
* Go to the board you want to export.
|
||||||
* Follow the steps in [Trello documentation](https://help.trello.com/article/747-exporting-data-from-trello-1) and export as JSON
|
* Follow the steps in [Trello documentation](https://help.trello.com/article/747-exporting-data-from-trello-1) and export as JSON.
|
||||||
* Create the configuration file
|
2. Create the configuration file.
|
||||||
* Execute the import informing the import file path, data file and source as `Trello JSON`
|
3. Execute the import, specifying the import file path, data file, and source as `Trello JSON`.
|
||||||
|
|
||||||
Create the configuration file respecting the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloJson-schema.json) for import `Trello JSON`
|
Create the configuration file respecting the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloJson-schema.json) for importing `Trello JSON`.
|
||||||
|
|
||||||
Example configuration file:
|
Example configuration file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"owner": "admin",
|
"owner": "admin",
|
||||||
@@ -66,26 +85,22 @@ Example configuration file:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Limitations**:
|
**Additional Limitations**:
|
||||||
|
* Importing from a JSON file imports up to 1000 actions. To find out how many actions the board to be imported has, check the number of actions in the JSON.
|
||||||
Importing from a JSON file imports up to 1000 actions. To find out how many actions the board to be imported has, identify how many actions the JSON has.
|
|
||||||
|
|
||||||
#### Trello API
|
#### Trello API
|
||||||
|
|
||||||
Import using API is recommended for boards with more than 1000 actions.
|
Importing via API is recommended for boards with more than 1000 actions. Trello allows attaching links to a card, but Deck does not support this feature. Attachment links are instead added in a markdown table at the end of the description for each imported card.
|
||||||
|
|
||||||
Trello makes it possible to attach links to a card. Deck does not have this feature. Attachments and attachment links are added in a markdown table at the end of the description for every imported card that has attachments in Trello.
|
1. Get the API Key and Token [here](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#authentication-and-authorization).
|
||||||
|
2. Obtain the ID of the board you want to import by making a request to:
|
||||||
* Get the API Key and API Token [here](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#authentication-and-authorization)
|
```
|
||||||
* Get the ID of the board you want to import by making a request to:
|
https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}&fields=id,name
|
||||||
https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}&fields=id,name
|
```
|
||||||
|
3. Create the configuration file, ensuring it follows the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloApi-schema.json) for `Trello JSON`.
|
||||||
This ID you will use in the configuration file in the `board` property
|
|
||||||
* Create the configuration file
|
|
||||||
|
|
||||||
Create the configuration file respecting the [JSON Schema](https://github.com/nextcloud/deck/blob/main/lib/Service/Importer/fixtures/config-trelloApi-schema.json) for import `Trello JSON`
|
|
||||||
|
|
||||||
Example configuration file:
|
Example configuration file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"owner": "admin",
|
"owner": "admin",
|
||||||
|
|||||||
BIN
img/sample-image.jpg
Normal file
BIN
img/sample-image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 188 KiB |
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -100,7 +101,7 @@ class ActivityManager {
|
|||||||
StackMapper $stackMapper,
|
StackMapper $stackMapper,
|
||||||
AclMapper $aclMapper,
|
AclMapper $aclMapper,
|
||||||
IFactory $l10nFactory,
|
IFactory $l10nFactory,
|
||||||
?string $userId
|
?string $userId,
|
||||||
) {
|
) {
|
||||||
$this->manager = $manager;
|
$this->manager = $manager;
|
||||||
$this->permissionService = $permissionsService;
|
$this->permissionService = $permissionsService;
|
||||||
@@ -484,7 +485,7 @@ class ActivityManager {
|
|||||||
$objectId = $entity->getObjectId();
|
$objectId = $entity->getObjectId();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
|
throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType);
|
||||||
}
|
}
|
||||||
return $this->cardMapper->find($objectId);
|
return $this->cardMapper->find($objectId);
|
||||||
}
|
}
|
||||||
@@ -499,11 +500,11 @@ class ActivityManager {
|
|||||||
$objectId = $entity->getBoardId();
|
$objectId = $entity->getBoardId();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
|
throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType);
|
||||||
}
|
}
|
||||||
return $this->boardMapper->find($objectId);
|
return $this->boardMapper->find($objectId);
|
||||||
}
|
}
|
||||||
throw new InvalidArgumentException('No entity relation present for '. $className . ' to ' . $objectType);
|
throw new InvalidArgumentException('No entity relation present for ' . $className . ' to ' . $objectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function findDetailsForStack($stackId) {
|
private function findDetailsForStack($stackId) {
|
||||||
@@ -515,7 +516,7 @@ class ActivityManager {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function findDetailsForCard($cardId, $subject = null) {
|
private function findDetailsForCard(int $cardId, ?string $subject = null): array {
|
||||||
$card = $this->cardMapper->find($cardId);
|
$card = $this->cardMapper->find($cardId);
|
||||||
$stack = $this->stackMapper->find($card->getStackId());
|
$stack = $this->stackMapper->find($card->getStackId());
|
||||||
$board = $this->boardMapper->find($stack->getBoardId());
|
$board = $this->boardMapper->find($stack->getBoardId());
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -108,7 +109,7 @@ class DeckProvider implements IProvider {
|
|||||||
}
|
}
|
||||||
$board = [
|
$board = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $event->getObjectId(),
|
'id' => (string)$event->getObjectId(),
|
||||||
'name' => $event->getObjectName(),
|
'name' => $event->getObjectName(),
|
||||||
'link' => $this->deckUrl('/board/' . $event->getObjectId()),
|
'link' => $this->deckUrl('/board/' . $event->getObjectId()),
|
||||||
];
|
];
|
||||||
@@ -125,12 +126,12 @@ class DeckProvider implements IProvider {
|
|||||||
}
|
}
|
||||||
$card = [
|
$card = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $event->getObjectId(),
|
'id' => (string)$event->getObjectId(),
|
||||||
'name' => $event->getObjectName(),
|
'name' => $event->getObjectName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (array_key_exists('board', $subjectParams)) {
|
if (array_key_exists('board', $subjectParams)) {
|
||||||
$card['link'] = $this->cardService->getRedirectUrlForCard($event->getObjectId());
|
$card['link'] = $this->cardService->getCardUrl($event->getObjectId());
|
||||||
$event->setLink($card['link']);
|
$event->setLink($card['link']);
|
||||||
}
|
}
|
||||||
$params['card'] = $card;
|
$params['card'] = $card;
|
||||||
@@ -212,7 +213,7 @@ class DeckProvider implements IProvider {
|
|||||||
if (array_key_exists($paramName, $subjectParams)) {
|
if (array_key_exists($paramName, $subjectParams)) {
|
||||||
$params[$paramName] = [
|
$params[$paramName] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams[$paramName]['id'],
|
'id' => (string)$subjectParams[$paramName]['id'],
|
||||||
'name' => $subjectParams[$paramName]['title'],
|
'name' => $subjectParams[$paramName]['title'],
|
||||||
'link' => $this->deckUrl('/board/' . $subjectParams[$paramName]['id'] . '/'),
|
'link' => $this->deckUrl('/board/' . $subjectParams[$paramName]['id'] . '/'),
|
||||||
];
|
];
|
||||||
@@ -223,7 +224,7 @@ class DeckProvider implements IProvider {
|
|||||||
if (array_key_exists($paramName, $subjectParams)) {
|
if (array_key_exists($paramName, $subjectParams)) {
|
||||||
$params[$paramName] = [
|
$params[$paramName] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams[$paramName]['id'],
|
'id' => (string)$subjectParams[$paramName]['id'],
|
||||||
'name' => $subjectParams[$paramName]['title'],
|
'name' => $subjectParams[$paramName]['title'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -234,7 +235,7 @@ class DeckProvider implements IProvider {
|
|||||||
if (array_key_exists($paramName, $subjectParams)) {
|
if (array_key_exists($paramName, $subjectParams)) {
|
||||||
$params[$paramName] = [
|
$params[$paramName] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams[$paramName]['id'],
|
'id' => (string)$subjectParams[$paramName]['id'],
|
||||||
'name' => $subjectParams[$paramName]['data'],
|
'name' => $subjectParams[$paramName]['data'],
|
||||||
'link' => $this->urlGenerator->linkToRoute('deck.attachment.display', ['cardId' => $subjectParams['card']['id'], 'attachmentId' => $subjectParams['attachment']['id']]),
|
'link' => $this->urlGenerator->linkToRoute('deck.attachment.display', ['cardId' => $subjectParams['card']['id'], 'attachmentId' => $subjectParams['attachment']['id']]),
|
||||||
];
|
];
|
||||||
@@ -258,7 +259,7 @@ class DeckProvider implements IProvider {
|
|||||||
if (array_key_exists('label', $subjectParams)) {
|
if (array_key_exists('label', $subjectParams)) {
|
||||||
$params['label'] = [
|
$params['label'] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams['label']['id'],
|
'id' => (string)$subjectParams['label']['id'],
|
||||||
'name' => $subjectParams['label']['title']
|
'name' => $subjectParams['label']['title']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -277,7 +278,7 @@ class DeckProvider implements IProvider {
|
|||||||
} else {
|
} else {
|
||||||
$params['acl'] = [
|
$params['acl'] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams['acl']['participant'],
|
'id' => (string)$subjectParams['acl']['participant'],
|
||||||
'name' => $subjectParams['acl']['participant']
|
'name' => $subjectParams['acl']['participant']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -293,7 +294,7 @@ class DeckProvider implements IProvider {
|
|||||||
$event->setParsedMessage($comment->getMessage());
|
$event->setParsedMessage($comment->getMessage());
|
||||||
$params['comment'] = [
|
$params['comment'] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams['comment'],
|
'id' => (string)$subjectParams['comment'],
|
||||||
'name' => $comment->getMessage()
|
'name' => $comment->getMessage()
|
||||||
];
|
];
|
||||||
} catch (NotFoundException $e) {
|
} catch (NotFoundException $e) {
|
||||||
@@ -342,28 +343,28 @@ class DeckProvider implements IProvider {
|
|||||||
if (array_key_exists('before', $subjectParams)) {
|
if (array_key_exists('before', $subjectParams)) {
|
||||||
$params['before'] = [
|
$params['before'] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams['before'],
|
'id' => (string)$subjectParams['before'],
|
||||||
'name' => $subjectParams['before']
|
'name' => $subjectParams['before'] ?? ''
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (array_key_exists('after', $subjectParams)) {
|
if (array_key_exists('after', $subjectParams)) {
|
||||||
$params['after'] = [
|
$params['after'] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams['after'],
|
'id' => (string)$subjectParams['after'],
|
||||||
'name' => $subjectParams['after']
|
'name' => $subjectParams['after'] ?? ''
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (array_key_exists('card', $subjectParams) && $event->getSubject() === ActivityManager::SUBJECT_CARD_UPDATE_TITLE) {
|
if (array_key_exists('card', $subjectParams) && $event->getSubject() === ActivityManager::SUBJECT_CARD_UPDATE_TITLE) {
|
||||||
$params['card'] = [
|
$params['card'] = [
|
||||||
'type' => 'highlight',
|
'type' => 'highlight',
|
||||||
'id' => $subjectParams['after'],
|
'id' => (string)$subjectParams['after'],
|
||||||
'name' => $subjectParams['after']
|
'name' => $subjectParams['after'] ?? ''
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deckUrl($endpoint) {
|
public function deckUrl($endpoint) {
|
||||||
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . '#' . $endpoint;
|
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . trim($endpoint, '/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -15,7 +16,7 @@ class Filter implements \OCP\Activity\IFilter {
|
|||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
IL10N $l10n,
|
IL10N $l10n,
|
||||||
IURLGenerator $urlGenerator
|
IURLGenerator $urlGenerator,
|
||||||
) {
|
) {
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->urlGenerator = $urlGenerator;
|
$this->urlGenerator = $urlGenerator;
|
||||||
@@ -39,8 +40,8 @@ class Filter implements \OCP\Activity\IFilter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int whether the filter should be rather on the top or bottom of
|
* @return int whether the filter should be rather on the top or bottom of
|
||||||
* the admin section. The filters are arranged in ascending order of the
|
* the admin section. The filters are arranged in ascending order of the
|
||||||
* priority values. It is required to return a value between 0 and 100.
|
* priority values. It is required to return a value between 0 and 100.
|
||||||
* @since 11.0.0
|
* @since 11.0.0
|
||||||
*/
|
*/
|
||||||
public function getPriority(): int {
|
public function getPriority(): int {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -47,8 +48,8 @@ abstract class SettingBase extends ActivitySettings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int whether the filter should be rather on the top or bottom of
|
* @return int whether the filter should be rather on the top or bottom of
|
||||||
* the admin section. The filters are arranged in ascending order of the
|
* the admin section. The filters are arranged in ascending order of the
|
||||||
* priority values. It is required to return a value between 0 and 100.
|
* priority values. It is required to return a value between 0 and 100.
|
||||||
* @since 11.0.0
|
* @since 11.0.0
|
||||||
*/
|
*/
|
||||||
public function getPriority(): int {
|
public function getPriority(): int {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -25,8 +26,8 @@ class SettingChanges extends SettingBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int whether the filter should be rather on the top or bottom of
|
* @return int whether the filter should be rather on the top or bottom of
|
||||||
* the admin section. The filters are arranged in ascending order of the
|
* the admin section. The filters are arranged in ascending order of the
|
||||||
* priority values. It is required to return a value between 0 and 100.
|
* priority values. It is required to return a value between 0 and 100.
|
||||||
* @since 11.0.0
|
* @since 11.0.0
|
||||||
*/
|
*/
|
||||||
public function getPriority(): int {
|
public function getPriority(): int {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,6 +7,9 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Activity;
|
namespace OCA\Deck\Activity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @psalm-api SettingComment
|
||||||
|
*/
|
||||||
class SettingComment extends SettingBase {
|
class SettingComment extends SettingBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -176,7 +177,7 @@ class Application extends App implements IBootstrap {
|
|||||||
$permissionService = $this->getContainer()->get(PermissionService::class);
|
$permissionService = $this->getContainer()->get(PermissionService::class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return $permissionService->checkPermission($cardMapper, (int) $name, Acl::PERMISSION_READ);
|
return $permissionService->checkPermission($cardMapper, (int)$name, Acl::PERMISSION_READ);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -14,7 +15,7 @@ class Capabilities implements ICapability {
|
|||||||
|
|
||||||
/** @var IAppManager */
|
/** @var IAppManager */
|
||||||
private $appManager;
|
private $appManager;
|
||||||
/** @var PermissionService */
|
/** @var PermissionService */
|
||||||
private $permissionService;
|
private $permissionService;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -56,7 +57,7 @@ class ResourceProvider implements IProvider {
|
|||||||
*/
|
*/
|
||||||
public function getResourceRichObject(IResource $resource): array {
|
public function getResourceRichObject(IResource $resource): array {
|
||||||
$board = $this->getBoard($resource);
|
$board = $this->getBoard($resource);
|
||||||
$link = $this->urlGenerator->linkToRoute('deck.page.index') . '#/board/' . $resource->getId();
|
$link = $this->urlGenerator->linkToRoute('deck.page.indexBoard', ['boardId' => $resource->getId()]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'type' => self::RESOURCE_TYPE,
|
'type' => self::RESOURCE_TYPE,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -65,7 +66,10 @@ class ResourceProviderCard implements IProvider {
|
|||||||
throw new ResourceException('No unique card found for resource, this should never happen');
|
throw new ResourceException('No unique card found for resource, this should never happen');
|
||||||
}
|
}
|
||||||
|
|
||||||
$link = $this->urlGenerator->linkToRoute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $resource->getId();
|
$link = $this->urlGenerator->linkToRoute('deck.page.indexCard', [
|
||||||
|
'boardId' => $board->getId(),
|
||||||
|
'cardId' => $card->getId()
|
||||||
|
]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'type' => self::RESOURCE_TYPE,
|
'type' => self::RESOURCE_TYPE,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -15,7 +16,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
|
|
||||||
class BoardImport extends Command {
|
class BoardImport extends Command {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private BoardImportCommandService $boardImportCommandService
|
private BoardImportCommandService $boardImportCommandService,
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|||||||
67
lib/Command/CalendarToggle.php
Normal file
67
lib/Command/CalendarToggle.php
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
namespace OCA\Deck\Command;
|
||||||
|
|
||||||
|
use OCP\IConfig;
|
||||||
|
use OCP\IUserManager;
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
|
class CalendarToggle extends Command {
|
||||||
|
private IUserManager $userManager;
|
||||||
|
private IConfig $config;
|
||||||
|
|
||||||
|
public function __construct(IUserManager $userManager, IConfig $config) {
|
||||||
|
parent::__construct();
|
||||||
|
$this->userManager = $userManager;
|
||||||
|
$this->config = $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function configure() {
|
||||||
|
$this
|
||||||
|
->setName('deck:calendar-toggle')
|
||||||
|
->setDescription('Enable or disable Deck calendar/tasks integration for all existing users. Users can still change their own setting afterwards. Only affects users that already exist at the time of execution.')
|
||||||
|
->addOption(
|
||||||
|
'on',
|
||||||
|
null,
|
||||||
|
InputOption::VALUE_NONE,
|
||||||
|
'Enable calendar/tasks integration for all existing users (users can opt-out later)'
|
||||||
|
)
|
||||||
|
->addOption(
|
||||||
|
'off',
|
||||||
|
null,
|
||||||
|
InputOption::VALUE_NONE,
|
||||||
|
'Disable calendar/tasks integration for all existing users (users can opt-in later)'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int {
|
||||||
|
$enable = $input->getOption('on');
|
||||||
|
$disable = $input->getOption('off');
|
||||||
|
if ($enable && $disable) {
|
||||||
|
$output->writeln('<error>Cannot use --on and --off together.</error>');
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (!$enable && !$disable) {
|
||||||
|
$output->writeln('<error>Please specify either --on or --off.</error>');
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
$value = $enable ? 'yes' : '';
|
||||||
|
$users = $this->userManager->search('');
|
||||||
|
$count = 0;
|
||||||
|
foreach ($users as $user) {
|
||||||
|
$uid = $user->getUID();
|
||||||
|
$this->config->setUserValue($uid, 'deck', 'calendar', $value);
|
||||||
|
$output->writeln("Set calendar integration to '" . ($enable ? 'on' : 'off') . "' for user: $uid");
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
$output->writeln("Done. Updated $count existing users.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -72,17 +73,17 @@ final class TransferOwnership extends Command {
|
|||||||
try {
|
try {
|
||||||
$board = $boardId ? $this->boardMapper->find($boardId) : null;
|
$board = $boardId ? $this->boardMapper->find($boardId) : null;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$output->writeln("Could not find a board for the provided id.");
|
$output->writeln('Could not find a board for the provided id.');
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($boardId !== null && $board->getOwner() !== $owner) {
|
if ($boardId !== null && $board->getOwner() !== $owner) {
|
||||||
$output->writeln("$owner is not the owner of the board $boardId (" . $board->getTitle() . ")");
|
$output->writeln("$owner is not the owner of the board $boardId (" . $board->getTitle() . ')');
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($boardId) {
|
if ($boardId) {
|
||||||
$output->writeln("Transfer board " . $board->getTitle() . " from ". $board->getOwner() ." to $newOwner");
|
$output->writeln('Transfer board ' . $board->getTitle() . ' from ' . $board->getOwner() . " to $newOwner");
|
||||||
} else {
|
} else {
|
||||||
$output->writeln("Transfer all boards from $owner to $newOwner");
|
$output->writeln("Transfer all boards from $owner to $newOwner");
|
||||||
}
|
}
|
||||||
@@ -94,12 +95,12 @@ final class TransferOwnership extends Command {
|
|||||||
|
|
||||||
if ($boardId) {
|
if ($boardId) {
|
||||||
$this->boardService->transferBoardOwnership($boardId, $newOwner, $remapAssignment);
|
$this->boardService->transferBoardOwnership($boardId, $newOwner, $remapAssignment);
|
||||||
$output->writeln("<info>Board " . $board->getTitle() . " from ". $board->getOwner() ." transferred to $newOwner completed</info>");
|
$output->writeln('<info>Board ' . $board->getTitle() . ' from ' . $board->getOwner() . " transferred to $newOwner completed</info>");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->boardService->transferOwnership($owner, $newOwner, $remapAssignment) as $board) {
|
foreach ($this->boardService->transferOwnership($owner, $newOwner, $remapAssignment) as $board) {
|
||||||
$output->writeln(" - " . $board->getTitle() . " transferred");
|
$output->writeln(' - ' . $board->getTitle() . ' transferred');
|
||||||
}
|
}
|
||||||
$output->writeln("<info>All boards from $owner to $newOwner transferred</info>");
|
$output->writeln("<info>All boards from $owner to $newOwner transferred</info>");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
|
use OCA\Deck\Db\Attachment;
|
||||||
use OCA\Deck\Service\AttachmentService;
|
use OCA\Deck\Service\AttachmentService;
|
||||||
use OCP\AppFramework\ApiController;
|
use OCP\AppFramework\ApiController;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\CORS;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@@ -20,72 +25,52 @@ class AttachmentApiController extends ApiController {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
public function getAll(string $apiVersion): DataResponse {
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function getAll($apiVersion) {
|
|
||||||
$attachment = $this->attachmentService->findAll($this->request->getParam('cardId'), true);
|
$attachment = $this->attachmentService->findAll($this->request->getParam('cardId'), true);
|
||||||
if ($apiVersion === '1.0') {
|
if ($apiVersion === '1.0') {
|
||||||
$attachment = array_filter($attachment, function ($attachment) {
|
$attachment = array_filter($attachment, fn (Attachment $attachment): bool => $attachment->getType() === 'deck_file');
|
||||||
return $attachment->getType() === 'deck_file';
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return new DataResponse($attachment, HTTP::STATUS_OK);
|
return new DataResponse($attachment, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
public function display(int $cardId, int $attachmentId, string $type = 'deck_file') {
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function display($cardId, $attachmentId, $type = 'deck_file') {
|
|
||||||
return $this->attachmentService->display($cardId, $attachmentId, $type);
|
return $this->attachmentService->display($cardId, $attachmentId, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
public function create(int $cardId, string $type, string $data): DataResponse {
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function create($cardId, $type, $data) {
|
|
||||||
$attachment = $this->attachmentService->create($cardId, $type, $data);
|
$attachment = $this->attachmentService->create($cardId, $type, $data);
|
||||||
return new DataResponse($attachment, HTTP::STATUS_OK);
|
return new DataResponse($attachment, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
public function update(int $cardId, int $attachmentId, string $data, string $type = 'deck_file'): DataResponse {
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function update($cardId, $attachmentId, $data, $type = 'deck_file') {
|
|
||||||
$attachment = $this->attachmentService->update($cardId, $attachmentId, $data, $type);
|
$attachment = $this->attachmentService->update($cardId, $attachmentId, $data, $type);
|
||||||
return new DataResponse($attachment, HTTP::STATUS_OK);
|
return new DataResponse($attachment, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
public function delete(int $cardId, int $attachmentId, string $type = 'deck_file'): DataResponse {
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function delete($cardId, $attachmentId, $type = 'deck_file') {
|
|
||||||
$attachment = $this->attachmentService->delete($cardId, $attachmentId, $type);
|
$attachment = $this->attachmentService->delete($cardId, $attachmentId, $type);
|
||||||
return new DataResponse($attachment, HTTP::STATUS_OK);
|
return new DataResponse($attachment, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
public function restore(int $cardId, int $attachmentId, string $type = 'deck_file'): DataResponse {
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function restore($cardId, $attachmentId, $type = 'deck_file') {
|
|
||||||
$attachment = $this->attachmentService->restore($cardId, $attachmentId, $type);
|
$attachment = $this->attachmentService->restore($cardId, $attachmentId, $type);
|
||||||
return new DataResponse($attachment, HTTP::STATUS_OK);
|
return new DataResponse($attachment, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,8 +7,13 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
|
use OCA\Deck\BadRequestException;
|
||||||
|
use OCA\Deck\Db\Attachment;
|
||||||
use OCA\Deck\Service\AttachmentService;
|
use OCA\Deck\Service\AttachmentService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
|
use OCP\AppFramework\Http\Response;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class AttachmentController extends Controller {
|
class AttachmentController extends Controller {
|
||||||
@@ -19,74 +25,66 @@ class AttachmentController extends Controller {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function getAll(int $cardId): array {
|
||||||
*/
|
|
||||||
public function getAll($cardId) {
|
|
||||||
return $this->attachmentService->findAll($cardId, true);
|
return $this->attachmentService->findAll($cardId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $cardId
|
|
||||||
* @param $attachmentId
|
|
||||||
* @NoCSRFRequired
|
|
||||||
* @NoAdminRequired
|
|
||||||
* @return \OCP\AppFramework\Http\Response
|
|
||||||
* @throws \OCA\Deck\NotFoundException
|
* @throws \OCA\Deck\NotFoundException
|
||||||
*/
|
*/
|
||||||
public function display($cardId, $attachmentId) {
|
#[NoAdminRequired]
|
||||||
if (!str_contains($attachmentId, ':')) {
|
#[NoCSRFRequired]
|
||||||
$type = 'deck_file';
|
public function display(int $cardId, string $attachmentId): Response {
|
||||||
} else {
|
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
|
||||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
|
||||||
}
|
|
||||||
return $this->attachmentService->display($cardId, $attachmentId, $type);
|
return $this->attachmentService->display($cardId, $attachmentId, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function create(int $cardId): Attachment {
|
||||||
*/
|
|
||||||
public function create($cardId) {
|
|
||||||
return $this->attachmentService->create(
|
return $this->attachmentService->create(
|
||||||
$cardId,
|
$cardId,
|
||||||
$this->request->getParam('type'),
|
$this->request->getParam('type'),
|
||||||
$this->request->getParam('data')
|
$this->request->getParam('data') ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function update(int $cardId, string $attachmentId): Attachment {
|
||||||
*/
|
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
|
||||||
public function update($cardId, $attachmentId) {
|
return $this->attachmentService->update($cardId, $attachmentId, $this->request->getParam('data') ?? '', $type);
|
||||||
if (!str_contains($attachmentId, ':')) {
|
|
||||||
$type = 'deck_file';
|
|
||||||
} else {
|
|
||||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
|
||||||
}
|
|
||||||
return $this->attachmentService->update($cardId, $attachmentId, $this->request->getParam('data'), $type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function delete(int $cardId, string $attachmentId): Attachment {
|
||||||
*/
|
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
|
||||||
public function delete($cardId, $attachmentId) {
|
|
||||||
if (!str_contains($attachmentId, ':')) {
|
|
||||||
$type = 'deck_file';
|
|
||||||
} else {
|
|
||||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
|
||||||
}
|
|
||||||
return $this->attachmentService->delete($cardId, $attachmentId, $type);
|
return $this->attachmentService->delete($cardId, $attachmentId, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[NoAdminRequired]
|
||||||
|
public function restore(int $cardId, string $attachmentId): Attachment {
|
||||||
|
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
|
||||||
|
return $this->attachmentService->restore($cardId, $attachmentId, $type);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return array{type: string, attachmentId: int}
|
||||||
|
* @throws BadRequestException
|
||||||
*/
|
*/
|
||||||
public function restore($cardId, $attachmentId) {
|
private function extractTypeAndAttachmentId(string $attachmentId): array {
|
||||||
if (!str_contains($attachmentId, ':')) {
|
if (!str_contains($attachmentId, ':')) {
|
||||||
$type = 'deck_file';
|
$type = 'deck_file';
|
||||||
} else {
|
} else {
|
||||||
[$type, $attachmentId] = explode(':', $attachmentId);
|
[$type, $attachmentId] = [...explode(':', $attachmentId), '', ''];
|
||||||
}
|
}
|
||||||
return $this->attachmentService->restore($cardId, $attachmentId, $type);
|
|
||||||
|
if ($type === '' || !is_numeric($attachmentId)) {
|
||||||
|
throw new BadRequestException('Invalid attachment id');
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'type' => $type,
|
||||||
|
'attachmentId' => (int)$attachmentId,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -11,10 +12,13 @@ use OCA\Deck\Service\BoardService;
|
|||||||
use OCA\Deck\StatusException;
|
use OCA\Deck\StatusException;
|
||||||
use OCP\AppFramework\ApiController;
|
use OCP\AppFramework\ApiController;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\CORS;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
|
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use Sabre\HTTP\Util;
|
|
||||||
|
use function Sabre\HTTP\parseDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BoardApiController
|
* Class BoardApiController
|
||||||
@@ -35,21 +39,18 @@ class BoardApiController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* Return all the boards that the current user has access to.
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Return all of the boards that the current user has access to.
|
|
||||||
*
|
|
||||||
* @param bool $details
|
|
||||||
* @throws StatusException
|
* @throws StatusException
|
||||||
*/
|
*/
|
||||||
public function index(bool $details = false) {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function index(bool $details = false): DataResponse {
|
||||||
$modified = $this->request->getHeader('If-Modified-Since');
|
$modified = $this->request->getHeader('If-Modified-Since');
|
||||||
if ($modified === null || $modified === '') {
|
if ($modified === '') {
|
||||||
$boards = $this->boardService->findAll(0, $details === true);
|
$boards = $this->boardService->findAll(0, $details === true);
|
||||||
} else {
|
} else {
|
||||||
$date = Util::parseHTTPDate($modified);
|
$date = parseDate($modified);
|
||||||
if (!$date) {
|
if (!$date) {
|
||||||
throw new StatusException('Invalid If-Modified-Since header provided.');
|
throw new StatusException('Invalid If-Modified-Since header provided.');
|
||||||
}
|
}
|
||||||
@@ -63,14 +64,12 @@ class BoardApiController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Return the board specified by $this->request->getParam('boardId').
|
* Return the board specified by $this->request->getParam('boardId').
|
||||||
*/
|
*/
|
||||||
public function get() {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function get(): DataResponse {
|
||||||
$board = $this->boardService->find($this->request->getParam('boardId'));
|
$board = $this->boardService->find($this->request->getParam('boardId'));
|
||||||
$response = new DataResponse($board, HTTP::STATUS_OK);
|
$response = new DataResponse($board, HTTP::STATUS_OK);
|
||||||
$response->setETag($board->getEtag());
|
$response->setETag($board->getEtag());
|
||||||
@@ -78,68 +77,53 @@ class BoardApiController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @params $title
|
|
||||||
* @params $color
|
|
||||||
*
|
|
||||||
* Create a board with the specified title and color.
|
* Create a board with the specified title and color.
|
||||||
*/
|
*/
|
||||||
public function create($title, $color) {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function create(string $title, string $color): DataResponse {
|
||||||
$board = $this->boardService->create($title, $this->userId, $color);
|
$board = $this->boardService->create($title, $this->userId, $color);
|
||||||
return new DataResponse($board, HTTP::STATUS_OK);
|
return new DataResponse($board, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @params $title
|
|
||||||
* @params $color
|
|
||||||
* @params $archived
|
|
||||||
*
|
|
||||||
* Update a board with the specified boardId, title and color, and archived state.
|
* Update a board with the specified boardId, title and color, and archived state.
|
||||||
*/
|
*/
|
||||||
public function update($title, $color, $archived = false) {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function update(string $title, string $color, bool $archived = false): DataResponse {
|
||||||
$board = $this->boardService->update($this->request->getParam('boardId'), $title, $color, $archived);
|
$board = $this->boardService->update($this->request->getParam('boardId'), $title, $color, $archived);
|
||||||
return new DataResponse($board, HTTP::STATUS_OK);
|
return new DataResponse($board, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Delete the board specified by $boardId. Return the board that was deleted.
|
* Delete the board specified by $boardId. Return the board that was deleted.
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function delete(): DataResponse {
|
||||||
$board = $this->boardService->delete($this->request->getParam('boardId'));
|
$board = $this->boardService->delete($this->request->getParam('boardId'));
|
||||||
return new DataResponse($board, HTTP::STATUS_OK);
|
return new DataResponse($board, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Undo the deletion of the board specified by $boardId.
|
* Undo the deletion of the board specified by $boardId.
|
||||||
*/
|
*/
|
||||||
public function undoDelete() {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function undoDelete(): DataResponse {
|
||||||
$board = $this->boardService->deleteUndo($this->request->getParam('boardId'));
|
$board = $this->boardService->deleteUndo($this->request->getParam('boardId'));
|
||||||
return new DataResponse($board, HTTP::STATUS_OK);
|
return new DataResponse($board, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[NoCSRFRequired]
|
||||||
* @CORS
|
#[CORS]
|
||||||
* @NoCSRFRequired
|
public function addAcl(int $boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage) {
|
||||||
*/
|
|
||||||
public function addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage) {
|
|
||||||
$acl = $this->boardService->addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage);
|
$acl = $this->boardService->addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage);
|
||||||
return new DataResponse($acl, HTTP::STATUS_OK);
|
return new DataResponse($acl, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
@@ -163,4 +147,13 @@ class BoardApiController extends ApiController {
|
|||||||
$acl = $this->boardService->deleteAcl($aclId);
|
$acl = $this->boardService->deleteAcl($aclId);
|
||||||
return new DataResponse($acl, HTTP::STATUS_OK);
|
return new DataResponse($acl, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
*/
|
||||||
|
public function clone(int $boardId, bool $withCards = false, bool $withAssignments = false, bool $withLabels = false, bool $withDueDate = false, bool $moveCardsToLeftStack = false, bool $restoreArchivedCards = false): DataResponse {
|
||||||
|
return new DataResponse(
|
||||||
|
$this->boardService->clone($boardId, $this->userId, $withCards, $withAssignments, $withLabels, $withDueDate, $moveCardsToLeftStack, $restoreArchivedCards)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -9,10 +10,13 @@ namespace OCA\Deck\Controller;
|
|||||||
use OCA\Deck\Db\Acl;
|
use OCA\Deck\Db\Acl;
|
||||||
use OCA\Deck\Db\Board;
|
use OCA\Deck\Db\Board;
|
||||||
use OCA\Deck\Service\BoardService;
|
use OCA\Deck\Service\BoardService;
|
||||||
|
use OCA\Deck\Service\Importer\BoardImportService;
|
||||||
use OCA\Deck\Service\PermissionService;
|
use OCA\Deck\Service\PermissionService;
|
||||||
use OCP\AppFramework\ApiController;
|
use OCP\AppFramework\ApiController;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
|
use OCP\IL10N;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class BoardController extends ApiController {
|
class BoardController extends ApiController {
|
||||||
@@ -21,73 +25,45 @@ class BoardController extends ApiController {
|
|||||||
IRequest $request,
|
IRequest $request,
|
||||||
private BoardService $boardService,
|
private BoardService $boardService,
|
||||||
private PermissionService $permissionService,
|
private PermissionService $permissionService,
|
||||||
|
private BoardImportService $boardImportService,
|
||||||
|
private IL10N $l10n,
|
||||||
private $userId,
|
private $userId,
|
||||||
) {
|
) {
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
|
||||||
*/
|
|
||||||
public function index() {
|
public function index() {
|
||||||
return $this->boardService->findAll();
|
return $this->boardService->findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function read(int $boardId): Board {
|
||||||
* @param $boardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function read(int $boardId) {
|
|
||||||
return $this->boardService->find($boardId);
|
return $this->boardService->find($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function create(string $title, string $color): Board {
|
||||||
* @param $title
|
|
||||||
* @param $color
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function create($title, $color) {
|
|
||||||
return $this->boardService->create($title, $this->userId, $color);
|
return $this->boardService->create($title, $this->userId, $color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function update(int $id, string $title, string $color, bool $archived): Board {
|
||||||
* @param $id
|
|
||||||
* @param $title
|
|
||||||
* @param $color
|
|
||||||
* @param $archived
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function update($id, $title, $color, $archived) {
|
|
||||||
return $this->boardService->update($id, $title, $color, $archived);
|
return $this->boardService->update($id, $title, $color, $archived);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function delete(int $boardId): Board {
|
||||||
* @param $boardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function delete($boardId) {
|
|
||||||
return $this->boardService->delete($boardId);
|
return $this->boardService->delete($boardId);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @NoAdminRequired
|
#[NoAdminRequired]
|
||||||
* @param $boardId
|
public function deleteUndo(int $boardId): Board {
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function deleteUndo($boardId) {
|
|
||||||
return $this->boardService->deleteUndo($boardId);
|
return $this->boardService->deleteUndo($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function getUserPermissions(int $boardId): array {
|
||||||
* @param $boardId
|
|
||||||
* @return array|bool
|
|
||||||
* @internal param $userId
|
|
||||||
*/
|
|
||||||
public function getUserPermissions($boardId) {
|
|
||||||
$permissions = $this->permissionService->getPermissions($boardId);
|
$permissions = $this->permissionService->getPermissions($boardId);
|
||||||
return [
|
return [
|
||||||
'PERMISSION_READ' => $permissions[Acl::PERMISSION_READ],
|
'PERMISSION_READ' => $permissions[Acl::PERMISSION_READ],
|
||||||
@@ -98,16 +74,10 @@ class BoardController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @param $boardId
|
|
||||||
* @param $type
|
|
||||||
* @param $participant
|
* @param $participant
|
||||||
* @param $permissionEdit
|
|
||||||
* @param $permissionShare
|
|
||||||
* @param $permissionManage
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
*/
|
||||||
public function addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage) {
|
#[NoAdminRequired]
|
||||||
|
public function addAcl(int $boardId, int $type, $participant, bool $permissionEdit, bool $permissionShare, bool $permissionManage): Acl {
|
||||||
return $this->boardService->addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage);
|
return $this->boardService->addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,11 +104,11 @@ class BoardController extends ApiController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
* @param $boardId
|
|
||||||
* @return Board
|
|
||||||
*/
|
*/
|
||||||
public function clone($boardId) {
|
public function clone(int $boardId, bool $withCards = false, bool $withAssignments = false, bool $withLabels = false, bool $withDueDate = false, bool $moveCardsToLeftStack = false, bool $restoreArchivedCards = false): DataResponse {
|
||||||
return $this->boardService->clone($boardId, $this->userId);
|
return new DataResponse(
|
||||||
|
$this->boardService->clone($boardId, $this->userId, $withCards, $withAssignments, $withLabels, $withDueDate, $moveCardsToLeftStack, $restoreArchivedCards)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -162,4 +132,62 @@ class BoardController extends ApiController {
|
|||||||
public function export($boardId) {
|
public function export($boardId) {
|
||||||
return $this->boardService->export($boardId);
|
return $this->boardService->export($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
*/
|
||||||
|
public function import(): DataResponse {
|
||||||
|
$file = $this->request->getUploadedFile('file');
|
||||||
|
$error = null;
|
||||||
|
$phpFileUploadErrors = [
|
||||||
|
UPLOAD_ERR_OK => $this->l10n->t('The file was uploaded'),
|
||||||
|
UPLOAD_ERR_INI_SIZE => $this->l10n->t('The uploaded file exceeds the upload_max_filesize directive in php.ini'),
|
||||||
|
UPLOAD_ERR_FORM_SIZE => $this->l10n->t('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'),
|
||||||
|
UPLOAD_ERR_PARTIAL => $this->l10n->t('The file was only partially uploaded'),
|
||||||
|
UPLOAD_ERR_NO_FILE => $this->l10n->t('No file was uploaded'),
|
||||||
|
UPLOAD_ERR_NO_TMP_DIR => $this->l10n->t('Missing a temporary folder'),
|
||||||
|
UPLOAD_ERR_CANT_WRITE => $this->l10n->t('Could not write file to disk'),
|
||||||
|
UPLOAD_ERR_EXTENSION => $this->l10n->t('A PHP extension stopped the file upload'),
|
||||||
|
];
|
||||||
|
|
||||||
|
if (empty($file)) {
|
||||||
|
$error = $this->l10n->t('No file uploaded or file size exceeds maximum of %s', [\OCP\Util::humanFileSize(\OCP\Util::uploadLimit())]);
|
||||||
|
}
|
||||||
|
if (!empty($file) && array_key_exists('error', $file) && $file['error'] !== UPLOAD_ERR_OK) {
|
||||||
|
$error = $phpFileUploadErrors[$file['error']];
|
||||||
|
}
|
||||||
|
if (!empty($file) && $file['error'] === UPLOAD_ERR_OK && !in_array($file['type'], ['application/json', 'text/plain'])) {
|
||||||
|
$error = $this->l10n->t('Invalid file type. Only JSON files are allowed.');
|
||||||
|
}
|
||||||
|
if ($error !== null) {
|
||||||
|
return new DataResponse([
|
||||||
|
'status' => 'error',
|
||||||
|
'message' => $error,
|
||||||
|
], Http::STATUS_BAD_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$fileContent = file_get_contents($file['tmp_name']);
|
||||||
|
$this->boardImportService->setSystem('DeckJson');
|
||||||
|
$config = new \stdClass();
|
||||||
|
$config->owner = $this->userId;
|
||||||
|
$this->boardImportService->setConfigInstance($config);
|
||||||
|
$this->boardImportService->setData(json_decode($fileContent));
|
||||||
|
$this->boardImportService->import();
|
||||||
|
$importedBoard = $this->boardImportService->getBoard();
|
||||||
|
$board = $this->boardService->find($importedBoard->getId());
|
||||||
|
|
||||||
|
return new DataResponse($board, Http::STATUS_OK);
|
||||||
|
} catch (\TypeError $e) {
|
||||||
|
return new DataResponse([
|
||||||
|
'status' => 'error',
|
||||||
|
'message' => $this->l10n->t('Invalid JSON data'),
|
||||||
|
], Http::STATUS_BAD_REQUEST);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return new DataResponse([
|
||||||
|
'status' => 'error',
|
||||||
|
'message' => $this->l10n->t('Failed to import board'),
|
||||||
|
], Http::STATUS_BAD_REQUEST);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -8,6 +9,9 @@ namespace OCA\Deck\Controller;
|
|||||||
|
|
||||||
use OCA\Deck\Service\Importer\BoardImportService;
|
use OCA\Deck\Service\Importer\BoardImportService;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\CORS;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\AppFramework\OCSController;
|
use OCP\AppFramework\OCSController;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
@@ -22,11 +26,9 @@ class BoardImportApiController extends OCSController {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
|
||||||
*/
|
|
||||||
public function import(string $system, array $config, array $data): DataResponse {
|
public function import(string $system, array $config, array $data): DataResponse {
|
||||||
$this->boardImportService->setSystem($system);
|
$this->boardImportService->setSystem($system);
|
||||||
$config = json_decode(json_encode($config));
|
$config = json_decode(json_encode($config));
|
||||||
@@ -37,21 +39,17 @@ class BoardImportApiController extends OCSController {
|
|||||||
return new DataResponse($this->boardImportService->getBoard(), Http::STATUS_OK);
|
return new DataResponse($this->boardImportService->getBoard(), Http::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
|
||||||
*/
|
|
||||||
public function getAllowedSystems(): DataResponse {
|
public function getAllowedSystems(): DataResponse {
|
||||||
$allowedSystems = $this->boardImportService->getAllowedImportSystems();
|
$allowedSystems = $this->boardImportService->getAllowedImportSystems();
|
||||||
return new DataResponse($allowedSystems, Http::STATUS_OK);
|
return new DataResponse($allowedSystems, Http::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
#[CORS]
|
||||||
* @CORS
|
#[NoCSRFRequired]
|
||||||
* @NoCSRFRequired
|
|
||||||
*/
|
|
||||||
public function getConfigSchema(string $name): DataResponse {
|
public function getConfigSchema(string $name): DataResponse {
|
||||||
$this->boardImportService->setSystem($name);
|
$this->boardImportService->setSystem($name);
|
||||||
$this->boardImportService->validateSystem();
|
$this->boardImportService->validateSystem();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -11,6 +12,9 @@ use OCA\Deck\Service\AssignmentService;
|
|||||||
use OCA\Deck\Service\CardService;
|
use OCA\Deck\Service\CardService;
|
||||||
use OCP\AppFramework\ApiController;
|
use OCP\AppFramework\ApiController;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\CORS;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@@ -26,7 +30,7 @@ class CardApiController extends ApiController {
|
|||||||
* @param IRequest $request
|
* @param IRequest $request
|
||||||
* @param CardService $cardService
|
* @param CardService $cardService
|
||||||
* @param AssignmentService $assignmentService
|
* @param AssignmentService $assignmentService
|
||||||
* @param $userId
|
* @param string $userId
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $appName,
|
string $appName,
|
||||||
@@ -79,88 +83,102 @@ class CardApiController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Update a card
|
* Update a card
|
||||||
*/
|
*/
|
||||||
public function update($title, $type, $owner, $description = '', $order = 0, $duedate = null, $archived = null) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function update(string $title, $type, string $owner, string $description = '', int $order = 0, $duedate = null, $archived = null): DataResponse {
|
||||||
$done = array_key_exists('done', $this->request->getParams()) ? new OptionalNullableValue($this->request->getParam('done', null)) : null;
|
$done = array_key_exists('done', $this->request->getParams()) ? new OptionalNullableValue($this->request->getParam('done', null)) : null;
|
||||||
$card = $this->cardService->update($this->request->getParam('cardId'), $title, $this->request->getParam('stackId'), $type, $owner, $description, $order, $duedate, 0, $archived, $done);
|
$card = $this->cardService->update($this->request->getParam('cardId'), $title, $this->request->getParam('stackId'), $type, $owner, $description, $order, $duedate, 0, $archived, $done);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Delete a specific card.
|
* Delete a specific card.
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function delete(): DataResponse {
|
||||||
$card = $this->cardService->delete($this->request->getParam('cardId'));
|
$card = $this->cardService->delete($this->request->getParam('cardId'));
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Assign a label to a card.
|
* Assign a label to a card.
|
||||||
*/
|
*/
|
||||||
public function assignLabel($labelId) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function assignLabel(int $labelId): DataResponse {
|
||||||
$card = $this->cardService->assignLabel($this->request->getParam('cardId'), $labelId);
|
$card = $this->cardService->assignLabel($this->request->getParam('cardId'), $labelId);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Assign a label to a card.
|
* Assign a label to a card.
|
||||||
*/
|
*/
|
||||||
public function removeLabel($labelId) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function removeLabel(int $labelId): DataResponse {
|
||||||
$card = $this->cardService->removeLabel($this->request->getParam('cardId'), $labelId);
|
$card = $this->cardService->removeLabel($this->request->getParam('cardId'), $labelId);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Assign a user to a card
|
* Assign a user to a card
|
||||||
*/
|
*/
|
||||||
public function assignUser($cardId, $userId, $type = 0) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function assignUser(int $cardId, string $userId, int $type = 0): DataResponse {
|
||||||
$card = $this->assignmentService->assignUser($cardId, $userId, $type);
|
$card = $this->assignmentService->assignUser($cardId, $userId, $type);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Unassign a user from a card
|
* Unassign a user from a card
|
||||||
*/
|
*/
|
||||||
public function unassignUser($cardId, $userId, $type = 0) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function unassignUser(int $cardId, string $userId, int $type = 0): DataResponse {
|
||||||
$card = $this->assignmentService->unassignUser($cardId, $userId, $type);
|
$card = $this->assignmentService->unassignUser($cardId, $userId, $type);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* Archive card
|
||||||
* @CORS
|
*/
|
||||||
* @NoCSRFRequired
|
#[NoAdminRequired]
|
||||||
*
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function archive(int $cardId): DataResponse {
|
||||||
|
$card = $this->cardService->archive($cardId);
|
||||||
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unarchive card
|
||||||
|
*/
|
||||||
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function unarchive(int $cardId): DataResponse {
|
||||||
|
$card = $this->cardService->unarchive($cardId);
|
||||||
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* Reorder cards
|
* Reorder cards
|
||||||
*/
|
*/
|
||||||
public function reorder($stackId, $order) {
|
#[NoAdminRequired]
|
||||||
$card = $this->cardService->reorder($this->request->getParam('cardId'), $stackId, $order);
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function reorder(int $stackId, int $order): DataResponse {
|
||||||
|
$card = $this->cardService->reorder((int)$this->request->getParam('cardId'), $stackId, $order);
|
||||||
return new DataResponse($card, HTTP::STATUS_OK);
|
return new DataResponse($card, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,9 +7,12 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
|
use OCA\Deck\Db\Assignment;
|
||||||
|
use OCA\Deck\Db\Card;
|
||||||
use OCA\Deck\Service\AssignmentService;
|
use OCA\Deck\Service\AssignmentService;
|
||||||
use OCA\Deck\Service\CardService;
|
use OCA\Deck\Service\CardService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class CardController extends Controller {
|
class CardController extends Controller {
|
||||||
@@ -22,45 +26,26 @@ class CardController extends Controller {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function read(int $cardId): Card {
|
||||||
* @param $cardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function read($cardId) {
|
|
||||||
return $this->cardService->find($cardId);
|
return $this->cardService->find($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return Card[]
|
||||||
* @param $cardId
|
|
||||||
* @param $stackId
|
|
||||||
* @param $order
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function reorder($cardId, $stackId, $order) {
|
#[NoAdminRequired]
|
||||||
return $this->cardService->reorder((int)$cardId, (int)$stackId, (int)$order);
|
public function reorder(int $cardId, int $stackId, int $order): array {
|
||||||
|
return $this->cardService->reorder($cardId, $stackId, $order);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function rename(int $cardId, string $title): Card {
|
||||||
* @param $cardId
|
|
||||||
* @param $title
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function rename($cardId, $title) {
|
|
||||||
return $this->cardService->rename($cardId, $title);
|
return $this->cardService->rename($cardId, $title);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function create(string $title, int $stackId, string $type = 'plain', int $order = 999, string $description = '', $duedate = null, array $labels = [], array $users = []): Card {
|
||||||
* @param $title
|
|
||||||
* @param $stackId
|
|
||||||
* @param $type
|
|
||||||
* @param int $order
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function create($title, $stackId, $type = 'plain', $order = 999, string $description = '', $duedate = null, $labels = [], $users = []) {
|
|
||||||
$card = $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
|
$card = $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
|
||||||
|
|
||||||
foreach ($labels as $label) {
|
foreach ($labels as $label) {
|
||||||
@@ -75,104 +60,68 @@ class CardController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @param $id
|
|
||||||
* @param $title
|
|
||||||
* @param $stackId
|
|
||||||
* @param $type
|
|
||||||
* @param $order
|
|
||||||
* @param $description
|
|
||||||
* @param $duedate
|
* @param $duedate
|
||||||
* @param $deletedAt
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
*/
|
||||||
public function update($id, $title, $stackId, $type, $order, $description, $duedate, $deletedAt) {
|
#[NoAdminRequired]
|
||||||
|
public function update(int $id, string $title, int $stackId, string $type, int $order, string $description, $duedate, $deletedAt): Card {
|
||||||
return $this->cardService->update($id, $title, $stackId, $type, $this->userId, $description, $order, $duedate, $deletedAt);
|
return $this->cardService->update($id, $title, $stackId, $type, $this->userId, $description, $order, $duedate, $deletedAt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function clone(int $cardId, ?int $targetStackId = null): Card {
|
||||||
* @param $cardId
|
return $this->cardService->cloneCard($cardId, $targetStackId);
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
}
|
||||||
*/
|
|
||||||
public function delete($cardId) {
|
#[NoAdminRequired]
|
||||||
|
public function delete(int $cardId): Card {
|
||||||
return $this->cardService->delete($cardId);
|
return $this->cardService->delete($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return Card[]
|
||||||
* @param $boardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
*/
|
||||||
public function deleted($boardId) {
|
#[NoAdminRequired]
|
||||||
|
public function deleted(int $boardId): array {
|
||||||
return $this->cardService->fetchDeleted($boardId);
|
return $this->cardService->fetchDeleted($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
|
||||||
* @param $cardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function archive($cardId) {
|
public function archive($cardId) {
|
||||||
return $this->cardService->archive($cardId);
|
return $this->cardService->archive($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function unarchive(int $cardId): Card {
|
||||||
* @param $cardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function unarchive($cardId) {
|
|
||||||
return $this->cardService->unarchive($cardId);
|
return $this->cardService->unarchive($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function done(int $cardId): Card {
|
||||||
* @param $cardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function done(int $cardId) {
|
|
||||||
return $this->cardService->done($cardId);
|
return $this->cardService->done($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function undone(int $cardId): Card {
|
||||||
* @param $cardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function undone(int $cardId) {
|
|
||||||
return $this->cardService->undone($cardId);
|
return $this->cardService->undone($cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function assignLabel(int $cardId, int $labelId): void {
|
||||||
* @param $cardId
|
|
||||||
* @param $labelId
|
|
||||||
*/
|
|
||||||
public function assignLabel($cardId, $labelId) {
|
|
||||||
$this->cardService->assignLabel($cardId, $labelId);
|
$this->cardService->assignLabel($cardId, $labelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function removeLabel(int $cardId, int $labelId): void {
|
||||||
* @param $cardId
|
|
||||||
* @param $labelId
|
|
||||||
*/
|
|
||||||
public function removeLabel($cardId, $labelId) {
|
|
||||||
$this->cardService->removeLabel($cardId, $labelId);
|
$this->cardService->removeLabel($cardId, $labelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function assignUser(int $cardId, string $userId, int $type = 0): Assignment {
|
||||||
*/
|
|
||||||
public function assignUser($cardId, $userId, $type = 0) {
|
|
||||||
return $this->assignmentService->assignUser($cardId, $userId, $type);
|
return $this->assignmentService->assignUser($cardId, $userId, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function unassignUser(int $cardId, string $userId, int $type = 0): Assignment {
|
||||||
*/
|
|
||||||
public function unassignUser($cardId, $userId, $type = 0) {
|
|
||||||
return $this->assignmentService->unassignUser($cardId, $userId, $type);
|
return $this->assignmentService->unassignUser($cardId, $userId, $type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -8,11 +9,15 @@ namespace OCA\Deck\Controller;
|
|||||||
|
|
||||||
use OCA\Deck\Service\CommentService;
|
use OCA\Deck\Service\CommentService;
|
||||||
use OCA\Deck\StatusException;
|
use OCA\Deck\StatusException;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
|
|
||||||
use OCP\AppFramework\OCSController;
|
use OCP\AppFramework\OCSController;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @psalm-api
|
||||||
|
*/
|
||||||
class CommentsApiController extends OCSController {
|
class CommentsApiController extends OCSController {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $appName,
|
string $appName,
|
||||||
@@ -26,33 +31,33 @@ class CommentsApiController extends OCSController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @throws StatusException
|
* @throws StatusException
|
||||||
*/
|
*/
|
||||||
public function list(string $cardId, int $limit = 20, int $offset = 0): DataResponse {
|
#[NoAdminRequired]
|
||||||
|
public function list(int $cardId, int $limit = 20, int $offset = 0): DataResponse {
|
||||||
return $this->commentService->list($cardId, $limit, $offset);
|
return $this->commentService->list($cardId, $limit, $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @throws StatusException
|
* @throws StatusException
|
||||||
*/
|
*/
|
||||||
|
#[NoAdminRequired]
|
||||||
public function create(int $cardId, string $message, int $parentId = 0): DataResponse {
|
public function create(int $cardId, string $message, int $parentId = 0): DataResponse {
|
||||||
return $this->commentService->create($cardId, $message, $parentId);
|
return $this->commentService->create($cardId, $message, $parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @throws StatusException
|
* @throws StatusException
|
||||||
*/
|
*/
|
||||||
|
#[NoAdminRequired]
|
||||||
public function update(int $cardId, int $commentId, string $message): DataResponse {
|
public function update(int $cardId, int $commentId, string $message): DataResponse {
|
||||||
return $this->commentService->update($cardId, $commentId, $message);
|
return $this->commentService->update($cardId, $commentId, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @throws StatusException
|
* @throws StatusException
|
||||||
*/
|
*/
|
||||||
|
#[NoAdminRequired]
|
||||||
public function delete(int $cardId, int $commentId): DataResponse {
|
public function delete(int $cardId, int $commentId): DataResponse {
|
||||||
return $this->commentService->delete($cardId, $commentId);
|
return $this->commentService->delete($cardId, $commentId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -7,6 +8,8 @@
|
|||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
use OCA\Deck\Service\ConfigService;
|
use OCA\Deck\Service\ConfigService;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\AppFramework\Http\NotFoundResponse;
|
use OCP\AppFramework\Http\NotFoundResponse;
|
||||||
use OCP\AppFramework\OCSController;
|
use OCP\AppFramework\OCSController;
|
||||||
@@ -21,19 +24,15 @@ class ConfigController extends OCSController {
|
|||||||
parent::__construct($AppName, $request);
|
parent::__construct($AppName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoCSRFRequired
|
#[NoCSRFRequired]
|
||||||
* @NoAdminRequired
|
|
||||||
*/
|
|
||||||
public function get(): DataResponse {
|
public function get(): DataResponse {
|
||||||
return new DataResponse($this->configService->getAll());
|
return new DataResponse($this->configService->getAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoCSRFRequired
|
#[NoCSRFRequired]
|
||||||
* @NoAdminRequired
|
public function setValue(string $key, mixed $value): DataResponse|NotFoundResponse {
|
||||||
*/
|
|
||||||
public function setValue(string $key, $value) {
|
|
||||||
$result = $this->configService->set($key, $value);
|
$result = $this->configService->set($key, $value);
|
||||||
if ($result === null) {
|
if ($result === null) {
|
||||||
return new NotFoundResponse();
|
return new NotFoundResponse();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -9,6 +10,9 @@ namespace OCA\Deck\Controller;
|
|||||||
use OCA\Deck\Service\LabelService;
|
use OCA\Deck\Service\LabelService;
|
||||||
use OCP\AppFramework\ApiController;
|
use OCP\AppFramework\ApiController;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\CORS;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@@ -25,59 +29,50 @@ class LabelApiController extends ApiController {
|
|||||||
$appName,
|
$appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
private LabelService $labelService,
|
private LabelService $labelService,
|
||||||
private $userId,
|
|
||||||
) {
|
) {
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Get a specific label.
|
* Get a specific label.
|
||||||
*/
|
*/
|
||||||
public function get() {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function get(): DataResponse {
|
||||||
$label = $this->labelService->find($this->request->getParam('labelId'));
|
$label = $this->labelService->find($this->request->getParam('labelId'));
|
||||||
return new DataResponse($label, HTTP::STATUS_OK);
|
return new DataResponse($label, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @params $title
|
|
||||||
* @params $color
|
|
||||||
* Create a new label
|
* Create a new label
|
||||||
*/
|
*/
|
||||||
public function create($title, $color) {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function create(string $title, string $color): DataResponse {
|
||||||
$label = $this->labelService->create($title, $color, $this->request->getParam('boardId'));
|
$label = $this->labelService->create($title, $color, $this->request->getParam('boardId'));
|
||||||
return new DataResponse($label, HTTP::STATUS_OK);
|
return new DataResponse($label, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @params $title
|
|
||||||
* @params $color
|
|
||||||
* Update a specific label
|
* Update a specific label
|
||||||
*/
|
*/
|
||||||
public function update($title, $color) {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function update(string $title, string $color): DataResponse {
|
||||||
$label = $this->labelService->update($this->request->getParam('labelId'), $title, $color);
|
$label = $this->labelService->update($this->request->getParam('labelId'), $title, $color);
|
||||||
return new DataResponse($label, HTTP::STATUS_OK);
|
return new DataResponse($label, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Delete a specific label
|
* Delete a specific label
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
#[NoAdminRequired]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[CORS]
|
||||||
|
public function delete(): DataResponse {
|
||||||
$label = $this->labelService->delete($this->request->getParam('labelId'));
|
$label = $this->labelService->delete($this->request->getParam('labelId'));
|
||||||
return new DataResponse($label, HTTP::STATUS_OK);
|
return new DataResponse($label, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,8 +7,10 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
|
use OCA\Deck\Db\Label;
|
||||||
use OCA\Deck\Service\LabelService;
|
use OCA\Deck\Service\LabelService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class LabelController extends Controller {
|
class LabelController extends Controller {
|
||||||
@@ -19,34 +22,18 @@ class LabelController extends Controller {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function create(string $title, string $color, int $boardId): Label {
|
||||||
* @param $title
|
|
||||||
* @param $color
|
|
||||||
* @param $boardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function create($title, $color, $boardId) {
|
|
||||||
return $this->labelService->create($title, $color, $boardId);
|
return $this->labelService->create($title, $color, $boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function update(int $id, string $title, string $color): Label {
|
||||||
* @param $id
|
|
||||||
* @param $title
|
|
||||||
* @param $color
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function update($id, $title, $color) {
|
|
||||||
return $this->labelService->update($id, $title, $color);
|
return $this->labelService->update($id, $title, $color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function delete(int $labelId): Label {
|
||||||
* @param $labelId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function delete($labelId) {
|
|
||||||
return $this->labelService->delete($labelId);
|
return $this->labelService->delete($labelId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
|||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
use OCA\Deck\Service\OverviewService;
|
use OCA\Deck\Service\OverviewService;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\AppFramework\OCSController;
|
use OCP\AppFramework\OCSController;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
@@ -24,9 +25,7 @@ class OverviewApiController extends OCSController {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
|
||||||
*/
|
|
||||||
public function upcomingCards(): DataResponse {
|
public function upcomingCards(): DataResponse {
|
||||||
return new DataResponse($this->dashboardService->findUpcomingCards($this->userId));
|
return new DataResponse($this->dashboardService->findUpcomingCards($this->userId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -12,6 +13,7 @@ namespace OCA\Deck\Controller;
|
|||||||
use OCA\Deck\Db\Card;
|
use OCA\Deck\Db\Card;
|
||||||
use OCA\Deck\Model\CardDetails;
|
use OCA\Deck\Model\CardDetails;
|
||||||
use OCA\Deck\Service\SearchService;
|
use OCA\Deck\Service\SearchService;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\AppFramework\OCSController;
|
use OCP\AppFramework\OCSController;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
@@ -25,9 +27,7 @@ class SearchController extends OCSController {
|
|||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
|
||||||
*/
|
|
||||||
public function search(string $term, ?int $limit = null, ?int $cursor = null): DataResponse {
|
public function search(string $term, ?int $limit = null, ?int $cursor = null): DataResponse {
|
||||||
$cards = $this->searchService->searchCards($term, $limit, $cursor);
|
$cards = $this->searchService->searchCards($term, $limit, $cursor);
|
||||||
return new DataResponse(array_map(function (Card $card) {
|
return new DataResponse(array_map(function (Card $card) {
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ use OCP\AppFramework\OCSController;
|
|||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class SessionController extends OCSController {
|
class SessionController extends OCSController {
|
||||||
public function __construct($appName,
|
public function __construct(
|
||||||
|
$appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
private SessionService $sessionService,
|
private SessionService $sessionService,
|
||||||
private PermissionService $permissionService,
|
private PermissionService $permissionService,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,14 +7,16 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
use OCA\Deck\Service\BoardService;
|
|
||||||
use OCA\Deck\Service\StackService;
|
use OCA\Deck\Service\StackService;
|
||||||
use OCA\Deck\StatusException;
|
use OCA\Deck\StatusException;
|
||||||
use OCP\AppFramework\ApiController;
|
use OCP\AppFramework\ApiController;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
|
use OCP\AppFramework\Http\Attribute\CORS;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\DataResponse;
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use Sabre\HTTP\Util;
|
use function Sabre\HTTP\parseDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class StackApiController
|
* Class StackApiController
|
||||||
@@ -28,23 +31,21 @@ class StackApiController extends ApiController {
|
|||||||
$appName,
|
$appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
private StackService $stackService,
|
private StackService $stackService,
|
||||||
private BoardService $boardService,
|
|
||||||
) {
|
) {
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* Return all the stacks in the specified board.
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Return all of the stacks in the specified board.
|
|
||||||
*/
|
*/
|
||||||
public function index() {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function index(): DataResponse {
|
||||||
$since = 0;
|
$since = 0;
|
||||||
$modified = $this->request->getHeader('If-Modified-Since');
|
$modified = $this->request->getHeader('If-Modified-Since');
|
||||||
if ($modified !== null && $modified !== '') {
|
if ($modified !== '') {
|
||||||
$date = Util::parseHTTPDate($modified);
|
$date = parseDate($modified);
|
||||||
if (!$date) {
|
if (!$date) {
|
||||||
throw new StatusException('Invalid If-Modified-Since header provided.');
|
throw new StatusException('Invalid If-Modified-Since header provided.');
|
||||||
}
|
}
|
||||||
@@ -55,13 +56,12 @@ class StackApiController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* Return all the stacks in the specified board.
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Return all of the stacks in the specified board.
|
|
||||||
*/
|
*/
|
||||||
public function get() {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function get(): DataResponse {
|
||||||
$stack = $this->stackService->find($this->request->getParam('stackId'));
|
$stack = $this->stackService->find($this->request->getParam('stackId'));
|
||||||
$response = new DataResponse($stack, HTTP::STATUS_OK);
|
$response = new DataResponse($stack, HTTP::STATUS_OK);
|
||||||
$response->setETag($stack->getETag());
|
$response->setETag($stack->getETag());
|
||||||
@@ -69,55 +69,45 @@ class StackApiController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @params $title
|
|
||||||
* @params $order
|
|
||||||
*
|
|
||||||
* Create a stack with the specified title and order.
|
* Create a stack with the specified title and order.
|
||||||
*/
|
*/
|
||||||
public function create($title, $order) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function create(string $title, int $order): DataResponse {
|
||||||
$stack = $this->stackService->create($title, $this->request->getParam('boardId'), $order);
|
$stack = $this->stackService->create($title, $this->request->getParam('boardId'), $order);
|
||||||
return new DataResponse($stack, HTTP::STATUS_OK);
|
return new DataResponse($stack, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* @params $title
|
|
||||||
* @params $order
|
|
||||||
*
|
|
||||||
* Update a stack by the specified stackId and boardId with the values that were put.
|
* Update a stack by the specified stackId and boardId with the values that were put.
|
||||||
*/
|
*/
|
||||||
public function update($title, $order) {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function update(string $title, int $order) {
|
||||||
$stack = $this->stackService->update($this->request->getParam('stackId'), $title, $this->request->getParam('boardId'), $order, 0);
|
$stack = $this->stackService->update($this->request->getParam('stackId'), $title, $this->request->getParam('boardId'), $order, 0);
|
||||||
return new DataResponse($stack, HTTP::STATUS_OK);
|
return new DataResponse($stack, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* Delete the stack specified by $this->request->getParam('stackId').
|
* Delete the stack specified by $this->request->getParam('stackId').
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function delete(): DataResponse {
|
||||||
$stack = $this->stackService->delete($this->request->getParam('stackId'));
|
$stack = $this->stackService->delete($this->request->getParam('stackId'));
|
||||||
return new DataResponse($stack, HTTP::STATUS_OK);
|
return new DataResponse($stack, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* Get the stacks that have been archived.
|
||||||
* @CORS
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*
|
|
||||||
* get the stacks that have been archived.
|
|
||||||
*/
|
*/
|
||||||
public function getArchived() {
|
#[NoAdminRequired]
|
||||||
|
#[CORS]
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
public function getArchived(): DataResponse {
|
||||||
$stacks = $this->stackService->findAllArchived($this->request->getParam('boardId'));
|
$stacks = $this->stackService->findAllArchived($this->request->getParam('boardId'));
|
||||||
return new DataResponse($stacks, HTTP::STATUS_OK);
|
return new DataResponse($stacks, HTTP::STATUS_OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,10 +7,12 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
|
use OCA\Deck\Db\Stack;
|
||||||
use OCA\Deck\Service\StackService;
|
use OCA\Deck\Service\StackService;
|
||||||
|
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
|
||||||
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class StackController extends Controller {
|
class StackController extends Controller {
|
||||||
@@ -17,78 +20,54 @@ class StackController extends Controller {
|
|||||||
string $appName,
|
string $appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
private StackService $stackService,
|
private StackService $stackService,
|
||||||
private $userId,
|
|
||||||
) {
|
) {
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return Stack[]
|
||||||
* @param $boardId
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function index($boardId) {
|
#[NoAdminRequired]
|
||||||
|
public function index(int $boardId): array {
|
||||||
return $this->stackService->findAll($boardId);
|
return $this->stackService->findAll($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return Stack[]
|
||||||
* @param $boardId
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function archived($boardId) {
|
#[NoAdminRequired]
|
||||||
|
public function archived(int $boardId): array {
|
||||||
return $this->stackService->findAllArchived($boardId);
|
return $this->stackService->findAllArchived($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function create(string $title, int $boardId, int $order = 999): Stack {
|
||||||
* @param $title
|
|
||||||
* @param $boardId
|
|
||||||
* @param int $order
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function create($title, $boardId, $order = 999) {
|
|
||||||
return $this->stackService->create($title, $boardId, $order);
|
return $this->stackService->create($title, $boardId, $order);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function update(int $id, string $title, int $boardId, int $order, ?int $deletedAt = null): Stack {
|
||||||
* @param $id
|
|
||||||
* @param $title
|
|
||||||
* @param $boardId
|
|
||||||
* @param $order
|
|
||||||
* @param $deletedAt
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function update($id, $title, $boardId, $order, $deletedAt) {
|
|
||||||
return $this->stackService->update($id, $title, $boardId, $order, $deletedAt);
|
return $this->stackService->update($id, $title, $boardId, $order, $deletedAt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return array<int, Stack>
|
||||||
* @param $stackId
|
|
||||||
* @param $order
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function reorder($stackId, $order) {
|
#[NoAdminRequired]
|
||||||
return $this->stackService->reorder((int)$stackId, (int)$order);
|
public function reorder(int $stackId, int $order): array {
|
||||||
|
return $this->stackService->reorder($stackId, $order);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NoAdminRequired]
|
||||||
* @NoAdminRequired
|
public function delete(int $stackId): Stack {
|
||||||
* @param $stackId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
|
||||||
public function delete($stackId) {
|
|
||||||
return $this->stackService->delete($stackId);
|
return $this->stackService->delete($stackId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @return Stack[]
|
||||||
* @param $boardId
|
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
|
||||||
*/
|
*/
|
||||||
public function deleted($boardId) {
|
#[NoAdminRequired]
|
||||||
|
public function deleted(int $boardId): array {
|
||||||
return $this->stackService->fetchDeleted($boardId);
|
return $this->stackService->fetchDeleted($boardId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -12,27 +13,17 @@ use OCA\Deck\Notification\NotificationHelper;
|
|||||||
use OCP\AppFramework\Db\DoesNotExistException;
|
use OCP\AppFramework\Db\DoesNotExistException;
|
||||||
use OCP\AppFramework\Utility\ITimeFactory;
|
use OCP\AppFramework\Utility\ITimeFactory;
|
||||||
use OCP\BackgroundJob\Job;
|
use OCP\BackgroundJob\Job;
|
||||||
use OCP\ILogger;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class ScheduledNotifications extends Job {
|
class ScheduledNotifications extends Job {
|
||||||
|
|
||||||
/** @var CardMapper */
|
|
||||||
protected $cardMapper;
|
|
||||||
/** @var NotificationHelper */
|
|
||||||
protected $notificationHelper;
|
|
||||||
/** @var ILogger */
|
|
||||||
protected $logger;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
ITimeFactory $time,
|
ITimeFactory $time,
|
||||||
CardMapper $cardMapper,
|
protected CardMapper $cardMapper,
|
||||||
NotificationHelper $notificationHelper,
|
protected NotificationHelper $notificationHelper,
|
||||||
ILogger $logger
|
protected LoggerInterface $logger,
|
||||||
) {
|
) {
|
||||||
parent::__construct($time);
|
parent::__construct($time);
|
||||||
$this->cardMapper = $cardMapper;
|
|
||||||
$this->notificationHelper = $notificationHelper;
|
|
||||||
$this->logger = $logger;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,21 +14,19 @@ namespace OCA\Deck\Cron;
|
|||||||
use OCA\Deck\Service\SessionService;
|
use OCA\Deck\Service\SessionService;
|
||||||
use OCP\AppFramework\Utility\ITimeFactory;
|
use OCP\AppFramework\Utility\ITimeFactory;
|
||||||
use OCP\BackgroundJob\TimedJob;
|
use OCP\BackgroundJob\TimedJob;
|
||||||
use OCP\ILogger;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class SessionsCleanup extends TimedJob {
|
class SessionsCleanup extends TimedJob {
|
||||||
private $sessionService;
|
|
||||||
private $documentService;
|
private $documentService;
|
||||||
private $logger;
|
|
||||||
private $imageService;
|
private $imageService;
|
||||||
|
|
||||||
|
|
||||||
public function __construct(ITimeFactory $time,
|
public function __construct(
|
||||||
SessionService $sessionService,
|
ITimeFactory $time,
|
||||||
ILogger $logger) {
|
private SessionService $sessionService,
|
||||||
|
private LoggerInterface $logger,
|
||||||
|
) {
|
||||||
parent::__construct($time);
|
parent::__construct($time);
|
||||||
$this->sessionService = $sessionService;
|
|
||||||
$this->logger = $logger;
|
|
||||||
$this->setInterval(SessionService::SESSION_VALID_TIME);
|
$this->setInterval(SessionService::SESSION_VALID_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -25,7 +26,7 @@ class Calendar extends ExternalCalendar {
|
|||||||
private $children;
|
private $children;
|
||||||
/** @var DeckCalendarBackend */
|
/** @var DeckCalendarBackend */
|
||||||
private $backend;
|
private $backend;
|
||||||
/** @var Board */
|
/** @var Board */
|
||||||
private $board;
|
private $board;
|
||||||
|
|
||||||
public function __construct(string $principalUri, string $calendarUri, Board $board, DeckCalendarBackend $backend) {
|
public function __construct(string $principalUri, string $calendarUri, Board $board, DeckCalendarBackend $backend) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -32,7 +33,7 @@ class DeckCalendarBackend {
|
|||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
BoardService $boardService, StackService $stackService, CardService $cardService, PermissionService $permissionService,
|
BoardService $boardService, StackService $stackService, CardService $cardService, PermissionService $permissionService,
|
||||||
BoardMapper $boardMapper
|
BoardMapper $boardMapper,
|
||||||
) {
|
) {
|
||||||
$this->boardService = $boardService;
|
$this->boardService = $boardService;
|
||||||
$this->stackService = $stackService;
|
$this->stackService = $stackService;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -6,6 +7,20 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Db;
|
namespace OCA\Deck\Db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method int getBoardId()
|
||||||
|
* @method bool isPermissionEdit()
|
||||||
|
* @method void setPermissionEdit(bool $permissionEdit)
|
||||||
|
* @method bool isPermissionShare()
|
||||||
|
* @method void setPermissionShare(bool $permissionShare)
|
||||||
|
* @method bool isPermissionManage()
|
||||||
|
* @method void setPermissionManage(bool $permissionManage)
|
||||||
|
* @method int getType()
|
||||||
|
* @method void setType(int $type)
|
||||||
|
* @method bool isOwner()
|
||||||
|
* @method void setOwner(int $owner)
|
||||||
|
*
|
||||||
|
*/
|
||||||
class Acl extends RelationalEntity {
|
class Acl extends RelationalEntity {
|
||||||
public const PERMISSION_READ = 0;
|
public const PERMISSION_READ = 0;
|
||||||
public const PERMISSION_EDIT = 1;
|
public const PERMISSION_EDIT = 1;
|
||||||
@@ -36,17 +51,13 @@ class Acl extends RelationalEntity {
|
|||||||
$this->addResolvable('participant');
|
$this->addResolvable('participant');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPermission($permission) {
|
public function getPermission(int $permission): bool {
|
||||||
switch ($permission) {
|
return match ($permission) {
|
||||||
case self::PERMISSION_READ:
|
self::PERMISSION_READ => true,
|
||||||
return true;
|
self::PERMISSION_EDIT => $this->getPermissionEdit(),
|
||||||
case self::PERMISSION_EDIT:
|
self::PERMISSION_SHARE => $this->getPermissionShare(),
|
||||||
return $this->getPermissionEdit();
|
self::PERMISSION_MANAGE => $this->getPermissionManage(),
|
||||||
case self::PERMISSION_SHARE:
|
default => false,
|
||||||
return $this->getPermissionShare();
|
};
|
||||||
case self::PERMISSION_MANAGE:
|
|
||||||
return $this->getPermissionManage();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -18,13 +19,10 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param numeric $boardId
|
|
||||||
* @param int|null $limit
|
|
||||||
* @param int|null $offset
|
|
||||||
* @return Acl[]
|
* @return Acl[]
|
||||||
* @throws \OCP\DB\Exception
|
* @throws \OCP\DB\Exception
|
||||||
*/
|
*/
|
||||||
public function findAll($boardId, $limit = null, $offset = null) {
|
public function findAll(int $boardId, ?int $limit = null, ?int $offset = null) {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('id', 'board_id', 'type', 'participant', 'permission_edit', 'permission_share', 'permission_manage')
|
$qb->select('id', 'board_id', 'type', 'participant', 'permission_edit', 'permission_share', 'permission_manage')
|
||||||
->from('deck_board_acl')
|
->from('deck_board_acl')
|
||||||
@@ -50,12 +48,9 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param numeric $userId
|
|
||||||
* @param numeric $id
|
|
||||||
* @return bool
|
|
||||||
* @throws \OCP\DB\Exception
|
* @throws \OCP\DB\Exception
|
||||||
*/
|
*/
|
||||||
public function isOwner($userId, $id): bool {
|
public function isOwner(string $userId, int $id): bool {
|
||||||
$aclId = $id;
|
$aclId = $id;
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('acl.id')
|
$qb->select('acl.id')
|
||||||
@@ -67,15 +62,11 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
return count($qb->executeQuery()->fetchAll()) > 0;
|
return count($qb->executeQuery()->fetchAll()) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function findBoardId(int $id): ?int {
|
||||||
* @param numeric $id
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public function findBoardId($id): ?int {
|
|
||||||
try {
|
try {
|
||||||
$entity = $this->find($id);
|
$entity = $this->find($id);
|
||||||
return $entity->getBoardId();
|
return $entity->getBoardId();
|
||||||
} catch (DoesNotExistException | MultipleObjectsReturnedException $e) {
|
} catch (DoesNotExistException|MultipleObjectsReturnedException $e) {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -86,7 +77,7 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
* @return Acl[]
|
* @return Acl[]
|
||||||
* @throws \OCP\DB\Exception
|
* @throws \OCP\DB\Exception
|
||||||
*/
|
*/
|
||||||
public function findByParticipant($type, $participant): array {
|
public function findByParticipant(int $type, string $participant): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
|
|
||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -76,26 +77,41 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function deleteByParticipantOnBoard(string $participant, int $boardId, $type = Assignment::TYPE_USER) {
|
public function deleteByParticipantOnBoard(string $participant, int $boardId, $type = Assignment::TYPE_USER) {
|
||||||
$qb = $this->db->getQueryBuilder();
|
// Step 1: Get all card IDs for the board that have assignments for this participant
|
||||||
|
// This avoids MySQL Error 1093 by separating the SELECT from the DELETE operation
|
||||||
$cardIdQuery = $this->db->getQueryBuilder();
|
$cardIdQuery = $this->db->getQueryBuilder();
|
||||||
$cardIdQuery->select('a.card_id')
|
$cardIdQuery->select('a.card_id')
|
||||||
->from('deck_assigned_users', 'a')
|
->from('deck_assigned_users', 'a')
|
||||||
->innerJoin('a', 'deck_cards', 'c', 'c.id = a.card_id')
|
->innerJoin('a', 'deck_cards', 'c', 'c.id = a.card_id')
|
||||||
->innerJoin('c', 'deck_stacks', 's', 's.id = c.stack_id')
|
->innerJoin('c', 'deck_stacks', 's', 's.id = c.stack_id')
|
||||||
->where($cardIdQuery->expr()->eq('a.participant', $qb->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
|
->where($cardIdQuery->expr()->eq('a.participant', $cardIdQuery->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
|
||||||
->andWhere($cardIdQuery->expr()->eq('s.board_id', $qb->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
|
->andWhere($cardIdQuery->expr()->eq('s.board_id', $cardIdQuery->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
|
||||||
->andWhere($cardIdQuery->expr()->eq('a.type', $qb->createNamedParameter($type, IQueryBuilder::PARAM_INT)));
|
->andWhere($cardIdQuery->expr()->eq('a.type', $cardIdQuery->createNamedParameter($type, IQueryBuilder::PARAM_INT)));
|
||||||
$qb->delete('deck_assigned_users')
|
|
||||||
->where($qb->expr()->in('card_id', $qb->createFunction($cardIdQuery->getSQL()), IQueryBuilder::PARAM_INT_ARRAY));
|
$result = $cardIdQuery->executeQuery();
|
||||||
$qb->executeStatement();
|
$cardIds = [];
|
||||||
|
while ($row = $result->fetch()) {
|
||||||
|
$cardIds[] = $row['card_id'];
|
||||||
|
}
|
||||||
|
$result->closeCursor();
|
||||||
|
|
||||||
|
// Step 2: If we have card IDs, delete the assignments
|
||||||
|
if (!empty($cardIds)) {
|
||||||
|
$deleteQuery = $this->db->getQueryBuilder();
|
||||||
|
$deleteQuery->delete('deck_assigned_users')
|
||||||
|
->where($deleteQuery->expr()->eq('participant', $deleteQuery->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
|
||||||
|
->andWhere($deleteQuery->expr()->eq('type', $deleteQuery->createNamedParameter($type, IQueryBuilder::PARAM_INT)))
|
||||||
|
->andWhere($deleteQuery->expr()->in('card_id', $deleteQuery->createNamedParameter($cardIds, IQueryBuilder::PARAM_INT_ARRAY)));
|
||||||
|
$deleteQuery->executeStatement();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function isOwner($userId, $id): bool {
|
public function isOwner(string $userId, int $id): bool {
|
||||||
return $this->cardMapper->isOwner($userId, $id);
|
return $this->cardMapper->isOwner($userId, $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findBoardId($id): ?int {
|
public function findBoardId(int $id): ?int {
|
||||||
return $this->cardMapper->findBoardId($id);
|
return $this->cardMapper->findBoardId($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +123,9 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
* @throws NotFoundException
|
* @throws NotFoundException
|
||||||
*/
|
*/
|
||||||
public function insert(Entity $entity): Entity {
|
public function insert(Entity $entity): Entity {
|
||||||
|
if (!($entity instanceof Assignment)) {
|
||||||
|
throw new \LogicException('Trying to insert a ' . get_class($entity) . ' in the assignment mapper');
|
||||||
|
}
|
||||||
$origin = $this->getOrigin($entity);
|
$origin = $this->getOrigin($entity);
|
||||||
if ($origin === null) {
|
if ($origin === null) {
|
||||||
throw new NotFoundException('No origin found for assignment');
|
throw new NotFoundException('No origin found for assignment');
|
||||||
@@ -125,7 +144,7 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isUserAssigned($cardId, $userId): bool {
|
public function isUserAssigned(int $cardId, string $userId): bool {
|
||||||
$assignments = $this->findAll($cardId);
|
$assignments = $this->findAll($cardId);
|
||||||
foreach ($assignments as $assignment) {
|
foreach ($assignments as $assignment) {
|
||||||
$origin = $this->getOrigin($assignment);
|
$origin = $this->getOrigin($assignment);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -35,13 +36,11 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id
|
|
||||||
* @return Attachment
|
|
||||||
* @throws DoesNotExistException
|
* @throws DoesNotExistException
|
||||||
* @throws MultipleObjectsReturnedException
|
* @throws MultipleObjectsReturnedException
|
||||||
* @throws \OCP\DB\Exception
|
* @throws \OCP\DB\Exception
|
||||||
*/
|
*/
|
||||||
public function find($id) {
|
public function find(int $id): Attachment {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
->from($this->getTableName())
|
->from($this->getTableName())
|
||||||
@@ -51,29 +50,25 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $cardId
|
|
||||||
* @param string $data
|
|
||||||
* @return Attachment
|
|
||||||
* @throws DoesNotExistException
|
* @throws DoesNotExistException
|
||||||
* @throws MultipleObjectsReturnedException
|
* @throws MultipleObjectsReturnedException
|
||||||
* @throws \OCP\DB\Exception
|
* @throws \OCP\DB\Exception
|
||||||
*/
|
*/
|
||||||
public function findByData($cardId, $data) {
|
public function findByData(int $cardId, string $data): Attachment {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
->from($this->getTableName())
|
->from($this->getTableName())
|
||||||
->where($qb->expr()->eq('card_id', $qb->createNamedParameter($cardId, IQueryBuilder::PARAM_INT)))
|
->where($qb->expr()->eq('card_id', $qb->createNamedParameter($cardId, IQueryBuilder::PARAM_INT)))
|
||||||
->andWhere($qb->expr()->eq('data', $qb->createNamedParameter($data, IQueryBuilder::PARAM_STR)));
|
->andWhere($qb->expr()->eq('data', $qb->createNamedParameter($data, IQueryBuilder::PARAM_STR)));
|
||||||
|
|
||||||
return $this->findEntity($qb);
|
return $this->findEntity($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $cardId
|
|
||||||
* @return Entity[]
|
* @return Entity[]
|
||||||
* @throws \OCP\DB\Exception
|
* @throws \OCP\DB\Exception
|
||||||
*/
|
*/
|
||||||
public function findAll($cardId) {
|
public function findAll(int $cardId): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
->from($this->getTableName())
|
->from($this->getTableName())
|
||||||
@@ -85,11 +80,9 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param null $cardId
|
* @return Attachment[]
|
||||||
* @param bool $withOffset
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function findToDelete($cardId = null, $withOffset = true) {
|
public function findToDelete(?int $cardId = null, bool $withOffset = true): array {
|
||||||
// add buffer of 5 min
|
// add buffer of 5 min
|
||||||
$timeLimit = time() - (60 * 5);
|
$timeLimit = time() - (60 * 5);
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
@@ -111,12 +104,8 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if $userId is owner of Entity with $id
|
* Check if $userId is owner of Entity with $id
|
||||||
*
|
|
||||||
* @param $userId string userId
|
|
||||||
* @param $id int|string unique entity identifier
|
|
||||||
* @return boolean
|
|
||||||
*/
|
*/
|
||||||
public function isOwner($userId, $id): bool {
|
public function isOwner(string $userId, int $id): bool {
|
||||||
try {
|
try {
|
||||||
$attachment = $this->find($id);
|
$attachment = $this->find($id);
|
||||||
return $this->cardMapper->isOwner($userId, $attachment->getCardId());
|
return $this->cardMapper->isOwner($userId, $attachment->getCardId());
|
||||||
@@ -129,10 +118,10 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
/**
|
/**
|
||||||
* Query boardId for Entity of given $id
|
* Query boardId for Entity of given $id
|
||||||
*
|
*
|
||||||
* @param $id int|string unique entity identifier
|
* @param $id int unique entity identifier
|
||||||
* @return int|null id of Board
|
* @return int|null id of Board
|
||||||
*/
|
*/
|
||||||
public function findBoardId($id): ?int {
|
public function findBoardId(int $id): ?int {
|
||||||
try {
|
try {
|
||||||
$attachment = $this->find($id);
|
$attachment = $this->find($id);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -9,10 +10,20 @@ namespace OCA\Deck\Db;
|
|||||||
/**
|
/**
|
||||||
* @method int getId()
|
* @method int getId()
|
||||||
* @method string getTitle()
|
* @method string getTitle()
|
||||||
|
* @method void setTitle(string $title)
|
||||||
* @method int getShared()
|
* @method int getShared()
|
||||||
|
* @method void setShared(int $shared)
|
||||||
|
* @method bool isArchived()
|
||||||
* @method bool getArchived()
|
* @method bool getArchived()
|
||||||
|
* @method void setArchived(bool $archived)
|
||||||
* @method int getDeletedAt()
|
* @method int getDeletedAt()
|
||||||
|
* @method void setDeletedAt(int $deletedAt)
|
||||||
* @method int getLastModified()
|
* @method int getLastModified()
|
||||||
|
* @method void setLastModified(int $lastModified)
|
||||||
|
* @method string getOwner()
|
||||||
|
* @method void setOwner(string $owner)
|
||||||
|
* @method string getColor()
|
||||||
|
* @method void setColor(string $color)
|
||||||
*/
|
*/
|
||||||
class Board extends RelationalEntity {
|
class Board extends RelationalEntity {
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -31,7 +32,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
private IUserManager $userManager,
|
private IUserManager $userManager,
|
||||||
private IGroupManager $groupManager,
|
private IGroupManager $groupManager,
|
||||||
private CirclesService $circlesService,
|
private CirclesService $circlesService,
|
||||||
private LoggerInterface $logger
|
private LoggerInterface $logger,
|
||||||
) {
|
) {
|
||||||
parent::__construct($db, 'deck_boards', Board::class);
|
parent::__construct($db, 'deck_boards', Board::class);
|
||||||
|
|
||||||
@@ -468,16 +469,16 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return parent::delete($entity);
|
return parent::delete($entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isOwner($userId, $id): bool {
|
public function isOwner(string $userId, int $id): bool {
|
||||||
$board = $this->find($id);
|
$board = $this->find($id);
|
||||||
return ($board->getOwner() === $userId);
|
return ($board->getOwner() === $userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findBoardId($id): ?int {
|
public function findBoardId(int $id): ?int {
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mapAcl(Acl &$acl) {
|
public function mapAcl(Acl &$acl): void {
|
||||||
$acl->resolveRelation('participant', function ($participant) use (&$acl) {
|
$acl->resolveRelation('participant', function ($participant) use (&$acl) {
|
||||||
if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {
|
if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {
|
||||||
if ($this->userManager->userExists($acl->getParticipant())) {
|
if ($this->userManager->userExists($acl->getParticipant())) {
|
||||||
|
|||||||
@@ -15,13 +15,18 @@ use Sabre\VObject\Component\VCalendar;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @method string getTitle()
|
* @method string getTitle()
|
||||||
|
* @method void setTitle(string $title)
|
||||||
* @method string getDescription()
|
* @method string getDescription()
|
||||||
* @method string getDescriptionPrev()
|
* @method string getDescriptionPrev()
|
||||||
* @method int getStackId()
|
* @method int getStackId()
|
||||||
|
* @method void setStackId(int $stackId)
|
||||||
* @method int getOrder()
|
* @method int getOrder()
|
||||||
|
* @method void setOrder(int $order)
|
||||||
* @method int getLastModified()
|
* @method int getLastModified()
|
||||||
* @method int getCreatedAt()
|
* @method int getCreatedAt()
|
||||||
* @method bool getArchived()
|
* @method bool getArchived()
|
||||||
|
* @method string getType()
|
||||||
|
* @method void setType(string $type)
|
||||||
* @method int getDeletedAt()
|
* @method int getDeletedAt()
|
||||||
* @method void setDeletedAt(int $deletedAt)
|
* @method void setDeletedAt(int $deletedAt)
|
||||||
* @method bool getNotified()
|
* @method bool getNotified()
|
||||||
@@ -58,7 +63,7 @@ use Sabre\VObject\Component\VCalendar;
|
|||||||
class Card extends RelationalEntity {
|
class Card extends RelationalEntity {
|
||||||
public const TITLE_MAX_LENGTH = 255;
|
public const TITLE_MAX_LENGTH = 255;
|
||||||
|
|
||||||
protected $title;
|
protected string $title = '';
|
||||||
protected $description;
|
protected $description;
|
||||||
protected $descriptionPrev;
|
protected $descriptionPrev;
|
||||||
protected $stackId;
|
protected $stackId;
|
||||||
@@ -68,8 +73,8 @@ class Card extends RelationalEntity {
|
|||||||
protected $createdAt;
|
protected $createdAt;
|
||||||
protected $labels;
|
protected $labels;
|
||||||
protected $assignedUsers;
|
protected $assignedUsers;
|
||||||
protected $attachments;
|
protected array $attachments = [];
|
||||||
protected $attachmentCount;
|
protected int $attachmentCount = 0;
|
||||||
protected $owner;
|
protected $owner;
|
||||||
protected $order;
|
protected $order;
|
||||||
protected $archived = false;
|
protected $archived = false;
|
||||||
@@ -165,7 +170,7 @@ class Card extends RelationalEntity {
|
|||||||
$matchDate->setTime(0, 0);
|
$matchDate->setTime(0, 0);
|
||||||
|
|
||||||
$diff = $today->diff($matchDate);
|
$diff = $today->diff($matchDate);
|
||||||
return (int) $diff->format('%R%a'); // Extract days count in interval
|
return (int)$diff->format('%R%a'); // Extract days count in interval
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCalendarPrefix(): string {
|
public function getCalendarPrefix(): string {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -45,7 +46,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
IManager $notificationManager,
|
IManager $notificationManager,
|
||||||
ICacheFactory $cacheFactory,
|
ICacheFactory $cacheFactory,
|
||||||
$databaseType = 'sqlite3',
|
$databaseType = 'sqlite3',
|
||||||
$database4ByteSupport = true
|
$database4ByteSupport = true,
|
||||||
) {
|
) {
|
||||||
parent::__construct($db, 'deck_cards', Card::class);
|
parent::__construct($db, 'deck_cards', Card::class);
|
||||||
$this->labelMapper = $labelMapper;
|
$this->labelMapper = $labelMapper;
|
||||||
@@ -85,16 +86,15 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
$updatedFields = $entity->getUpdatedFields();
|
$updatedFields = $entity->getUpdatedFields();
|
||||||
if (isset($updatedFields['duedate']) && $updatedFields['duedate']) {
|
if (isset($updatedFields['duedate']) && $updatedFields['duedate']) {
|
||||||
try {
|
try {
|
||||||
/** @var Card $existing */
|
|
||||||
$existing = $this->find($entity->getId());
|
$existing = $this->find($entity->getId());
|
||||||
if ($existing && $entity->getDuedate() !== $existing->getDuedate()) {
|
if ($entity->getDueDate() !== $existing->getDueDate()) {
|
||||||
$entity->setNotified(false);
|
$entity->setNotified(false);
|
||||||
}
|
}
|
||||||
// remove pending notifications
|
// remove pending notifications
|
||||||
$notification = $this->notificationManager->createNotification();
|
$notification = $this->notificationManager->createNotification();
|
||||||
$notification
|
$notification
|
||||||
->setApp('deck')
|
->setApp('deck')
|
||||||
->setObject('card', $entity->getId());
|
->setObject('card', (string)$entity->getId());
|
||||||
$this->notificationManager->markProcessed($notification);
|
$this->notificationManager->markProcessed($notification);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,11 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $card;
|
return $card;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAll($stackId, $limit = null, $offset = null, $since = -1) {
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
* @throws \OCP\DB\Exception
|
||||||
|
*/
|
||||||
|
public function findAll($stackId, ?int $limit = null, int $offset = 0, int $since = -1) {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
->from('deck_cards')
|
->from('deck_cards')
|
||||||
@@ -145,6 +149,32 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int[] $stackIds
|
||||||
|
* @return array<int, null|Card[]>
|
||||||
|
* @throws \OCP\DB\Exception
|
||||||
|
*/
|
||||||
|
public function findAllForStacks(array $stackIds, ?int $limit = null, int $offset = 0, int $since = -1): array {
|
||||||
|
$qb = $this->db->getQueryBuilder();
|
||||||
|
$qb->select('*')
|
||||||
|
->from('deck_cards')
|
||||||
|
->where($qb->expr()->in('stack_id', $qb->createNamedParameter($stackIds, IQueryBuilder::PARAM_INT_ARRAY)))
|
||||||
|
->andWhere($qb->expr()->eq('archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||||
|
->andWhere($qb->expr()->eq('deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||||
|
->andWhere($qb->expr()->gt('last_modified', $qb->createNamedParameter($since, IQueryBuilder::PARAM_INT)))
|
||||||
|
->setMaxResults($limit)
|
||||||
|
->setFirstResult($offset)
|
||||||
|
->orderBy('order')
|
||||||
|
->addOrderBy('id');
|
||||||
|
|
||||||
|
$rawCards = $this->findEntities($qb);
|
||||||
|
$cards = array_fill_keys($stackIds, null);
|
||||||
|
foreach ($rawCards as $card) {
|
||||||
|
$cards[$card->getStackId()][] = $card;
|
||||||
|
}
|
||||||
|
return $cards;
|
||||||
|
}
|
||||||
|
|
||||||
public function queryCardsByBoard(int $boardId): IQueryBuilder {
|
public function queryCardsByBoard(int $boardId): IQueryBuilder {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('c.*')
|
$qb->select('c.*')
|
||||||
@@ -163,7 +193,10 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $qb;
|
return $qb;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findToDelete($timeLimit, $limit = null) {
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
|
public function findToDelete(int $timeLimit, ?int $limit = null): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('id', 'title', 'owner', 'archived', 'deleted_at', 'last_modified')
|
$qb->select('id', 'title', 'owner', 'archived', 'deleted_at', 'last_modified')
|
||||||
->from('deck_cards')
|
->from('deck_cards')
|
||||||
@@ -174,7 +207,10 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findDeleted($boardId, $limit = null, $offset = null) {
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
|
public function findDeleted(int $boardId, ?int $limit = null, int $offset = 0): array {
|
||||||
$qb = $this->queryCardsByBoard($boardId);
|
$qb = $this->queryCardsByBoard($boardId);
|
||||||
$qb->andWhere($qb->expr()->neq('c.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
$qb->andWhere($qb->expr()->neq('c.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||||
->setMaxResults($limit)
|
->setMaxResults($limit)
|
||||||
@@ -184,7 +220,10 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findCalendarEntries($boardId, $limit = null, $offset = null) {
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
|
public function findCalendarEntries(int $boardId, ?int $limit = null, $offset = 0): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('c.*')
|
$qb->select('c.*')
|
||||||
->from('deck_cards', 'c')
|
->from('deck_cards', 'c')
|
||||||
@@ -239,7 +278,11 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findAllWithDue(array $boardIds) {
|
/**
|
||||||
|
* @param int[] $boardIds
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
|
public function findAllWithDue(array $boardIds): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('c.*')
|
$qb->select('c.*')
|
||||||
->from('deck_cards', 'c')
|
->from('deck_cards', 'c')
|
||||||
@@ -256,7 +299,11 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findToMeOrNotAssignedCards(array $boardIds, string $username) {
|
/**
|
||||||
|
* @param int[] $boardIds
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
|
public function findToMeOrNotAssignedCards(array $boardIds, string $username): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('c.*')
|
$qb->select('c.*')
|
||||||
->from('deck_cards', 'c')
|
->from('deck_cards', 'c')
|
||||||
@@ -278,7 +325,10 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findOverdue() {
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
|
public function findOverdue(): array {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('id', 'title', 'duedate', 'notified')
|
$qb->select('id', 'title', 'duedate', 'notified')
|
||||||
->from('deck_cards')
|
->from('deck_cards')
|
||||||
@@ -290,6 +340,9 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
public function findUnexposedDescriptionChances() {
|
public function findUnexposedDescriptionChances() {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description')
|
$qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description')
|
||||||
@@ -298,6 +351,9 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Card[]
|
||||||
|
*/
|
||||||
public function search(array $boardIds, SearchQuery $query, ?int $limit = null, ?int $offset = null): array {
|
public function search(array $boardIds, SearchQuery $query, ?int $limit = null, ?int $offset = null): array {
|
||||||
$qb = $this->queryCardsByBoards($boardIds);
|
$qb = $this->queryCardsByBoards($boardIds);
|
||||||
$this->extendQueryByFilter($qb, $query);
|
$this->extendQueryByFilter($qb, $query);
|
||||||
@@ -332,7 +388,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
$qb->andWhere($qb->expr()->lt('c.last_modified', $qb->createNamedParameter($offset, IQueryBuilder::PARAM_INT)));
|
$qb->andWhere($qb->expr()->lt('c.last_modified', $qb->createNamedParameter($offset, IQueryBuilder::PARAM_INT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $qb->execute();
|
$result = $qb->executeQuery();
|
||||||
$entities = [];
|
$entities = [];
|
||||||
while ($row = $result->fetch()) {
|
while ($row = $result->fetch()) {
|
||||||
$entities[] = Card::fromRow($row);
|
$entities[] = Card::fromRow($row);
|
||||||
@@ -375,7 +431,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
$qb->andWhere($qb->expr()->lt('comments.id', $qb->createNamedParameter($offset, IQueryBuilder::PARAM_INT)));
|
$qb->andWhere($qb->expr()->lt('comments.id', $qb->createNamedParameter($offset, IQueryBuilder::PARAM_INT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $qb->execute();
|
$result = $qb->executeQuery();
|
||||||
$entities = $result->fetchAll();
|
$entities = $result->fetchAll();
|
||||||
$result->closeCursor();
|
$result->closeCursor();
|
||||||
return $entities;
|
return $entities;
|
||||||
@@ -402,7 +458,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
if (count($query->getTag())) {
|
if (count($query->getTag())) {
|
||||||
foreach ($query->getTag() as $index => $tag) {
|
foreach ($query->getTag() as $index => $tag) {
|
||||||
$qb->innerJoin('c', 'deck_assigned_labels', 'al' . $index, $qb->expr()->eq('c.id', 'al' . $index . '.card_id'));
|
$qb->innerJoin('c', 'deck_assigned_labels', 'al' . $index, $qb->expr()->eq('c.id', 'al' . $index . '.card_id'));
|
||||||
$qb->innerJoin('al'. $index, 'deck_labels', 'l' . $index, $qb->expr()->eq('al' . $index . '.label_id', 'l' . $index . '.id'));
|
$qb->innerJoin('al' . $index, 'deck_labels', 'l' . $index, $qb->expr()->eq('al' . $index . '.label_id', 'l' . $index . '.id'));
|
||||||
$qb->andWhere($qb->expr()->iLike('l' . $index . '.title', $qb->createNamedParameter('%' . $this->db->escapeLikeParameter($tag->getValue()) . '%', IQueryBuilder::PARAM_STR)));
|
$qb->andWhere($qb->expr()->iLike('l' . $index . '.title', $qb->createNamedParameter('%' . $this->db->escapeLikeParameter($tag->getValue()) . '%', IQueryBuilder::PARAM_STR)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -410,7 +466,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
foreach ($query->getDuedate() as $duedate) {
|
foreach ($query->getDuedate() as $duedate) {
|
||||||
$dueDateColumn = $this->databaseType === 'sqlite3' ? $qb->createFunction('DATETIME(`c`.`duedate`)') : 'c.duedate';
|
$dueDateColumn = $this->databaseType === 'sqlite3' ? $qb->createFunction('DATETIME(`c`.`duedate`)') : 'c.duedate';
|
||||||
$date = $duedate->getValue();
|
$date = $duedate->getValue();
|
||||||
if ($date === "") {
|
if ($date === '') {
|
||||||
$qb->andWhere($qb->expr()->isNotNull('c.duedate'));
|
$qb->andWhere($qb->expr()->isNotNull('c.duedate'));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -461,7 +517,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
foreach ($query->getAssigned() as $index => $assignment) {
|
foreach ($query->getAssigned() as $index => $assignment) {
|
||||||
$qb->innerJoin('c', 'deck_assigned_users', 'au' . $index, $qb->expr()->eq('c.id', 'au' . $index . '.card_id'));
|
$qb->innerJoin('c', 'deck_assigned_users', 'au' . $index, $qb->expr()->eq('c.id', 'au' . $index . '.card_id'));
|
||||||
$assignedQueryValue = $assignment->getValue();
|
$assignedQueryValue = $assignment->getValue();
|
||||||
if ($assignedQueryValue === "") {
|
if ($assignedQueryValue === '') {
|
||||||
$qb->andWhere($qb->expr()->isNotNull('au' . $index . '.participant'));
|
$qb->andWhere($qb->expr()->isNotNull('au' . $index . '.participant'));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -471,7 +527,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
});
|
});
|
||||||
$groups = $this->groupManager->search($assignment->getValue());
|
$groups = $this->groupManager->search($assignment->getValue());
|
||||||
foreach ($searchUsers as $user) {
|
foreach ($searchUsers as $user) {
|
||||||
$groups = array_merge($groups, $this->groupManager->getUserIdGroups($user->getUID()));
|
$groups = array_merge($groups, $this->groupManager->getUserGroups($user));
|
||||||
}
|
}
|
||||||
|
|
||||||
$assignmentSearches = [];
|
$assignmentSearches = [];
|
||||||
@@ -524,7 +580,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
if ($offset !== null) {
|
if ($offset !== null) {
|
||||||
$qb->setFirstResult($offset);
|
$qb->setFirstResult($offset);
|
||||||
}
|
}
|
||||||
$result = $qb->execute();
|
$result = $qb->executeQuery();
|
||||||
$all = $result->fetchAll();
|
$all = $result->fetchAll();
|
||||||
$result->closeCursor();
|
$result->closeCursor();
|
||||||
return $all;
|
return $all;
|
||||||
@@ -536,32 +592,32 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return parent::delete($entity);
|
return parent::delete($entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteByStack($stackId) {
|
public function deleteByStack($stackId): void {
|
||||||
$cards = $this->findAllByStack($stackId);
|
$cards = $this->findAllByStack($stackId);
|
||||||
foreach ($cards as $card) {
|
foreach ($cards as $card) {
|
||||||
$this->delete($card);
|
$this->delete($card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assignLabel($card, $label) {
|
public function assignLabel(int $card, int $label): void {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->insert('deck_assigned_labels')
|
$qb->insert('deck_assigned_labels')
|
||||||
->values([
|
->values([
|
||||||
'label_id' => $qb->createNamedParameter($label, IQueryBuilder::PARAM_INT),
|
'label_id' => $qb->createNamedParameter($label, IQueryBuilder::PARAM_INT),
|
||||||
'card_id' => $qb->createNamedParameter($card, IQueryBuilder::PARAM_INT),
|
'card_id' => $qb->createNamedParameter($card, IQueryBuilder::PARAM_INT),
|
||||||
]);
|
]);
|
||||||
$qb->execute();
|
$qb->executeStatement();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeLabel($card, $label) {
|
public function removeLabel(int $card, int $label): void {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->delete('deck_assigned_labels')
|
$qb->delete('deck_assigned_labels')
|
||||||
->where($qb->expr()->eq('card_id', $qb->createNamedParameter($card, IQueryBuilder::PARAM_INT)))
|
->where($qb->expr()->eq('card_id', $qb->createNamedParameter($card, IQueryBuilder::PARAM_INT)))
|
||||||
->andWhere($qb->expr()->eq('label_id', $qb->createNamedParameter($label, IQueryBuilder::PARAM_INT)));
|
->andWhere($qb->expr()->eq('label_id', $qb->createNamedParameter($label, IQueryBuilder::PARAM_INT)));
|
||||||
$qb->execute();
|
$qb->executeStatement();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isOwner($userId, $id): bool {
|
public function isOwner(string $userId, int $id): bool {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('c.id')
|
$qb->select('c.id')
|
||||||
->from($this->getTableName(), 'c')
|
->from($this->getTableName(), 'c')
|
||||||
@@ -573,7 +629,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return count($qb->executeQuery()->fetchAll()) > 0;
|
return count($qb->executeQuery()->fetchAll()) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findBoardId($id): ?int {
|
public function findBoardId(int $id): ?int {
|
||||||
$result = $this->cache->get('findBoardId:' . $id);
|
$result = $this->cache->get('findBoardId:' . $id);
|
||||||
if ($result === null) {
|
if ($result === null) {
|
||||||
try {
|
try {
|
||||||
@@ -589,7 +645,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
$this->cache->set('findBoardId:' . $id, $result);
|
$this->cache->set('findBoardId:' . $id, $result);
|
||||||
}
|
}
|
||||||
return $result !== false ? (int) $result : null;
|
return $result !== false ? (int)$result : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mapOwner(Card &$card) {
|
public function mapOwner(Card &$card) {
|
||||||
@@ -603,13 +659,11 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function transferOwnership(string $ownerId, string $newOwnerId, ?int $boardId = null): void {
|
public function transferOwnership(string $ownerId, string $newOwnerId, ?int $boardId = null): void {
|
||||||
$params = [
|
$qb = $this->db->getQueryBuilder();
|
||||||
'owner' => $ownerId,
|
$qb->update($this->getTableName())
|
||||||
'newOwner' => $newOwnerId
|
->set('owner', $qb->createNamedParameter($newOwnerId, IQueryBuilder::PARAM_STR))
|
||||||
];
|
->where('owner', $qb->createNamedParameter($ownerId, IQueryBuilder::PARAM_STR))
|
||||||
$sql = "UPDATE `*PREFIX*{$this->tableName}` SET `owner` = :newOwner WHERE `owner` = :owner";
|
->executeStatement();
|
||||||
$stmt = $this->db->executeQuery($sql, $params);
|
|
||||||
$stmt->closeCursor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remapCardOwner(int $boardId, string $userId, string $newUserId): void {
|
public function remapCardOwner(int $boardId, string $userId, string $newUserId): void {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -24,7 +25,7 @@ class ChangeHelper {
|
|||||||
IDBConnection $db,
|
IDBConnection $db,
|
||||||
ICacheFactory $cacheFactory,
|
ICacheFactory $cacheFactory,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
?string $userId
|
?string $userId,
|
||||||
) {
|
) {
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->cache = $cacheFactory->createDistributed('deck_changes');
|
$this->cache = $cacheFactory->createDistributed('deck_changes');
|
||||||
@@ -43,7 +44,7 @@ class ChangeHelper {
|
|||||||
public function cardChanged($cardId, $updateCard = true) {
|
public function cardChanged($cardId, $updateCard = true) {
|
||||||
$time = time();
|
$time = time();
|
||||||
$etag = md5($time . microtime());
|
$etag = md5($time . microtime());
|
||||||
$this->cache->set(self::TYPE_CARD . '-' .$cardId, $etag);
|
$this->cache->set(self::TYPE_CARD . '-' . $cardId, $etag);
|
||||||
if ($updateCard) {
|
if ($updateCard) {
|
||||||
$sql = 'UPDATE `*PREFIX*deck_cards` SET `last_modified` = ?, `last_editor` = ? WHERE `id` = ?';
|
$sql = 'UPDATE `*PREFIX*deck_cards` SET `last_modified` = ?, `last_editor` = ? WHERE `id` = ?';
|
||||||
$this->db->executeUpdate($sql, [time(), $this->userId, $cardId]);
|
$this->db->executeUpdate($sql, [time(), $this->userId, $cardId]);
|
||||||
@@ -60,7 +61,7 @@ class ChangeHelper {
|
|||||||
public function stackChanged($stackId, $updateBoard = true) {
|
public function stackChanged($stackId, $updateBoard = true) {
|
||||||
$time = time();
|
$time = time();
|
||||||
$etag = md5($time . microtime());
|
$etag = md5($time . microtime());
|
||||||
$this->cache->set(self::TYPE_CARD . '-' .$stackId, $etag);
|
$this->cache->set(self::TYPE_CARD . '-' . $stackId, $etag);
|
||||||
if ($updateBoard) {
|
if ($updateBoard) {
|
||||||
$sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?';
|
$sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?';
|
||||||
$this->db->executeUpdate($sql, [time(), $stackId]);
|
$this->db->executeUpdate($sql, [time(), $stackId]);
|
||||||
@@ -76,7 +77,7 @@ class ChangeHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getEtag($type, $id) {
|
public function getEtag($type, $id) {
|
||||||
$entry = $this->cache->get($type . '-' .$id);
|
$entry = $this->cache->get($type . '-' . $id);
|
||||||
if ($entry === 'null') {
|
if ($entry === 'null') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@@ -18,12 +19,11 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
|
|||||||
abstract class DeckMapper extends QBMapper {
|
abstract class DeckMapper extends QBMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $id
|
|
||||||
* @return T
|
* @return T
|
||||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||||
* @throws \OCP\AppFramework\Db\DoesNotExistException
|
* @throws \OCP\AppFramework\Db\DoesNotExistException
|
||||||
*/
|
*/
|
||||||
public function find($id) {
|
public function find(int $id): Entity {
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->select('*')
|
||||||
->from($this->getTableName())
|
->from($this->getTableName())
|
||||||
@@ -36,7 +36,7 @@ abstract class DeckMapper extends QBMapper {
|
|||||||
* Helper function to split passed array into chunks of 1000 elements and
|
* Helper function to split passed array into chunks of 1000 elements and
|
||||||
* call a given callback for fetching query results
|
* call a given callback for fetching query results
|
||||||
*
|
*
|
||||||
* Can be useful to limit to 1000 results per query for oracle compatiblity
|
* Can be useful to limit to 1000 results per query for oracle compatibility
|
||||||
* but still iterate over all results
|
* but still iterate over all results
|
||||||
*/
|
*/
|
||||||
public function chunkQuery(array $ids, callable $callback): Generator {
|
public function chunkQuery(array $ids, callable $callback): Generator {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user