Compare commits
784 Commits
automated/
...
mod-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
0b07f6a5a4
|
|||
|
bac32ace61
|
|||
|
afd1749ab7
|
|||
|
|
b84025d59b | ||
|
|
b866db3559 | ||
|
|
9e3fbae6c3 | ||
|
|
a20f2444b9 | ||
|
|
682778b6b6 | ||
|
|
39693e842b | ||
|
|
4c09c65e9e | ||
|
|
637b8666b1 | ||
|
|
9e098f17c7 | ||
|
|
7c74e28735 | ||
|
|
56b2a63723 | ||
|
|
90f51f931f | ||
|
|
0115fee075 | ||
|
|
42cf69a05c | ||
|
|
20b5716e33 | ||
|
|
60d02ff837 | ||
|
|
604018008c | ||
|
|
e2d83ce90c | ||
|
|
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 | ||
|
|
b3d7e1b128 | ||
|
|
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",
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ name: Package build
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- draggable
|
||||||
- master
|
|
||||||
- stable*
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -16,28 +14,28 @@ 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
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb
|
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.13.3/krankerl_0.13.3_amd64.deb
|
||||||
sudo dpkg -i krankerl_0.14.0_amd64.deb
|
sudo dpkg -i krankerl_0.13.3_amd64.deb
|
||||||
- name: package
|
- name: package
|
||||||
run: |
|
run: |
|
||||||
uname -a
|
uname -a
|
||||||
RUST_BACKTRACE=1 krankerl --version
|
RUST_BACKTRACE=1 krankerl --version
|
||||||
RUST_BACKTRACE=1 krankerl package
|
RUST_BACKTRACE=1 krankerl package
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Deck app tarball
|
name: Deck app tarball
|
||||||
path: build/artifacts/deck.tar.gz
|
path: build/artifacts/deck.tar.gz
|
||||||
120
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
120
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
@@ -1,120 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Thanks for reporting issues back!
|
|
||||||
|
|
||||||
Guidelines for submitting issues:
|
|
||||||
|
|
||||||
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
|
|
||||||
|
|
||||||
* SECURITY: Report any potential security bug to us via our HackerOne page (https://hackerone.com/nextcloud) following our security policy (https://nextcloud.com/security/) instead of filing an issue in our bug tracker.
|
|
||||||
|
|
||||||
* The issues in other components should be reported in their respective repositories: You will find them in our GitHub Organization (https://github.com/nextcloud/)
|
|
||||||
|
|
||||||
* You can also use the Issue Template app to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--- Please keep this note for other contributors -->
|
|
||||||
|
|
||||||
### How to use GitHub
|
|
||||||
|
|
||||||
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
|
|
||||||
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
|
|
||||||
* Subscribe to receive notifications on status change and new comments.
|
|
||||||
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Client details:**
|
|
||||||
- OS: [e.g. iOS]
|
|
||||||
- Browser [e.g. chrome, safari]
|
|
||||||
- Version [e.g. 22]
|
|
||||||
- Device: [e.g. iPhone6, desktop]
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Server details</summary>
|
|
||||||
<!--
|
|
||||||
You can use the Issue Template application to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Operating system**:
|
|
||||||
|
|
||||||
**Web server:**
|
|
||||||
|
|
||||||
**Database:**
|
|
||||||
|
|
||||||
**PHP version:**
|
|
||||||
|
|
||||||
**Nextcloud version:** (see Nextcloud admin page)
|
|
||||||
|
|
||||||
**Where did you install Nextcloud from:**
|
|
||||||
|
|
||||||
**Signing status:**
|
|
||||||
|
|
||||||
```
|
|
||||||
Login as admin user into your Nextcloud and access
|
|
||||||
http://example.com/index.php/settings/integrity/failed
|
|
||||||
paste the results here.
|
|
||||||
```
|
|
||||||
|
|
||||||
**List of activated apps:**
|
|
||||||
|
|
||||||
```
|
|
||||||
If you have access to your command line run e.g.:
|
|
||||||
sudo -u www-data php occ app:list
|
|
||||||
from within your Nextcloud installation folder
|
|
||||||
```
|
|
||||||
|
|
||||||
**Nextcloud configuration:**
|
|
||||||
|
|
||||||
```
|
|
||||||
If you have access to your command line run e.g.:
|
|
||||||
sudo -u www-data php occ config:list system
|
|
||||||
from within your Nextcloud installation folder
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
Insert your config.php content here
|
|
||||||
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
|
|
||||||
```
|
|
||||||
|
|
||||||
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Logs</summary>
|
|
||||||
|
|
||||||
#### Nextcloud log (data/nextcloud.log)
|
|
||||||
```
|
|
||||||
Insert your Nextcloud log here
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Browser log
|
|
||||||
```
|
|
||||||
Insert your browser log here, this could for example include:
|
|
||||||
|
|
||||||
a) The javascript console log
|
|
||||||
b) The network log
|
|
||||||
c) ...
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
39
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
39
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
@@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Thanks for reporting issues back!
|
|
||||||
|
|
||||||
Guidelines for submitting issues:
|
|
||||||
|
|
||||||
* Please search the existing issues first, it's likely that your issue was already reported or even fixed.
|
|
||||||
|
|
||||||
* SECURITY: Report any potential security bug to us via our HackerOne page (https://hackerone.com/nextcloud) following our security policy (https://nextcloud.com/security/) instead of filing an issue in our bug tracker.
|
|
||||||
|
|
||||||
* The issues in other components should be reported in their respective repositories: You will find them in our GitHub Organization (https://github.com/nextcloud/)
|
|
||||||
|
|
||||||
* You can also use the Issue Template app to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--- Please keep this note for other contributors -->
|
|
||||||
|
|
||||||
### How to use GitHub
|
|
||||||
|
|
||||||
* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
|
|
||||||
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
|
|
||||||
* Subscribe to receive notifications on status change and new comments.
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
101
.github/dependabot.yml
vendored
101
.github/dependabot.yml
vendored
@@ -1,101 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: npm
|
|
||||||
directory: "/"
|
|
||||||
target-branch: "main"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
reviewers:
|
|
||||||
- juliushaertl
|
|
||||||
- luka-nextcloud
|
|
||||||
|
|
||||||
- package-ecosystem: npm
|
|
||||||
target-branch: stable29
|
|
||||||
versioning-strategy: lockfile-only
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "*"
|
|
||||||
update-types: ["version-update:semver-major"]
|
|
||||||
open-pull-requests-limit: 30
|
|
||||||
labels:
|
|
||||||
- 3. to review
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- package-ecosystem: npm
|
|
||||||
target-branch: stable28
|
|
||||||
versioning-strategy: lockfile-only
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "*"
|
|
||||||
update-types: ["version-update:semver-major"]
|
|
||||||
open-pull-requests-limit: 30
|
|
||||||
labels:
|
|
||||||
- 3. to review
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- package-ecosystem: npm
|
|
||||||
target-branch: stable27
|
|
||||||
versioning-strategy: lockfile-only
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
ignore:
|
|
||||||
- dependency-name: "*"
|
|
||||||
update-types: ["version-update:semver-major"]
|
|
||||||
open-pull-requests-limit: 30
|
|
||||||
labels:
|
|
||||||
- 3. to review
|
|
||||||
- dependencies
|
|
||||||
|
|
||||||
- package-ecosystem: composer
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
reviewers:
|
|
||||||
- juliushaertl
|
|
||||||
- luka-nextcloud
|
|
||||||
|
|
||||||
- package-ecosystem: composer
|
|
||||||
directory: "/tests/integration"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
reviewers:
|
|
||||||
- juliushaertl
|
|
||||||
- luka-nextcloud
|
|
||||||
|
|
||||||
- package-ecosystem: github-actions
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: saturday
|
|
||||||
time: "03:00"
|
|
||||||
timezone: Europe/Paris
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
reviewers:
|
|
||||||
- juliushaertl
|
|
||||||
- luka-nextcloud
|
|
||||||
17
.github/pull_request_template.md
vendored
17
.github/pull_request_template.md
vendored
@@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
* Resolves: # <!-- related github issue -->
|
|
||||||
* Target version: main
|
|
||||||
|
|
||||||
### Summary
|
|
||||||
|
|
||||||
|
|
||||||
### TODO
|
|
||||||
|
|
||||||
- [ ] ...
|
|
||||||
|
|
||||||
### Checklist
|
|
||||||
|
|
||||||
- [ ] Code is properly formatted
|
|
||||||
- [ ] Sign-off message is added to all commits
|
|
||||||
- [ ] Tests (unit, integration, api and/or acceptance) are included
|
|
||||||
- [ ] Documentation (manuals or wiki) has been updated or is not required
|
|
||||||
191
.github/workflows/appstore-build-publish.yml
vendored
191
.github/workflows/appstore-build-publish.yml
vendored
@@ -1,191 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Build and publish app release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_and_publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# Only allowed to be run on nextcloud-releases repositories
|
|
||||||
if: ${{ github.repository_owner == 'nextcloud-releases' }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check actor permission
|
|
||||||
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
|
|
||||||
with:
|
|
||||||
require: write
|
|
||||||
|
|
||||||
- name: Set app env
|
|
||||||
run: |
|
|
||||||
# Split and keep last
|
|
||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
|
||||||
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
path: ${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Get app version number
|
|
||||||
id: app-version
|
|
||||||
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
|
|
||||||
with:
|
|
||||||
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
|
||||||
expression: "//info//version/text()"
|
|
||||||
|
|
||||||
- name: Validate app version against tag
|
|
||||||
run: |
|
|
||||||
[ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
|
|
||||||
|
|
||||||
- name: Get appinfo data
|
|
||||||
id: appinfo
|
|
||||||
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
|
|
||||||
with:
|
|
||||||
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
|
||||||
expression: "//info//dependencies//nextcloud/@min-version"
|
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
|
||||||
id: versions
|
|
||||||
# Continue if no package.json
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
path: ${{ env.APP_NAME }}
|
|
||||||
fallbackNode: '^20'
|
|
||||||
fallbackNpm: '^10'
|
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
# Skip if no package.json
|
|
||||||
if: ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
|
|
||||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
|
||||||
# Skip if no package.json
|
|
||||||
if: ${{ steps.versions.outputs.npmVersion }}
|
|
||||||
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
|
|
||||||
|
|
||||||
- name: Get php version
|
|
||||||
id: php-versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
|
||||||
with:
|
|
||||||
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
|
||||||
|
|
||||||
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
php-version: ${{ steps.php-versions.outputs.php-min }}
|
|
||||||
coverage: none
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Check composer.json
|
|
||||||
id: check_composer
|
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
|
||||||
with:
|
|
||||||
files: "${{ env.APP_NAME }}/composer.json"
|
|
||||||
|
|
||||||
- name: Install composer dependencies
|
|
||||||
if: steps.check_composer.outputs.files_exists == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${{ env.APP_NAME }}
|
|
||||||
composer install --no-dev
|
|
||||||
|
|
||||||
- name: Build ${{ env.APP_NAME }}
|
|
||||||
# Skip if no package.json
|
|
||||||
if: ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
env:
|
|
||||||
CYPRESS_INSTALL_BINARY: 0
|
|
||||||
run: |
|
|
||||||
cd ${{ env.APP_NAME }}
|
|
||||||
npm ci
|
|
||||||
npm run build --if-present
|
|
||||||
|
|
||||||
- name: Check Krankerl config
|
|
||||||
id: krankerl
|
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
|
||||||
with:
|
|
||||||
files: ${{ env.APP_NAME }}/krankerl.toml
|
|
||||||
|
|
||||||
- name: Install Krankerl
|
|
||||||
if: steps.krankerl.outputs.files_exists == 'true'
|
|
||||||
run: |
|
|
||||||
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb
|
|
||||||
sudo dpkg -i krankerl_0.14.0_amd64.deb
|
|
||||||
|
|
||||||
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with krankerl
|
|
||||||
if: steps.krankerl.outputs.files_exists == 'true'
|
|
||||||
run: |
|
|
||||||
cd ${{ env.APP_NAME }}
|
|
||||||
krankerl package
|
|
||||||
|
|
||||||
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with makefile
|
|
||||||
if: steps.krankerl.outputs.files_exists != 'true'
|
|
||||||
run: |
|
|
||||||
cd ${{ env.APP_NAME }}
|
|
||||||
make appstore
|
|
||||||
|
|
||||||
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
|
|
||||||
continue-on-error: true
|
|
||||||
id: server-checkout
|
|
||||||
run: |
|
|
||||||
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
|
|
||||||
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
|
|
||||||
unzip latest-$NCVERSION.zip
|
|
||||||
|
|
||||||
- name: Checkout server master fallback
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
if: ${{ steps.server-checkout.outcome != 'success' }}
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
submodules: true
|
|
||||||
repository: nextcloud/server
|
|
||||||
path: nextcloud
|
|
||||||
|
|
||||||
- name: Sign app
|
|
||||||
run: |
|
|
||||||
# Extracting release
|
|
||||||
cd ${{ env.APP_NAME }}/build/artifacts
|
|
||||||
tar -xvf ${{ env.APP_NAME }}.tar.gz
|
|
||||||
cd ../../../
|
|
||||||
# Setting up keys
|
|
||||||
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
|
|
||||||
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
|
|
||||||
# Signing
|
|
||||||
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
|
|
||||||
# Rebuilding archive
|
|
||||||
cd ${{ env.APP_NAME }}/build/artifacts
|
|
||||||
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Attach tarball to github release
|
|
||||||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
|
|
||||||
id: attach_to_release
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}.tar.gz
|
|
||||||
asset_name: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}.tar.gz
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
- name: Upload app to Nextcloud appstore
|
|
||||||
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
|
|
||||||
with:
|
|
||||||
app_name: ${{ env.APP_NAME }}
|
|
||||||
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
|
|
||||||
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
|
|
||||||
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
||||||
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"
|
|
||||||
153
.github/workflows/cypress-e2e.yml
vendored
153
.github/workflows/cypress-e2e.yml
vendored
@@ -1,153 +0,0 @@
|
|||||||
name: Cypress
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- stable*
|
|
||||||
|
|
||||||
env:
|
|
||||||
APP_NAME: deck
|
|
||||||
CYPRESS_baseUrl: http://localhost:8081/index.php
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cypress:
|
|
||||||
|
|
||||||
runs-on: 'ubuntu-latest'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
node-version: [20.x]
|
|
||||||
# containers: [1, 2, 3]
|
|
||||||
php-versions: [ '8.2' ]
|
|
||||||
server-versions: [ 'stable30' ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
|
|
||||||
key: cache-v1
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
|
|
||||||
ports:
|
|
||||||
- 4444:5432/tcp
|
|
||||||
env:
|
|
||||||
POSTGRES_USER: root
|
|
||||||
POSTGRES_PASSWORD: rootpassword
|
|
||||||
POSTGRES_DB: nextcloud
|
|
||||||
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.3
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
|
|
||||||
- name: Register text Git reference
|
|
||||||
run: |
|
|
||||||
text_app_ref="$(if [ "${{ matrix.server-versions }}" = "master" ]; then echo -n "main"; else echo -n "${{ matrix.server-versions }}"; fi)"
|
|
||||||
echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout server
|
|
||||||
uses: actions/checkout@v4.1.7
|
|
||||||
with:
|
|
||||||
repository: nextcloud/server
|
|
||||||
ref: ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
- name: Checkout submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
|
|
||||||
- name: Checkout ${{ env.APP_NAME }}
|
|
||||||
uses: actions/checkout@v4.1.7
|
|
||||||
with:
|
|
||||||
path: apps/${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Checkout text
|
|
||||||
uses: actions/checkout@v4.1.7
|
|
||||||
with:
|
|
||||||
repository: nextcloud/text
|
|
||||||
ref: ${{ env.text_app_ref }}
|
|
||||||
path: apps/text
|
|
||||||
|
|
||||||
- name: Setup cache environment
|
|
||||||
id: extcache
|
|
||||||
uses: shivammathur/cache-extensions@v1
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
extensions: ${{ env.extensions }}
|
|
||||||
key: ${{ env.key }}
|
|
||||||
|
|
||||||
- name: Cache extensions
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ steps.extcache.outputs.dir }}
|
|
||||||
key: ${{ steps.extcache.outputs.key }}
|
|
||||||
restore-keys: ${{ steps.extcache.outputs.key }}
|
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
|
||||||
uses: shivammathur/setup-php@2.31.1
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
extensions: ${{ env.extensions }}
|
|
||||||
ini-values:
|
|
||||||
apc.enable_cli=on
|
|
||||||
coverage: none
|
|
||||||
|
|
||||||
- name: Install composer dependencies
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer install --no-dev
|
|
||||||
|
|
||||||
- name: Set up Nextcloud
|
|
||||||
env:
|
|
||||||
DB_PORT: 4444
|
|
||||||
PHP_CLI_SERVER_WORKERS: 20
|
|
||||||
run: |
|
|
||||||
mkdir data
|
|
||||||
echo '<?php $CONFIG=["memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php
|
|
||||||
php occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
|
|
||||||
php occ background:cron
|
|
||||||
php -f index.php
|
|
||||||
php -S 0.0.0.0:8081 &
|
|
||||||
export OC_PASS=1234561
|
|
||||||
php occ user:add --password-from-env user1
|
|
||||||
php occ user:add --password-from-env user2
|
|
||||||
php occ app:enable deck
|
|
||||||
php occ app:list
|
|
||||||
curl -v http://localhost:8081/index.php/login
|
|
||||||
|
|
||||||
- name: Cypress run
|
|
||||||
uses: cypress-io/github-action@v6
|
|
||||||
with:
|
|
||||||
build: npm run dev
|
|
||||||
record: false
|
|
||||||
parallel: false
|
|
||||||
browser: chrome
|
|
||||||
wait-on: '${{ env.CYPRESS_baseUrl }}'
|
|
||||||
working-directory: 'apps/${{ env.APP_NAME }}'
|
|
||||||
config: defaultCommandTimeout=10000,video=false
|
|
||||||
env:
|
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
||||||
npm_package_name: ${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Upload test failure screenshots
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: Upload screenshots
|
|
||||||
path: apps/${{ env.APP_NAME }}/cypress/screenshots/
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Upload nextcloud logs
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: Upload nextcloud log
|
|
||||||
path: data/nextcloud.log
|
|
||||||
retention-days: 5
|
|
||||||
49
.github/workflows/dependabot-approve-merge.yml
vendored
49
.github/workflows/dependabot-approve-merge.yml
vendored
@@ -1,49 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Dependabot
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target: # zizmor: ignore[dangerous-triggers]
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- stable*
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: dependabot-approve-merge-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
auto-approve-merge:
|
|
||||||
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
permissions:
|
|
||||||
# for hmarr/auto-approve-action to approve PRs
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Disabled on forks
|
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
|
||||||
run: |
|
|
||||||
echo 'Can not approve PRs from forks'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
# GitHub actions bot approve
|
|
||||||
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# Nextcloud bot approve and merge request
|
|
||||||
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2
|
|
||||||
with:
|
|
||||||
target: minor
|
|
||||||
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
|
|
||||||
36
.github/workflows/fixup.yml
vendored
36
.github/workflows/fixup.yml
vendored
@@ -1,36 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Block fixup and squash commits
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, ready_for_review, reopened, synchronize]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: fixup-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
commit-message-check:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
name: Block fixup and squash commits
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Run check
|
|
||||||
uses: skjnldsv/block-fixup-merge-action@c138ea99e45e186567b64cf065ce90f7158c236a # v2
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
161
.github/workflows/integration.yml
vendored
161
.github/workflows/integration.yml
vendored
@@ -1,161 +0,0 @@
|
|||||||
name: Integration tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/integration.yml'
|
|
||||||
- 'appinfo/**'
|
|
||||||
- 'lib/**'
|
|
||||||
- 'templates/**'
|
|
||||||
- 'tests/**'
|
|
||||||
- 'composer.json'
|
|
||||||
- 'composer.lock'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- stable*
|
|
||||||
|
|
||||||
env:
|
|
||||||
APP_NAME: deck
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
integration:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
php-versions: ['8.1']
|
|
||||||
databases: ['sqlite', 'mysql', 'pgsql']
|
|
||||||
server-versions: ['stable30']
|
|
||||||
|
|
||||||
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:14
|
|
||||||
ports:
|
|
||||||
- 4445:5432/tcp
|
|
||||||
env:
|
|
||||||
POSTGRES_USER: root
|
|
||||||
POSTGRES_PASSWORD: rootpassword
|
|
||||||
POSTGRES_DB: nextcloud
|
|
||||||
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
|
|
||||||
mysql:
|
|
||||||
image: mariadb:10.5
|
|
||||||
ports:
|
|
||||||
- 4444:3306/tcp
|
|
||||||
env:
|
|
||||||
MYSQL_ROOT_PASSWORD: rootpassword
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout server
|
|
||||||
uses: actions/checkout@v4.1.7
|
|
||||||
with:
|
|
||||||
repository: nextcloud/server
|
|
||||||
ref: ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
- name: Checkout submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
cd build/integration && composer require --dev phpunit/phpunit:~9
|
|
||||||
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@v4.1.7
|
|
||||||
with:
|
|
||||||
path: apps/${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Checkout activity
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
repository: nextcloud/activity
|
|
||||||
ref: ${{ matrix.server-versions }}
|
|
||||||
path: apps/activity
|
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
|
||||||
uses: shivammathur/setup-php@2.31.1
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu, gd
|
|
||||||
ini-values:
|
|
||||||
apc.enable_cli=on
|
|
||||||
coverage: none
|
|
||||||
|
|
||||||
- name: Set up dependencies
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer i --no-dev
|
|
||||||
|
|
||||||
- name: Set up Nextcloud
|
|
||||||
run: |
|
|
||||||
if [ "${{ matrix.databases }}" = "mysql" ]; then
|
|
||||||
export DB_PORT=4444
|
|
||||||
elif [ "${{ matrix.databases }}" = "pgsql" ]; then
|
|
||||||
export DB_PORT=4445
|
|
||||||
fi
|
|
||||||
mkdir data
|
|
||||||
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
|
|
||||||
./occ config:system:set hashing_default_password --value=true --type=boolean
|
|
||||||
./occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu"
|
|
||||||
./occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu"
|
|
||||||
cat config/config.php
|
|
||||||
./occ user:list
|
|
||||||
./occ app:enable --force ${{ env.APP_NAME }}
|
|
||||||
./occ config:system:set query_log_file --value "$PWD/query.log"
|
|
||||||
php -S localhost:8080 &
|
|
||||||
|
|
||||||
- name: Run behat
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}/tests/integration
|
|
||||||
run: ./run.sh
|
|
||||||
|
|
||||||
- name: Query count
|
|
||||||
if: ${{ matrix.databases == 'mysql' }}
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
script: |
|
|
||||||
let myOutput = ''
|
|
||||||
let myError = ''
|
|
||||||
|
|
||||||
const options = {}
|
|
||||||
options.listeners = {
|
|
||||||
stdout: (data) => {
|
|
||||||
myOutput += data.toString()
|
|
||||||
},
|
|
||||||
stderr: (data) => {
|
|
||||||
myError += data.toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await exec.exec(`/bin/bash -c "cat query.log | wc -l"`, [], options)
|
|
||||||
msg = myOutput
|
|
||||||
const queryCount = parseInt(myOutput, 10)
|
|
||||||
|
|
||||||
myOutput = ''
|
|
||||||
await exec.exec('cat', ['apps/${{ env.APP_NAME }}/tests/integration/base-query-count.txt'], options)
|
|
||||||
const baseCount = parseInt(myOutput, 10)
|
|
||||||
|
|
||||||
const absoluteIncrease = queryCount - baseCount
|
|
||||||
const relativeIncrease = baseCount <= 0 ? 100 : (parseInt((absoluteIncrease / baseCount * 10000), 10) / 100)
|
|
||||||
|
|
||||||
if (absoluteIncrease >= 100 || relativeIncrease > 5) {
|
|
||||||
const comment = `🐢 Performance warning.\nIt looks like the query count of the integration tests increased with this PR.\nDatabase query count is now ` + queryCount + ' was ' + baseCount + ' (+' + relativeIncrease + '%)\nPlease check your code again. If you added a new test this can be expected and the base value in tests/integration/base-query-count.txt can be increased.'
|
|
||||||
github.rest.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: comment
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (queryCount < 100) {
|
|
||||||
const comment = `🐈 Performance messuring seems broken. Failed to get query count.`
|
|
||||||
github.rest.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: comment
|
|
||||||
})
|
|
||||||
}
|
|
||||||
98
.github/workflows/lint-eslint.yml
vendored
98
.github/workflows/lint-eslint.yml
vendored
@@ -1,98 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Lint eslint
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: lint-eslint-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
changes:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
src: ${{ steps.changes.outputs.src}}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
||||||
id: changes
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
src:
|
|
||||||
- '.github/workflows/**'
|
|
||||||
- 'src/**'
|
|
||||||
- 'appinfo/info.xml'
|
|
||||||
- 'package.json'
|
|
||||||
- 'package-lock.json'
|
|
||||||
- 'tsconfig.json'
|
|
||||||
- '.eslintrc.*'
|
|
||||||
- '.eslintignore'
|
|
||||||
- '**.js'
|
|
||||||
- '**.ts'
|
|
||||||
- '**.vue'
|
|
||||||
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: changes
|
|
||||||
if: needs.changes.outputs.src != 'false'
|
|
||||||
|
|
||||||
name: NPM lint
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
|
||||||
id: versions
|
|
||||||
with:
|
|
||||||
fallbackNode: '^20'
|
|
||||||
fallbackNpm: '^10'
|
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
|
|
||||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
|
||||||
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
env:
|
|
||||||
CYPRESS_INSTALL_BINARY: 0
|
|
||||||
PUPPETEER_SKIP_DOWNLOAD: true
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: npm run lint
|
|
||||||
|
|
||||||
summary:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
needs: [changes, lint]
|
|
||||||
|
|
||||||
if: always()
|
|
||||||
|
|
||||||
# This is the summary, we just avoid to rename it so that branch protection rules still match
|
|
||||||
name: eslint
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Summary status
|
|
||||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
|
|
||||||
50
.github/workflows/lint-php-cs.yml
vendored
50
.github/workflows/lint-php-cs.yml
vendored
@@ -1,50 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Lint php-cs
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: lint-php-cs-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
name: php-cs
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Get php version
|
|
||||||
id: versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
|
||||||
|
|
||||||
- name: Set up php${{ steps.versions.outputs.php-available }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
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
|
|
||||||
coverage: none
|
|
||||||
ini-file: development
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
composer remove nextcloud/ocp --dev
|
|
||||||
composer i
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
|
|
||||||
70
.github/workflows/lint-php.yml
vendored
70
.github/workflows/lint-php.yml
vendored
@@ -1,70 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Lint php
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: lint-php-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
outputs:
|
|
||||||
php-versions: ${{ steps.versions.outputs.php-versions }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
- name: Get version matrix
|
|
||||||
id: versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
|
|
||||||
|
|
||||||
php-lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: matrix
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
|
|
||||||
|
|
||||||
name: php-lint
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
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
|
|
||||||
coverage: none
|
|
||||||
ini-file: development
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: composer run lint
|
|
||||||
|
|
||||||
summary:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
needs: php-lint
|
|
||||||
|
|
||||||
if: always()
|
|
||||||
|
|
||||||
name: php-lint-summary
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Summary status
|
|
||||||
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
|
|
||||||
51
.github/workflows/lint-stylelint.yml
vendored
51
.github/workflows/lint-stylelint.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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Lint stylelint
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: lint-stylelint-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
name: stylelint
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
|
||||||
id: versions
|
|
||||||
with:
|
|
||||||
fallbackNode: '^20'
|
|
||||||
fallbackNpm: '^10'
|
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
|
|
||||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
|
||||||
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
env:
|
|
||||||
CYPRESS_INSTALL_BINARY: 0
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: npm run stylelint
|
|
||||||
34
.github/workflows/nodejs.yml
vendored
34
.github/workflows/nodejs.yml
vendored
@@ -1,34 +0,0 @@
|
|||||||
name: Node CI
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [14.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.7
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.3
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: Set up npm7
|
|
||||||
run: npm i -g npm@7
|
|
||||||
- name: install dependencies
|
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
- name: build
|
|
||||||
env:
|
|
||||||
RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}
|
|
||||||
RELATIVE_CI_SLUG: nextcloud/deck
|
|
||||||
run: |
|
|
||||||
mkdir -p js
|
|
||||||
npm run build --if-present -- --profile --json | tail -n +6 > js/webpack-stats.json
|
|
||||||
npx relative-ci-agent
|
|
||||||
|
|
||||||
|
|
||||||
75
.github/workflows/npm-audit-fix.yml
vendored
75
.github/workflows/npm-audit-fix.yml
vendored
@@ -1,75 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Npm audit fix and compile
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
# At 2:30 on Sundays
|
|
||||||
- cron: '30 2 * * 0'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
branches: ['main', 'master', 'stable29', 'stable28', 'stable27']
|
|
||||||
|
|
||||||
name: npm-audit-fix-${{ matrix.branches }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
ref: ${{ matrix.branches }}
|
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
|
||||||
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
|
||||||
id: versions
|
|
||||||
with:
|
|
||||||
fallbackNode: '^20'
|
|
||||||
fallbackNpm: '^10'
|
|
||||||
|
|
||||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
|
||||||
with:
|
|
||||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
|
||||||
|
|
||||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
|
||||||
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
|
|
||||||
|
|
||||||
- name: Fix npm audit
|
|
||||||
id: npm-audit
|
|
||||||
uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0
|
|
||||||
|
|
||||||
- name: Run npm ci and npm run build
|
|
||||||
if: always()
|
|
||||||
env:
|
|
||||||
CYPRESS_INSTALL_BINARY: 0
|
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
npm run build --if-present
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
if: always()
|
|
||||||
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
|
||||||
commit-message: 'fix(deps): Fix npm audit'
|
|
||||||
committer: GitHub <noreply@github.com>
|
|
||||||
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
|
|
||||||
signoff: true
|
|
||||||
branch: automated/noid/${{ matrix.branches }}-fix-npm-audit
|
|
||||||
title: '[${{ matrix.branches }}] Fix npm audit'
|
|
||||||
body: ${{ steps.npm-audit.outputs.markdown }}
|
|
||||||
labels: |
|
|
||||||
dependencies
|
|
||||||
3. to review
|
|
||||||
198
.github/workflows/phpunit-mysql.yml
vendored
198
.github/workflows/phpunit-mysql.yml
vendored
@@ -1,198 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: PHPUnit MySQL
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: phpunit-mysql-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.versions.outputs.sparse-matrix }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Get version matrix
|
|
||||||
id: versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
|
||||||
with:
|
|
||||||
matrix: '{"mysql-versions": ["8.4"]}'
|
|
||||||
|
|
||||||
changes:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
src: ${{ steps.changes.outputs.src}}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
||||||
id: changes
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
src:
|
|
||||||
- '.github/workflows/**'
|
|
||||||
- 'appinfo/**'
|
|
||||||
- 'lib/**'
|
|
||||||
- 'templates/**'
|
|
||||||
- 'tests/**'
|
|
||||||
- 'vendor/**'
|
|
||||||
- 'vendor-bin/**'
|
|
||||||
- '.php-cs-fixer.dist.php'
|
|
||||||
- 'composer.json'
|
|
||||||
- 'composer.lock'
|
|
||||||
|
|
||||||
phpunit-mysql:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: [changes, matrix]
|
|
||||||
if: needs.changes.outputs.src != 'false'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
|
|
||||||
|
|
||||||
name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
services:
|
|
||||||
mysql:
|
|
||||||
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
|
|
||||||
ports:
|
|
||||||
- 4444:3306/tcp
|
|
||||||
env:
|
|
||||||
MYSQL_ROOT_PASSWORD: rootpassword
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set app env
|
|
||||||
if: ${{ env.APP_NAME == '' }}
|
|
||||||
run: |
|
|
||||||
# Split and keep last
|
|
||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout server
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
submodules: true
|
|
||||||
repository: nextcloud/server
|
|
||||||
ref: ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
path: apps/${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
|
|
||||||
coverage: none
|
|
||||||
ini-file: development
|
|
||||||
# Temporary workaround for missing pcntl_* in PHP 8.3
|
|
||||||
ini-values: disable_functions=
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Enable ONLY_FULL_GROUP_BY MySQL option
|
|
||||||
run: |
|
|
||||||
echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
|
|
||||||
echo 'SELECT @@sql_mode;' | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
|
|
||||||
|
|
||||||
- name: Check composer file existence
|
|
||||||
id: check_composer
|
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
|
||||||
with:
|
|
||||||
files: apps/${{ env.APP_NAME }}/composer.json
|
|
||||||
|
|
||||||
- name: Set up dependencies
|
|
||||||
# Only run if phpunit config file exists
|
|
||||||
if: steps.check_composer.outputs.files_exists == 'true'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer remove nextcloud/ocp --dev
|
|
||||||
composer i
|
|
||||||
|
|
||||||
- name: Set up Nextcloud
|
|
||||||
env:
|
|
||||||
DB_PORT: 4444
|
|
||||||
run: |
|
|
||||||
mkdir data
|
|
||||||
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
|
|
||||||
./occ app:enable --force ${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Check PHPUnit script is defined
|
|
||||||
id: check_phpunit
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer run --list | grep '^ test:unit ' | wc -l | grep 1
|
|
||||||
|
|
||||||
- name: PHPUnit
|
|
||||||
# Only run if phpunit config file exists
|
|
||||||
if: steps.check_phpunit.outcome == 'success'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer run test:unit
|
|
||||||
|
|
||||||
- name: Check PHPUnit integration script is defined
|
|
||||||
id: check_integration
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer run --list | grep '^ test:integration ' | wc -l | grep 1
|
|
||||||
|
|
||||||
- name: Run Nextcloud
|
|
||||||
# Only run if phpunit integration config file exists
|
|
||||||
if: steps.check_integration.outcome == 'success'
|
|
||||||
run: php -S localhost:8080 &
|
|
||||||
|
|
||||||
- name: PHPUnit integration
|
|
||||||
# Only run if phpunit integration config file exists
|
|
||||||
if: steps.check_integration.outcome == 'success'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer run test:integration
|
|
||||||
|
|
||||||
- name: Print logs
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
cat data/nextcloud.log
|
|
||||||
|
|
||||||
- name: Skipped
|
|
||||||
# Fail the action when neither unit nor integration tests ran
|
|
||||||
if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'
|
|
||||||
run: |
|
|
||||||
echo 'Neither PHPUnit nor PHPUnit integration tests are specified in composer.json scripts'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
summary:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
needs: [changes, phpunit-mysql]
|
|
||||||
|
|
||||||
if: always()
|
|
||||||
|
|
||||||
name: phpunit-mysql-summary
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Summary status
|
|
||||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
|
|
||||||
196
.github/workflows/phpunit-pgsql.yml
vendored
196
.github/workflows/phpunit-pgsql.yml
vendored
@@ -1,196 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: PHPUnit PostgreSQL
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: phpunit-pgsql-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
outputs:
|
|
||||||
php-version: ${{ steps.versions.outputs.php-available-list }}
|
|
||||||
server-max: ${{ steps.versions.outputs.branches-max-list }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Get version matrix
|
|
||||||
id: versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
|
||||||
|
|
||||||
changes:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
src: ${{ steps.changes.outputs.src }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
||||||
id: changes
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
src:
|
|
||||||
- '.github/workflows/**'
|
|
||||||
- 'appinfo/**'
|
|
||||||
- 'lib/**'
|
|
||||||
- 'templates/**'
|
|
||||||
- 'tests/**'
|
|
||||||
- 'vendor/**'
|
|
||||||
- 'vendor-bin/**'
|
|
||||||
- '.php-cs-fixer.dist.php'
|
|
||||||
- 'composer.json'
|
|
||||||
- 'composer.lock'
|
|
||||||
|
|
||||||
phpunit-pgsql:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: [changes, matrix]
|
|
||||||
if: needs.changes.outputs.src != 'false'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
|
|
||||||
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
|
|
||||||
|
|
||||||
name: PostgreSQL PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
|
|
||||||
ports:
|
|
||||||
- 4444:5432/tcp
|
|
||||||
env:
|
|
||||||
POSTGRES_USER: root
|
|
||||||
POSTGRES_PASSWORD: rootpassword
|
|
||||||
POSTGRES_DB: nextcloud
|
|
||||||
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set app env
|
|
||||||
if: ${{ env.APP_NAME == '' }}
|
|
||||||
run: |
|
|
||||||
# Split and keep last
|
|
||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout server
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
submodules: true
|
|
||||||
repository: nextcloud/server
|
|
||||||
ref: ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
path: apps/${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
|
|
||||||
coverage: none
|
|
||||||
ini-file: development
|
|
||||||
# Temporary workaround for missing pcntl_* in PHP 8.3
|
|
||||||
ini-values: disable_functions=
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Check composer file existence
|
|
||||||
id: check_composer
|
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
|
||||||
with:
|
|
||||||
files: apps/${{ env.APP_NAME }}/composer.json
|
|
||||||
|
|
||||||
- name: Set up dependencies
|
|
||||||
# Only run if phpunit config file exists
|
|
||||||
if: steps.check_composer.outputs.files_exists == 'true'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer remove nextcloud/ocp --dev
|
|
||||||
composer i
|
|
||||||
|
|
||||||
- name: Set up Nextcloud
|
|
||||||
env:
|
|
||||||
DB_PORT: 4444
|
|
||||||
run: |
|
|
||||||
mkdir data
|
|
||||||
./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
|
|
||||||
./occ app:enable --force ${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Check PHPUnit script is defined
|
|
||||||
id: check_phpunit
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer run --list | grep '^ test:unit ' | wc -l | grep 1
|
|
||||||
|
|
||||||
- name: PHPUnit
|
|
||||||
# Only run if phpunit config file exists
|
|
||||||
if: steps.check_phpunit.outcome == 'success'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer run test:unit
|
|
||||||
|
|
||||||
- name: Check PHPUnit integration script is defined
|
|
||||||
id: check_integration
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer run --list | grep '^ test:integration ' | wc -l | grep 1
|
|
||||||
|
|
||||||
- name: Run Nextcloud
|
|
||||||
# Only run if phpunit integration config file exists
|
|
||||||
if: steps.check_integration.outcome == 'success'
|
|
||||||
run: php -S localhost:8080 &
|
|
||||||
|
|
||||||
- name: PHPUnit integration
|
|
||||||
# Only run if phpunit integration config file exists
|
|
||||||
if: steps.check_integration.outcome == 'success'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer run test:integration
|
|
||||||
|
|
||||||
- name: Print logs
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
cat data/nextcloud.log
|
|
||||||
|
|
||||||
- name: Skipped
|
|
||||||
# Fail the action when neither unit nor integration tests ran
|
|
||||||
if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'
|
|
||||||
run: |
|
|
||||||
echo 'Neither PHPUnit nor PHPUnit integration tests are specified in composer.json scripts'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
summary:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
needs: [changes, phpunit-pgsql]
|
|
||||||
|
|
||||||
if: always()
|
|
||||||
|
|
||||||
name: phpunit-pgsql-summary
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Summary status
|
|
||||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi
|
|
||||||
185
.github/workflows/phpunit-sqlite.yml
vendored
185
.github/workflows/phpunit-sqlite.yml
vendored
@@ -1,185 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: PHPUnit SQLite
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: phpunit-sqlite-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
matrix:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
outputs:
|
|
||||||
php-version: ${{ steps.versions.outputs.php-available-list }}
|
|
||||||
server-max: ${{ steps.versions.outputs.branches-max-list }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Get version matrix
|
|
||||||
id: versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
|
||||||
|
|
||||||
changes:
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
src: ${{ steps.changes.outputs.src}}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
||||||
id: changes
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
src:
|
|
||||||
- '.github/workflows/**'
|
|
||||||
- 'appinfo/**'
|
|
||||||
- 'lib/**'
|
|
||||||
- 'templates/**'
|
|
||||||
- 'tests/**'
|
|
||||||
- 'vendor/**'
|
|
||||||
- 'vendor-bin/**'
|
|
||||||
- '.php-cs-fixer.dist.php'
|
|
||||||
- 'composer.json'
|
|
||||||
- 'composer.lock'
|
|
||||||
|
|
||||||
phpunit-sqlite:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: [changes, matrix]
|
|
||||||
if: needs.changes.outputs.src != 'false'
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
|
|
||||||
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
|
|
||||||
|
|
||||||
name: SQLite PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set app env
|
|
||||||
if: ${{ env.APP_NAME == '' }}
|
|
||||||
run: |
|
|
||||||
# Split and keep last
|
|
||||||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout server
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
submodules: true
|
|
||||||
repository: nextcloud/server
|
|
||||||
ref: ${{ matrix.server-versions }}
|
|
||||||
|
|
||||||
- name: Checkout app
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
path: apps/${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
|
||||||
coverage: none
|
|
||||||
ini-file: development
|
|
||||||
# Temporary workaround for missing pcntl_* in PHP 8.3
|
|
||||||
ini-values: disable_functions=
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Check composer file existence
|
|
||||||
id: check_composer
|
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
|
||||||
with:
|
|
||||||
files: apps/${{ env.APP_NAME }}/composer.json
|
|
||||||
|
|
||||||
- name: Set up dependencies
|
|
||||||
# Only run if phpunit config file exists
|
|
||||||
if: steps.check_composer.outputs.files_exists == 'true'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer remove nextcloud/ocp --dev
|
|
||||||
composer i
|
|
||||||
|
|
||||||
- name: Set up Nextcloud
|
|
||||||
env:
|
|
||||||
DB_PORT: 4444
|
|
||||||
run: |
|
|
||||||
mkdir data
|
|
||||||
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
|
|
||||||
./occ app:enable --force ${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: Check PHPUnit script is defined
|
|
||||||
id: check_phpunit
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer run --list | grep '^ test:unit ' | wc -l | grep 1
|
|
||||||
|
|
||||||
- name: PHPUnit
|
|
||||||
# Only run if phpunit config file exists
|
|
||||||
if: steps.check_phpunit.outcome == 'success'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer run test:unit
|
|
||||||
|
|
||||||
- name: Check PHPUnit integration script is defined
|
|
||||||
id: check_integration
|
|
||||||
continue-on-error: true
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: |
|
|
||||||
composer run --list | grep '^ test:integration ' | wc -l | grep 1
|
|
||||||
|
|
||||||
- name: Run Nextcloud
|
|
||||||
# Only run if phpunit integration config file exists
|
|
||||||
if: steps.check_integration.outcome == 'success'
|
|
||||||
run: php -S localhost:8080 &
|
|
||||||
|
|
||||||
- name: PHPUnit integration
|
|
||||||
# Only run if phpunit integration config file exists
|
|
||||||
if: steps.check_integration.outcome == 'success'
|
|
||||||
working-directory: apps/${{ env.APP_NAME }}
|
|
||||||
run: composer run test:integration
|
|
||||||
|
|
||||||
- name: Print logs
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
cat data/nextcloud.log
|
|
||||||
|
|
||||||
- name: Skipped
|
|
||||||
# Fail the action when neither unit nor integration tests ran
|
|
||||||
if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'
|
|
||||||
run: |
|
|
||||||
echo 'Neither PHPUnit nor PHPUnit integration tests are specified in composer.json scripts'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
summary:
|
|
||||||
permissions:
|
|
||||||
contents: none
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
needs: [changes, phpunit-sqlite]
|
|
||||||
|
|
||||||
if: always()
|
|
||||||
|
|
||||||
name: phpunit-sqlite-summary
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Summary status
|
|
||||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
|
|
||||||
50
.github/workflows/pr-feedback.yml
vendored
50
.github/workflows/pr-feedback.yml
vendored
@@ -1,50 +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
|
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-FileCopyrightText: 2023 Marcel Klehr <mklehr@gmx.net>
|
|
||||||
# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com>
|
|
||||||
# SPDX-FileCopyrightText: 2023 Daniel Kesselberg <mail@danielkesselberg.de>
|
|
||||||
# SPDX-FileCopyrightText: 2023 Florian Steffens <florian.steffens@nextcloud.com>
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: 'Ask for feedback on PRs'
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '30 1 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pr-feedback:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: The get-github-handles-from-website action
|
|
||||||
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
|
|
||||||
id: scrape
|
|
||||||
with:
|
|
||||||
website: 'https://nextcloud.com/team/'
|
|
||||||
|
|
||||||
- name: Get blocklist
|
|
||||||
id: blocklist
|
|
||||||
run: |
|
|
||||||
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
|
|
||||||
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- uses: nextcloud/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4 # main
|
|
||||||
with:
|
|
||||||
feedback-message: |
|
|
||||||
Hello there,
|
|
||||||
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
|
|
||||||
|
|
||||||
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
|
|
||||||
|
|
||||||
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
|
|
||||||
|
|
||||||
Thank you for contributing to Nextcloud and we hope to hear from you soon!
|
|
||||||
|
|
||||||
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
|
|
||||||
days-before-feedback: 14
|
|
||||||
start-date: '2024-04-30'
|
|
||||||
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
|
|
||||||
exempt-bots: true
|
|
||||||
57
.github/workflows/psalm.yml
vendored
57
.github/workflows/psalm.yml
vendored
@@ -1,57 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Static analysis
|
|
||||||
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: psalm-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
static-analysis:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
name: static-psalm-analysis
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: Get php version
|
|
||||||
id: versions
|
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
- name: Set up php${{ steps.versions.outputs.php-available }}
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
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
|
|
||||||
coverage: none
|
|
||||||
ini-file: development
|
|
||||||
# Temporary workaround for missing pcntl_* in PHP 8.3
|
|
||||||
ini-values: disable_functions=
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
composer remove nextcloud/ocp --dev
|
|
||||||
composer i
|
|
||||||
|
|
||||||
- name: Install nextcloud/ocp
|
|
||||||
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
|
|
||||||
|
|
||||||
- name: Run coding standards check
|
|
||||||
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github
|
|
||||||
25
.github/workflows/reuse.yml
vendored
25
.github/workflows/reuse.yml
vendored
@@ -1,25 +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
|
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
name: REUSE Compliance Check
|
|
||||||
|
|
||||||
on: [pull_request]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
reuse-compliance-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
|
|
||||||
- name: REUSE Compliance Check
|
|
||||||
uses: fsfe/reuse-action@3ae3c6bdf1257ab19397fab11fd3312144692083 # v4.0.0
|
|
||||||
@@ -1,58 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Auto approve nextcloud/ocp
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target: # zizmor: ignore[dangerous-triggers]
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- stable*
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: update-nextcloud-ocp-approve-merge-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
auto-approve-merge:
|
|
||||||
if: github.actor == 'nextcloud-command'
|
|
||||||
runs-on: ubuntu-latest-low
|
|
||||||
permissions:
|
|
||||||
# for hmarr/auto-approve-action to approve PRs
|
|
||||||
pull-requests: write
|
|
||||||
# for alexwilson/enable-github-automerge-action to approve PRs
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Disabled on forks
|
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
|
||||||
run: |
|
|
||||||
echo 'Can not approve PRs from forks'
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
|
|
||||||
id: branchname
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# GitHub actions bot approve
|
|
||||||
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
|
|
||||||
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# Enable GitHub auto merge
|
|
||||||
- name: Auto merge
|
|
||||||
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
|
|
||||||
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
123
.github/workflows/update-nextcloud-ocp.yml
vendored
123
.github/workflows/update-nextcloud-ocp.yml
vendored
@@ -1,123 +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
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
name: Update nextcloud/ocp
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "5 2 * * 0"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-nextcloud-ocp:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
branches: ['main', 'master', 'stable29', 'stable28', 'stable27']
|
|
||||||
|
|
||||||
name: update-nextcloud-ocp-${{ matrix.branches }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- id: checkout
|
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
ref: ${{ matrix.branches }}
|
|
||||||
submodules: true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Set up php8.2
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
|
|
||||||
with:
|
|
||||||
php-version: 8.2
|
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
|
||||||
coverage: none
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Read codeowners
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
id: codeowners
|
|
||||||
run: |
|
|
||||||
grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Composer install
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
run: composer install
|
|
||||||
|
|
||||||
- name: Composer update nextcloud/ocp
|
|
||||||
id: update_branch
|
|
||||||
if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }}
|
|
||||||
run: composer require --dev 'nextcloud/ocp:dev-${{ matrix.branches }}'
|
|
||||||
|
|
||||||
- name: Raise on issue on failure
|
|
||||||
uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
|
|
||||||
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
title: 'Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}'
|
|
||||||
body: 'Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}'
|
|
||||||
|
|
||||||
- name: Composer update nextcloud/ocp
|
|
||||||
id: update_main
|
|
||||||
if: ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }}
|
|
||||||
run: composer require --dev nextcloud/ocp:dev-master
|
|
||||||
|
|
||||||
- name: Raise on issue on failure
|
|
||||||
uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
|
|
||||||
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }}
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
title: 'Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}'
|
|
||||||
body: 'Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}'
|
|
||||||
|
|
||||||
- name: Reset checkout 3rdparty
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
run: |
|
|
||||||
git clean -f 3rdparty
|
|
||||||
git checkout 3rdparty
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Reset checkout vendor
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
run: |
|
|
||||||
git clean -f vendor
|
|
||||||
git checkout vendor
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Reset checkout vendor-bin
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
run: |
|
|
||||||
git clean -f vendor-bin
|
|
||||||
git checkout vendor-bin
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
if: steps.checkout.outcome == 'success'
|
|
||||||
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
|
||||||
commit-message: 'chore(dev-deps): Bump nextcloud/ocp package'
|
|
||||||
committer: GitHub <noreply@github.com>
|
|
||||||
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
|
|
||||||
signoff: true
|
|
||||||
branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp'
|
|
||||||
title: '[${{ matrix.branches }}] Update nextcloud/ocp dependency'
|
|
||||||
body: |
|
|
||||||
Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency
|
|
||||||
labels: |
|
|
||||||
dependencies
|
|
||||||
3. to review
|
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ Deck is a kanban style organization tool aimed at personal planning and project
|
|||||||
### Mobile apps
|
### Mobile apps
|
||||||
|
|
||||||
- [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 - It is available in [Apple App store](https://apps.apple.com/de/app/next-deck/id6752478755)
|
||||||
- [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 |
@@ -84,6 +84,9 @@ OC.L10N.register(
|
|||||||
"Failed to upload {name}" : "Не ўдалося запампаваць {name}",
|
"Failed to upload {name}" : "Не ўдалося запампаваць {name}",
|
||||||
"Share" : "Абагуліць",
|
"Share" : "Абагуліць",
|
||||||
"Personal" : "Асабістыя",
|
"Personal" : "Асабістыя",
|
||||||
|
"Example Task 3" : "Прыклад задання 3",
|
||||||
|
"Example Task 2" : "Прыклад задання 2",
|
||||||
|
"Example Task 1" : "Прыклад задання 1",
|
||||||
"Today" : "Сёння",
|
"Today" : "Сёння",
|
||||||
"Tomorrow" : "Заўтра"
|
"Tomorrow" : "Заўтра"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,6 +82,9 @@
|
|||||||
"Failed to upload {name}" : "Не ўдалося запампаваць {name}",
|
"Failed to upload {name}" : "Не ўдалося запампаваць {name}",
|
||||||
"Share" : "Абагуліць",
|
"Share" : "Абагуліць",
|
||||||
"Personal" : "Асабістыя",
|
"Personal" : "Асабістыя",
|
||||||
|
"Example Task 3" : "Прыклад задання 3",
|
||||||
|
"Example Task 2" : "Прыклад задання 2",
|
||||||
|
"Example Task 1" : "Прыклад задання 1",
|
||||||
"Today" : "Сёння",
|
"Today" : "Сёння",
|
||||||
"Tomorrow" : "Заўтра"
|
"Tomorrow" : "Заўтра"
|
||||||
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
|
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ OC.L10N.register(
|
|||||||
"Create a new tag:" : "Направи нова ознака:",
|
"Create a new tag:" : "Направи нова ознака:",
|
||||||
"(group)" : "(group)",
|
"(group)" : "(group)",
|
||||||
"{count} comments, {unread} unread" : "{count} коментари, {unread} непрочитани",
|
"{count} comments, {unread} unread" : "{count} коментари, {unread} непрочитани",
|
||||||
"Todo items" : "Работи за правење",
|
"Todo items" : "Задачи",
|
||||||
"Edit card title" : "Измени наслов на картица",
|
"Edit card title" : "Измени наслов на картица",
|
||||||
"Open link" : "Отвори линк",
|
"Open link" : "Отвори линк",
|
||||||
"Card deleted" : "Картицата е избришана",
|
"Card deleted" : "Картицата е избришана",
|
||||||
|
|||||||
@@ -286,7 +286,7 @@
|
|||||||
"Create a new tag:" : "Направи нова ознака:",
|
"Create a new tag:" : "Направи нова ознака:",
|
||||||
"(group)" : "(group)",
|
"(group)" : "(group)",
|
||||||
"{count} comments, {unread} unread" : "{count} коментари, {unread} непрочитани",
|
"{count} comments, {unread} unread" : "{count} коментари, {unread} непрочитани",
|
||||||
"Todo items" : "Работи за правење",
|
"Todo items" : "Задачи",
|
||||||
"Edit card title" : "Измени наслов на картица",
|
"Edit card title" : "Измени наслов на картица",
|
||||||
"Open link" : "Отвори линк",
|
"Open link" : "Отвори линк",
|
||||||
"Card deleted" : "Картицата е избришана",
|
"Card deleted" : "Картицата е избришана",
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user