Compare commits

..

274 Commits

Author SHA1 Message Date
grnd-alt
87c7fdbad2 fix: comments with mentions cant be submitted
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-10-06 16:18:27 +00:00
Nextcloud bot
4c1243363a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-10-04 00:31:19 +00:00
Nextcloud bot
16ccc79bb4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-10-03 00:33:33 +00:00
Nextcloud bot
df4fd1de2f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-10-02 00:32:25 +00:00
Nextcloud bot
8e03f8cc64 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-10-01 00:32:05 +00:00
Nextcloud bot
f1e5038756 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-30 00:32:04 +00:00
Luka Trovic
ba6902e470 Merge pull request #7281 from nextcloud/release/1.15.3
Release/1.15.3
2025-09-29 10:56:58 +02:00
Luka Trovic
5674887b61 release 1.15.3
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-09-29 09:48:16 +02:00
Nextcloud bot
3bc0ddcca2 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-28 00:31:39 +00:00
Nextcloud bot
48e904c37b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-27 00:32:16 +00:00
Luka Trovic
44a5eadb73 Merge pull request #7275 from nextcloud/backport/7154/stable31
[stable31] fix: parse arguments to CardService.reorder correctly to int
2025-09-26 18:34:25 +02:00
Viktor Diezel
7b7221b3e1 fix: parse arguments to CardService.reorder correctly to int
Signed-off-by: Viktor Diezel <viktor.diezel@posteo.de>
2025-09-26 13:28:17 +00:00
Luka Trovic
b19872e56c Merge pull request #7274 from nextcloud/backport/7261/stable31
[stable31] fix: use text cursor for card title on dashboard
2025-09-26 12:02:27 +02:00
grnd-alt
cb1819cf10 fix: use text cursor for card title on dashboard
Signed-off-by: grnd-alt <github@belakkaf.net>

[skip ci]
2025-09-26 05:42:21 +00:00
Nextcloud bot
7d6d41a5d1 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-26 00:32:20 +00:00
Luka Trovic
aa6c488845 Merge pull request #7272 from nextcloud/31-bump-nextcloud-vue-8.31.0
Chore(deps): Bump @nextcloud/vue from 8.22.0 to 8.31.0
2025-09-25 22:56:04 +02:00
Luka Trovic
a14aa1b5d4 Chore(deps): Bump @nextcloud/vue from 8.22.0 to 8.31.0
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-09-25 18:41:58 +02:00
Luka Trovic
e2e14d88be Merge pull request #7269 from nextcloud/backport/7255/stable31
[stable31] fix: missing push notifications
2025-09-25 12:23:24 +02:00
Luka Trovic
2546ff981d fix: update base query count
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-09-25 11:47:21 +02:00
Luka Trovic
a2e5e9fe5b chore: update base query count
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-09-25 09:16:39 +00:00
Luka Trovic
985eaa0133 fix: missing push notifications
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-09-25 09:16:39 +00:00
Luka Trovic
db48deb4f8 Merge pull request #7267 from nextcloud/backport/7266/stable31
[stable31] fix: redirect to cleaner URL if RewriteBase is enabled
2025-09-25 08:35:52 +02:00
Nextcloud bot
173ec28c6d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-25 00:31:44 +00:00
Luka Trovic
9d18b08325 fix: redirect to cleaner URL if RewriteBase is enabled
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-09-24 18:28:28 +00:00
Nextcloud bot
7775ddd9f7 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-24 00:31:56 +00:00
Nextcloud bot
d5fb6cb4b0 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-23 00:31:54 +00:00
Nextcloud bot
a5245b41ac fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-22 00:31:34 +00:00
Luka Trovic
e34f4f081c Merge pull request #7198 from nextcloud/backport/7128/stable31
[stable31] fix: make comments with mention editable
2025-09-19 20:09:31 +02:00
grnd-alt
0292b0307e fix: make comments with mention editable
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-09-19 19:10:33 +02:00
Nextcloud bot
913a2fac8f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-19 00:32:05 +00:00
Nextcloud bot
aac7f0c943 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-18 00:31:47 +00:00
Nextcloud bot
5f0a55b5cd fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-17 00:31:47 +00:00
Luka Trovic
95958e5465 Merge pull request #7240 from nextcloud/backport/7238/stable31
[stable31] fix(darkmode): Fix activity icon colors
2025-09-16 21:40:49 +02:00
Joas Schilling
19bb3aba97 fix(darkmode): Fix activity icon colors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-09-16 18:57:23 +00:00
Nextcloud bot
1345b9cfee fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-16 00:31:53 +00:00
Nextcloud bot
646cf7f0c6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-15 00:31:04 +00:00
Nextcloud bot
6d29ef0607 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-14 00:30:57 +00:00
Nextcloud bot
c27bc874eb fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-13 00:31:27 +00:00
Nextcloud bot
bdb8f1845b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-12 00:31:52 +00:00
Nextcloud bot
75f6af1e6b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-11 00:31:57 +00:00
Nextcloud bot
81bd239dec fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-09 00:33:43 +00:00
Nextcloud bot
4d4fbd8fc9 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-08 00:32:16 +00:00
Nextcloud bot
d46b554576 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-07 00:33:34 +00:00
Nextcloud bot
3dc52816eb fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-06 00:31:30 +00:00
Nextcloud bot
2799bc3bb8 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-05 00:32:06 +00:00
Nextcloud bot
f275dcc5be fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-04 00:30:33 +00:00
Nextcloud bot
19ef846692 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-03 00:29:41 +00:00
Nextcloud bot
75542efab4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-09-02 00:30:26 +00:00
Luka Trovic
b41a7eac8b Merge pull request #7135 from nextcloud/automated/noid/stable31-update-nextcloud-ocp
[stable31] Update nextcloud/ocp dependency
2025-09-01 11:54:46 +02:00
Luka Trovic
9e07995011 Merge pull request #7055 from nextcloud/dependabot/npm_and_yarn/stable31/babel/runtime-7.27.6
Chore(deps): Bump @babel/runtime from 7.27.1 to 7.27.6
2025-09-01 11:52:55 +02:00
nextcloud-command
348e10bb6c chore(dev-deps): Bump nextcloud/ocp package
Signed-off-by: GitHub <noreply@github.com>
2025-08-31 02:40:43 +00:00
Nextcloud bot
ff5db11e9c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-30 00:29:24 +00:00
Nextcloud bot
b30e742114 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-29 00:29:36 +00:00
Nextcloud bot
aefdcb70e9 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-28 00:29:35 +00:00
Nextcloud bot
dbc350cd4b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-27 00:29:30 +00:00
Nextcloud bot
7e2fb648b0 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-26 00:30:40 +00:00
Luka Trovic
2773208eb5 Merge pull request #7180 from nextcloud/backport/7177/stable31
[stable31] Clean attachment sharing records after permanent deleted
2025-08-25 11:39:53 +02:00
Luka Trovic
d1559ac674 fix: clean attachment sharing records after permanent deleted
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-08-25 08:52:49 +00:00
Nextcloud bot
eafd6eeff0 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-23 00:29:03 +00:00
Nextcloud bot
b0a77ac025 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-22 00:28:54 +00:00
Nextcloud bot
9744ae04d6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-20 00:28:47 +00:00
Nextcloud bot
d0e177bb41 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-19 00:31:14 +00:00
grnd-alt
7478e5c1d6 Merge pull request #7173 from nextcloud/backport/7162/stable31
[stable31] fix: do not change focus when card id stays the same
2025-08-18 11:16:41 +02:00
grnd-alt
0bce7f0ea9 fix: do not change focus when card id stays the same
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-08-18 09:15:35 +00:00
Nextcloud bot
8bed62debc fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-14 00:29:49 +00:00
Nextcloud bot
1b9ddf9ebc fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-13 00:30:23 +00:00
Nextcloud bot
1770e8ee7e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-12 00:29:20 +00:00
Nextcloud bot
fe0c4361f3 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-10 00:28:22 +00:00
Nextcloud bot
6a3553404b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-09 00:28:49 +00:00
Nextcloud bot
5b494738fd fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-04 00:31:08 +00:00
Nextcloud bot
79db1d3275 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-03 00:28:39 +00:00
Nextcloud bot
d91c53669f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-02 00:29:07 +00:00
Nextcloud bot
cbb67b30b6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-08-01 00:28:50 +00:00
grnd-alt
39f00e0e68 Merge pull request #7148 from nextcloud/backport/7071/stable31
[stable31]fix: ensure correct type when filtering events
2025-07-31 11:10:04 +02:00
grnd-alt
a0e9494ff1 fix: ensure correct type when filtering events
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-07-31 10:40:54 +02:00
Nextcloud bot
8658c7dfca fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-30 00:29:01 +00:00
grnd-alt
427fe4e87d Merge pull request #7144 from nextcloud/backport/7139/stable31
[stable31] fix:  Use getId() method for card ID retrieval
2025-07-29 11:14:39 +02:00
grnd-alt
e38e7bb027 fix: make labels in dialog deletable
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-07-29 09:00:11 +00:00
grnd-alt
6993fc906f fix: dont add labels without id
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-07-29 09:00:11 +00:00
Enjeck C.
6685341d9c fix: Use getId() method for card ID retrieval
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
2025-07-29 09:00:11 +00:00
Nextcloud bot
05733dad96 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-29 00:28:42 +00:00
grnd-alt
dbdfe16e9f Merge pull request #7140 from nextcloud/release/1.15.2
Release/1.15.2
2025-07-28 14:52:11 +02:00
Nextcloud bot
bf40a4b23b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-28 00:28:50 +00:00
Luka Trovic
42d52c519d Merge pull request #7132 from nextcloud/backport/7131/stable31
[stable31] fix: acl check when delete, update board acl
2025-07-25 18:17:28 +02:00
Luka Trovic
1c3c7c730a fix: acl check when delete, update board acl
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-07-25 15:51:05 +00:00
Luka Trovic
ccb6fb3187 Merge pull request #7130 from nextcloud/backport/7127/stable31
[stable31] fix:allow foreign label deletion
2025-07-25 13:21:22 +02:00
grnd-alt
ef3db3eec0 fix:allow foreign label deletion
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-07-25 10:27:14 +00:00
Nextcloud bot
59e003df21 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-25 00:29:32 +00:00
Nextcloud bot
5847735557 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-24 00:30:27 +00:00
Nextcloud bot
e2cc6918cb fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-23 00:33:43 +00:00
Nextcloud bot
61a5b4b331 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-22 00:29:07 +00:00
dependabot[bot]
9bd00803d8 Merge pull request #6990 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/cypress-1.0.0-beta.15 2025-07-15 18:35:38 +00:00
dependabot[bot]
59a2dff228 Chore(deps-dev): Bump @nextcloud/cypress
Bumps [@nextcloud/cypress](https://github.com/nextcloud/nextcloud-cypress) from 1.0.0-beta.14 to 1.0.0-beta.15.
- [Release notes](https://github.com/nextcloud/nextcloud-cypress/releases)
- [Commits](https://github.com/nextcloud/nextcloud-cypress/compare/v1.0.0-beta.14...v1.0.0-beta.15)

---
updated-dependencies:
- dependency-name: "@nextcloud/cypress"
  dependency-version: 1.0.0-beta.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 20:34:04 +02:00
Luka Trovic
c0f4c94d30 Merge pull request #7075 from nextcloud/automated/noid/stable31-update-nextcloud-ocp
[stable31] Update nextcloud/ocp dependency
2025-07-15 11:26:13 +02:00
Luka Trovic
d414de4012 chore: update query count
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-07-15 11:16:12 +02:00
Luka Trovic
8dc9240681 Merge pull request #7113 from nextcloud/backport/7107/stable31
[stable31] fix: styling for new stack input field
2025-07-14 15:43:17 +02:00
Luka Trovic
8a27a799cb fix: styling for new stack input field
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-07-14 13:17:34 +00:00
Nextcloud bot
eb994fea12 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-14 00:27:52 +00:00
nextcloud-command
4e1f65b10d chore(dev-deps): Bump nextcloud/ocp package
Signed-off-by: GitHub <noreply@github.com>
2025-07-13 03:44:55 +00:00
Nextcloud bot
97aa84f03d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-10 00:28:46 +00:00
Nextcloud bot
04511acef2 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-09 00:29:06 +00:00
Nextcloud bot
9be47f6d5d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-08 00:29:05 +00:00
Nextcloud bot
46f723cc98 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-06 00:28:15 +00:00
Nextcloud bot
a242d5551a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-05 00:28:25 +00:00
Nextcloud bot
0cdd972722 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-04 00:28:40 +00:00
Luka Trovic
84c1d828da Merge pull request #7091 from nextcloud/backport/7070/stable31
[stable31] fix: add retry and show warning on description saving error
2025-07-03 17:32:41 +02:00
Luka Trovic
5df6b1caf4 fix: add retry and show warning on description saving error
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-07-03 09:47:50 +00:00
Nextcloud bot
74342d7581 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-03 00:28:53 +00:00
Nextcloud bot
4beba4f7d3 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-02 00:29:14 +00:00
Nextcloud bot
73d57e3ee1 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-07-01 00:28:30 +00:00
Nextcloud bot
530774c9e6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-30 00:27:44 +00:00
Nextcloud bot
149d273c35 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-29 00:27:42 +00:00
Nextcloud bot
d3fa2b018f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-28 00:29:08 +00:00
Nextcloud bot
1e132bb1fa fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-28 00:28:06 +00:00
Nextcloud bot
730a6c89ea fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-27 00:43:52 +00:00
Nextcloud bot
78819da98d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-26 00:43:00 +00:00
Nextcloud bot
b8898e7f96 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-25 00:43:16 +00:00
Nextcloud bot
f32df15d90 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-24 00:43:14 +00:00
Nextcloud bot
e147939157 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-20 00:42:31 +00:00
Nextcloud bot
26b98d726f fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-19 00:42:36 +00:00
Luka Trovic
50d029e50e Merge pull request #7068 from nextcloud/automated/noid/stable31-fix-npm-audit
[stable31] Fix npm audit
2025-06-18 17:14:32 +02:00
Julius Knorr
31634ab57e Merge pull request #6698 from nextcloud/automated/noid/stable31-update-nextcloud-ocp 2025-06-18 08:35:01 +02:00
Nextcloud bot
2bff37c3b4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-17 00:40:29 +00:00
Luka Trovic
482555ac6d Merge pull request #7063 from nextcloud/backport/7030/stable31
[stable31] fix: unstable cypress test
2025-06-16 21:43:25 +02:00
Nextcloud bot
3d3b8d72bf fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-16 00:40:41 +00:00
nextcloud-command
367a20e7af fix(deps): Fix npm audit
Signed-off-by: GitHub <noreply@github.com>
2025-06-15 03:46:47 +00:00
nextcloud-command
376bd46de7 chore(dev-deps): Bump nextcloud/ocp package
Signed-off-by: GitHub <noreply@github.com>
2025-06-15 03:34:34 +00:00
Nextcloud bot
fe30fa95aa fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-14 00:40:04 +00:00
dependabot[bot]
1b40ad9797 Chore(deps): Bump @babel/runtime from 7.27.1 to 7.27.6
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.27.1 to 7.27.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.6/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-13 21:33:00 +00:00
Luka Trovic
5bb3a21b80 fix: unstable cypress test
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-06-12 16:27:40 +00:00
Luka Trovic
c55b980d96 Merge pull request #7061 from nextcloud/backport/7059/stable31
[stable31] fix: not show Share with a Deck card for unauthorized users
2025-06-11 15:04:05 +02:00
Luka Trovic
c93b4a09cb fix: not show Share with a Deck card for unauthorized users
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-06-11 12:40:47 +00:00
Nextcloud bot
0bc8a0f3ba fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-11 00:44:36 +00:00
Luka Trovic
6368d965ec Merge pull request #7029 from nextcloud/backport/7027/stable31
[stable31] fix: update DeleteCron to remove deleted lists
2025-06-10 08:58:05 +02:00
Nextcloud bot
591a894b7e fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-10 00:40:12 +00:00
Luka Trovic
c5e5715a0c fix: update DeleteCron to remove deleted lists
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-06-05 20:17:59 +02:00
Luka Trovic
80828f7674 Merge pull request #7046 from nextcloud/s31-fix-integration-test
Fix integration test
2025-06-05 19:08:24 +02:00
Luka Trovic
1acdf9e716 fix: integration test
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-06-05 18:41:44 +02:00
Nextcloud bot
0fd7dd9d68 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-06-01 00:40:02 +00:00
Nextcloud bot
e670ede7b4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-31 00:40:57 +00:00
Nextcloud bot
d0eb16c242 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-28 00:41:39 +00:00
Nextcloud bot
50c43aed6d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-26 00:41:10 +00:00
Nextcloud bot
d2ad7bdc29 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-23 00:40:39 +00:00
Nextcloud bot
8e7e9d85ac fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-22 00:41:22 +00:00
Luka Trovic
53f5fbdadd Merge pull request #7009 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/auth-2.5.1
Chore(deps): Bump @nextcloud/auth from 2.4.0 to 2.5.1
2025-05-21 13:48:32 +02:00
Luka Trovic
fbccabceaf Merge pull request #7008 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/dialogs-6.3.0
Chore(deps): Bump @nextcloud/dialogs from 6.2.0 to 6.3.0
2025-05-21 13:48:12 +02:00
Nextcloud bot
d33305b77c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-21 00:45:43 +00:00
dependabot[bot]
dba232041d Chore(deps): Bump @nextcloud/dialogs from 6.2.0 to 6.3.0
Bumps [@nextcloud/dialogs](https://github.com/nextcloud-libraries/nextcloud-dialogs) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-dialogs/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-dialogs/blob/v6.3.0/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-dialogs/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/dialogs"
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-20 08:14:31 +02:00
dependabot[bot]
2b17403129 Chore(deps): Bump @nextcloud/auth from 2.4.0 to 2.5.1
Bumps [@nextcloud/auth](https://github.com/nextcloud/nextcloud-auth) from 2.4.0 to 2.5.1.
- [Release notes](https://github.com/nextcloud/nextcloud-auth/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/nextcloud-auth/compare/v2.4.0...v2.5.1)

---
updated-dependencies:
- dependency-name: "@nextcloud/auth"
  dependency-version: 2.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 16:00:25 +02:00
Nextcloud bot
5cfc3a7a3a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-18 00:41:54 +00:00
Nextcloud bot
60f250d69a fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-17 00:44:03 +00:00
Nextcloud bot
bb60f7f57b fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-15 00:44:23 +00:00
Nextcloud bot
1219d52b02 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-14 00:41:39 +00:00
Nextcloud bot
5c769aa82d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-13 00:42:49 +00:00
Nextcloud bot
7c615f2607 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-12 00:41:54 +00:00
Nextcloud bot
64d3a69f28 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-11 00:41:46 +00:00
Nextcloud bot
26494eee86 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-10 00:44:00 +00:00
dependabot[bot]
336b6f3348 Merge pull request #6968 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/dialogs-6.2.0 2025-05-08 15:18:38 +00:00
dependabot[bot]
380184af50 Chore(deps): Bump @nextcloud/dialogs from 6.1.1 to 6.2.0
Bumps [@nextcloud/dialogs](https://github.com/nextcloud-libraries/nextcloud-dialogs) from 6.1.1 to 6.2.0.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-dialogs/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-dialogs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-dialogs/compare/v6.1.1...v6.2.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/dialogs"
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-08 17:16:40 +02:00
dependabot[bot]
16aa9c954b Merge pull request #6969 from nextcloud/dependabot/npm_and_yarn/stable31/relative-ci/agent-4.3.1 2025-05-08 15:05:09 +00:00
dependabot[bot]
01842c7f92 Chore(deps-dev): Bump @relative-ci/agent from 4.3.0 to 4.3.1
Bumps [@relative-ci/agent](https://github.com/relative-ci/agent) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/relative-ci/agent/releases)
- [Commits](https://github.com/relative-ci/agent/compare/v4.3.0...v4.3.1)

---
updated-dependencies:
- dependency-name: "@relative-ci/agent"
  dependency-version: 4.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-08 17:03:32 +02:00
dependabot[bot]
1c38638ee8 Merge pull request #6970 from nextcloud/dependabot/npm_and_yarn/stable31/babel/runtime-7.27.1 2025-05-08 15:00:07 +00:00
dependabot[bot]
dd534fbea1 Chore(deps): Bump @babel/runtime from 7.27.0 to 7.27.1
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.27.0 to 7.27.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.1/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-08 16:58:22 +02:00
Nextcloud bot
b7cb1f7d05 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-08 00:43:33 +00:00
Nextcloud bot
c9d45f4a96 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-07 00:43:34 +00:00
Nextcloud bot
dfc61453c4 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-06 00:43:40 +00:00
Nextcloud bot
4dd48d18c7 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-05 01:11:36 +00:00
Nextcloud bot
ee51cb8e3c fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-04 00:41:45 +00:00
Nextcloud bot
4aaaca52c6 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-03 00:42:57 +00:00
dependabot[bot]
ee67476581 Merge pull request #6838 from nextcloud/dependabot/npm_and_yarn/stable31/relative-ci/agent-4.3.0 2025-05-02 16:43:37 +00:00
dependabot[bot]
1f82d386e0 Chore(deps-dev): Bump @relative-ci/agent from 4.2.14 to 4.3.0
Bumps [@relative-ci/agent](https://github.com/relative-ci/agent) from 4.2.14 to 4.3.0.
- [Release notes](https://github.com/relative-ci/agent/releases)
- [Commits](https://github.com/relative-ci/agent/compare/v4.2.14...v4.3.0)

---
updated-dependencies:
- dependency-name: "@relative-ci/agent"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 18:38:20 +02:00
dependabot[bot]
d7d6009070 Merge pull request #6867 from nextcloud/dependabot/npm_and_yarn/stable31/babel/runtime-7.27.0 2025-05-02 16:36:10 +00:00
dependabot[bot]
263f9c8bbe Merge pull request #6884 from nextcloud/dependabot/npm_and_yarn/stable31/dompurify-3.2.5 2025-05-02 16:27:48 +00:00
dependabot[bot]
92b641c52d Chore(deps): Bump @babel/runtime from 7.26.7 to 7.27.0
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.26.7 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 18:14:57 +02:00
dependabot[bot]
26da5a17a6 Chore(deps): Bump dompurify from 3.2.4 to 3.2.5
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.4...3.2.5)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.2.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 18:14:03 +02:00
dependabot[bot]
e6a3e1a7bf Merge pull request #6904 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/webpack-vue-config-6.3.0 2025-05-02 16:00:24 +00:00
dependabot[bot]
339c13447a Chore(deps-dev): Bump @nextcloud/webpack-vue-config from 6.2.0 to 6.3.0
Bumps [@nextcloud/webpack-vue-config](https://github.com/nextcloud-libraries/webpack-vue-config) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/nextcloud-libraries/webpack-vue-config/releases)
- [Changelog](https://github.com/nextcloud-libraries/webpack-vue-config/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/webpack-vue-config/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/webpack-vue-config"
  dependency-version: 6.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 17:55:07 +02:00
Nextcloud bot
3e674381ca fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-02 00:43:02 +00:00
Nextcloud bot
5479bc16af fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-05-01 00:42:10 +00:00
Luka Trovic
96fdacc46d Merge pull request #6963 from nextcloud/backport/6778/stable31
[stable31] fix: cypress issue
2025-04-29 16:15:32 +02:00
Luka Trovic
a1a5aa9bd2 fix: cypress issue
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-04-29 14:12:24 +00:00
Luka Trovic
e7a4eec911 Merge pull request #6959 from nextcloud/backport/6916/stable31
[stable31] perf: don't enrich cards when finding calendar entries
2025-04-29 16:11:12 +02:00
Richard Steinmetz
0191d54369 perf: don't enrich cards when finding calendar entries
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-04-29 12:07:35 +00:00
grnd-alt
3e69070e8c release/1.15.1 (#6956)
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-04-29 10:32:07 +02:00
dependabot[bot]
240ea42a51 Chore(deps): Bump @nextcloud/vue from 8.22.0 to 8.26.0 (#6940)
Bumps [@nextcloud/vue](https://github.com/nextcloud-libraries/nextcloud-vue) from 8.22.0 to 8.26.0.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-vue/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.22.0...v8.26.0)

---
updated-dependencies:
- dependency-name: "@nextcloud/vue"
  dependency-version: 8.26.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 09:24:08 +02:00
grnd-alt
15e019fd03 fix: only delete assignments on unshared board (#6934)
Signed-off-by: grnd-alt <github@belakkaf.net>
2025-04-29 09:09:41 +02:00
Nextcloud bot
ca9bf74434 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-29 00:42:25 +00:00
backportbot[bot]
c3362a8584 [stable31] fix: Limit label actions to labels of the cards board (#6954)
* fix: Limit label actions to labels of the cards board

Signed-off-by: Julius Härtl <jus@bitgrid.net>

* tests: Fix unit test mocking around label checks

Signed-off-by: Julius Knorr <jus@bitgrid.net>

---------

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Co-authored-by: Julius Härtl <jus@bitgrid.net>
2025-04-28 13:02:34 +02:00
Julius Knorr
6764873d66 Merge pull request #6951 from nextcloud/backport/6898/stable31
[stable31] fix: Use strings as rich object ids
2025-04-28 10:40:18 +02:00
Julius Knorr
a692b8c512 fix: Use strings as rich object ids
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-28 06:51:23 +00:00
Nextcloud bot
0d23cc0951 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-28 00:42:38 +00:00
Nextcloud bot
b7f5648e63 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-27 00:42:07 +00:00
Nextcloud bot
ec292df849 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-25 00:42:00 +00:00
Nextcloud bot
63e39bcc51 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-24 00:42:55 +00:00
backportbot[bot]
878f9caf87 [stable31] chore: update workflows from templates (#6922)
* chore: update workflows from templates

Signed-off-by: grnd-alt <github@belakkaf.net>

* chore: set minimum phpVersion for psalm

Signed-off-by: grnd-alt <github@belakkaf.net>

---------

Signed-off-by: grnd-alt <github@belakkaf.net>
Co-authored-by: grnd-alt <github@belakkaf.net>
2025-04-23 18:08:48 +02:00
Nextcloud bot
1156688517 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-23 00:42:09 +00:00
Julius Knorr
8d2e018b9c Merge pull request #6915 from nextcloud/backport/6902/stable31
[stable31] Clear selected stack when selected board changed
2025-04-22 16:47:21 +02:00
Nextcloud bot
b66d6c5b46 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-18 00:43:13 +00:00
Nextcloud bot
8dbfd37fe0 fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-17 00:42:40 +00:00
Nextcloud bot
04e16e003d fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-16 00:43:54 +00:00
Luka Trovic
91b9b8804e fix: clear selected stack when selected board changed
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-04-15 16:36:19 +00:00
Nextcloud bot
0a415b97df Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-12 00:44:03 +00:00
Nextcloud bot
9e36a9ebe2 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-11 00:43:41 +00:00
Nextcloud bot
c70d089ca7 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-10 00:42:54 +00:00
Julius Knorr
53acec7372 Merge pull request #6894 from nextcloud/backport/6893/stable31 2025-04-09 20:15:12 +02:00
Julius Knorr
5ca18b1d32 perf: Skip doing a query just to check if a board is deleted
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-08 21:00:09 +00:00
Nextcloud bot
3a454b75e0 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-06 00:44:07 +00:00
Nextcloud bot
79ab6a16af Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-04 00:42:54 +00:00
Nextcloud bot
62dd2e29cd Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-04-02 00:43:21 +00:00
Nextcloud bot
00a63e59ae Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-30 00:44:12 +00:00
Nextcloud bot
4b6540880c Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-29 00:43:40 +00:00
Nextcloud bot
a735d85c25 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-28 00:44:53 +00:00
Nextcloud bot
b93bb93895 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-27 00:44:47 +00:00
Nextcloud bot
77d4126aa9 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-25 00:43:44 +00:00
Nextcloud bot
647b9dece2 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-24 00:43:04 +00:00
Nextcloud bot
a931433475 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-23 00:43:34 +00:00
Nextcloud bot
726e62527a Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-20 00:45:36 +00:00
Nextcloud bot
24bb353a74 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-18 00:45:12 +00:00
Nextcloud bot
fba3b030ac Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-16 00:43:45 +00:00
Nextcloud bot
a868425dd3 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-15 00:45:25 +00:00
Nextcloud bot
3033cb4d8c Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-12 00:44:27 +00:00
Julius Knorr
c4ea019eee Merge pull request #6701 from nextcloud/backport/6671/stable31
[stable31] fix: Properly show attachment extension
2025-03-10 12:03:00 +01:00
Nextcloud bot
6a19934ace Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-03 00:42:23 +00:00
Nextcloud bot
2fd7586902 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-03-01 01:05:11 +00:00
Nextcloud bot
77b0602833 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-27 00:44:26 +00:00
Luka Trovic
715b8fc6aa Merge pull request #6789 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/cypress-1.0.0-beta.14
chore(deps-dev): bump @nextcloud/cypress from 1.0.0-beta.13 to 1.0.0-beta.14
2025-02-26 10:01:35 +01:00
dependabot[bot]
f1d3631d22 chore(deps-dev): bump @nextcloud/cypress
Bumps [@nextcloud/cypress](https://github.com/nextcloud/nextcloud-cypress) from 1.0.0-beta.13 to 1.0.0-beta.14.
- [Release notes](https://github.com/nextcloud/nextcloud-cypress/releases)
- [Commits](https://github.com/nextcloud/nextcloud-cypress/compare/v1.0.0-beta.13...v1.0.0-beta.14)

---
updated-dependencies:
- dependency-name: "@nextcloud/cypress"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-26 09:46:55 +01:00
Nextcloud bot
3e05e88a6b Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-25 00:45:13 +00:00
Luka Trovic
238f5674ab Merge pull request #6788 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/eslint-config-8.4.2
chore(deps-dev): bump @nextcloud/eslint-config from 8.4.1 to 8.4.2
2025-02-24 15:26:17 +01:00
Nextcloud bot
0ddefff9c1 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-24 00:41:56 +00:00
dependabot[bot]
91aaf3d6b0 chore(deps-dev): bump @nextcloud/eslint-config from 8.4.1 to 8.4.2
Bumps [@nextcloud/eslint-config](https://github.com/nextcloud-libraries/eslint-config) from 8.4.1 to 8.4.2.
- [Release notes](https://github.com/nextcloud-libraries/eslint-config/releases)
- [Changelog](https://github.com/nextcloud-libraries/eslint-config/blob/v8.4.2/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/eslint-config/compare/v8.4.1...v8.4.2)

---
updated-dependencies:
- dependency-name: "@nextcloud/eslint-config"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 03:39:31 +00:00
Nextcloud bot
48b25da3ea Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-22 00:41:55 +00:00
Luka Trovic
4059042a9c Merge pull request #6781 from nextcloud/release/1.15.0
chore(release): bump version to 1.15.0
2025-02-21 19:06:34 +01:00
Luka Trovic
e6b29b7cb1 bump version to 1.15.0
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-02-21 17:04:44 +01:00
Nextcloud bot
d934867381 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-21 00:41:23 +00:00
Nextcloud bot
f130baff43 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-20 00:43:28 +00:00
Nextcloud bot
6f8baba8c5 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-19 00:42:13 +00:00
Nextcloud bot
3badc5c90c Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-18 00:42:07 +00:00
Nextcloud bot
c6b04b9abf Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-17 00:41:31 +00:00
Nextcloud bot
3ec8ff3d1f Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-16 01:06:42 +00:00
Nextcloud bot
a721fe27a6 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-15 00:41:55 +00:00
Nextcloud bot
1d848e0fc4 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-14 00:42:26 +00:00
Luka Trovic
9e8c1e982f Merge pull request #6734 from nextcloud/dependabot/npm_and_yarn/stable31/nextcloud/cypress-1.0.0-beta.13
bump @nextcloud/cypress from 1.0.0-beta.12 to 1.0.0-beta.13
2025-02-13 18:07:48 +01:00
Nextcloud bot
11276ea5e1 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-13 00:42:11 +00:00
Julius Knorr
f0840641ba Merge pull request #6743 from nextcloud/backport/6649/stable31
[stable31] fix: Adapt URLs generated in the backend to new routes
2025-02-12 22:53:24 +01:00
Julius Knorr
f53de9a269 ci: Update query count
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-02-12 21:32:18 +00:00
Julius Knorr
9b5bdc3d02 fix: Use dynamic base URL for vue router to make routing work in all cases
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-02-12 21:32:18 +00:00
Julius Knorr
e9e5234925 tests: Fix url generation mocks and cleanup some phpunit code
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-02-12 21:32:18 +00:00
Julius Knorr
81c8aad66f fix: Adapt URLs generated in the backend to new routes
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-02-12 21:32:18 +00:00
Nextcloud bot
7cc43c706b Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-12 00:43:12 +00:00
Nextcloud bot
19b0d60b21 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-11 00:41:50 +00:00
Nextcloud bot
b1b38e05eb Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-09 00:41:46 +00:00
dependabot[bot]
687414a7a2 bump @nextcloud/cypress from 1.0.0-beta.12 to 1.0.0-beta.13
---
updated-dependencies:
- dependency-name: "@nextcloud/cypress"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 03:26:21 +00:00
Luka Trovic
35a6c4d783 Merge pull request #6719 from nextcloud/automated/noid/stable31-fix-npm-audit
[stable31] Fix npm audit
2025-02-07 10:18:39 +01:00
Nextcloud bot
c863c78623 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-07 00:41:28 +00:00
Nextcloud bot
affcbf7287 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-05 00:43:22 +00:00
Elizabeth Danzberger
aab45b764d Merge pull request #6723 from nextcloud/backport/6692/stable31
[stable31] fix: skip exporting a deleted card
2025-02-04 14:10:20 -05:00
Elizabeth Danzberger
3288e0e002 fix: skip exporting a deleted card
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2025-02-04 18:28:19 +00:00
Luka Trovic
cca9cc08f0 Merge pull request #6693 from nextcloud/dependabot/npm_and_yarn/stable31/babel/runtime-7.26.7
chore(deps): bump @babel/runtime from 7.26.0 to 7.26.7
2025-02-03 09:21:47 +01:00
dependabot[bot]
508dddc7cd chore(deps): bump @babel/runtime from 7.26.0 to 7.26.7
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.26.0 to 7.26.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.7/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 06:19:47 +01:00
Nextcloud bot
fd75f66624 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-03 01:02:35 +00:00
nextcloud-command
7635cde5cd fix(deps): Fix npm audit
Signed-off-by: GitHub <noreply@github.com>
2025-02-02 03:22:14 +00:00
Nextcloud bot
5b48075bc2 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-02-02 00:42:32 +00:00
dependabot[bot]
fb0096b113 Merge pull request #6710 from nextcloud/dependabot/npm_and_yarn/stable31/dompurify-3.2.4 2025-02-01 02:37:11 +00:00
dependabot[bot]
d9ce467c98 chore(deps): bump dompurify from 3.2.3 to 3.2.4
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 02:20:53 +00:00
Julius Knorr
ccd10248f7 chore(release): Bump version to 1.15.0-beta.2
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-01-30 11:04:51 +01:00
Julius Knorr
2473117892 ci: Test for separate extension
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-01-29 18:17:06 +01:00
Julius Härtl
e729bdcd04 fix: Properly show attachment extension
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2025-01-29 18:17:06 +01:00
Julius Knorr
58de28909f Merge pull request #6705 from nextcloud/cypress-for-stable31 2025-01-29 17:20:45 +01:00
grnd-alt
eda6bca538 fix: set cypress ci server version to stable31
Signed-off-by: grnd-alt <git@belakkaf.net>
2025-01-29 13:10:35 +01:00
Nextcloud bot
aa90c0b2d4 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-28 00:41:17 +00:00
Nextcloud bot
5a08e57de8 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-27 00:40:22 +00:00
Nextcloud bot
75067a0695 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-25 01:01:24 +00:00
Nextcloud bot
00d63692c8 Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-24 00:41:36 +00:00
159 changed files with 2220 additions and 6012 deletions

View File

@@ -13,40 +13,6 @@ updates:
- juliushaertl
- luka-nextcloud
- package-ecosystem: npm
target-branch: stable32
versioning-strategy: lockfile-only
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:15"
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: stable31
versioning-strategy: lockfile-only
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:15"
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: stable30
versioning-strategy: lockfile-only
@@ -54,7 +20,41 @@ updates:
schedule:
interval: weekly
day: saturday
time: "03:30"
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: 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: "*"
@@ -69,7 +69,7 @@ updates:
schedule:
interval: weekly
day: saturday
time: "03:45"
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
reviewers:
@@ -81,7 +81,7 @@ updates:
schedule:
interval: weekly
day: saturday
time: "04:00"
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
reviewers:
@@ -93,7 +93,7 @@ updates:
schedule:
interval: weekly
day: saturday
time: "04:15"
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
reviewers:

View File

@@ -18,13 +18,13 @@ jobs:
steps:
- uses: actions/checkout@v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Set up npm7
run: npm i -g npm@7
- name: Setup PHP
uses: shivammathur/setup-php@2.34.1
uses: shivammathur/setup-php@2.31.1
with:
php-version: '7.4'
tools: composer

View File

@@ -71,7 +71,7 @@ jobs:
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -87,7 +87,7 @@ jobs:
filename: ${{ env.APP_NAME }}/appinfo/info.xml
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with:
php-version: ${{ steps.php-versions.outputs.php-min }}
coverage: none
@@ -173,7 +173,7 @@ jobs:
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
- name: Attach tarball to github release
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
id: attach_to_release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -22,7 +22,7 @@ jobs:
node-version: [20.x]
# containers: [1, 2, 3]
php-versions: [ '8.2' ]
server-versions: [ 'master' ]
server-versions: [ 'stable31' ]
env:
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
@@ -41,7 +41,7 @@ jobs:
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
@@ -91,7 +91,7 @@ jobs:
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2.34.1
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}

View File

@@ -78,7 +78,7 @@ jobs:
path: apps/activity
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2.34.1
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

View File

@@ -68,7 +68,7 @@ jobs:
fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

View File

@@ -33,8 +33,8 @@ jobs:
id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
- name: Set up php${{ steps.versions.outputs.php-min }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.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

View File

@@ -48,7 +48,7 @@ jobs:
persist-credentials: false
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
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

View File

@@ -37,7 +37,7 @@ jobs:
fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4.2.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Set up npm7

View File

@@ -14,9 +14,6 @@ on:
# At 2:30 on Sundays
- cron: '30 2 * * 0'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
@@ -24,18 +21,15 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['main', 'master', 'stable32', 'stable31', 'stable30']
branches: ['main', 'master', 'stable30', 'stable29', 'stable28']
name: npm-audit-fix-${{ matrix.branches }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
ref: ${{ matrix.branches }}
continue-on-error: true
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -45,7 +39,7 @@ jobs:
fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.1.0
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -54,10 +48,10 @@ jobs:
- name: Fix npm audit
id: npm-audit
uses: nextcloud-libraries/npm-audit-action@1b1728b2b4a7a78d69de65608efcf4db0e3e42d0 # v0.2.0
uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0
- name: Run npm ci and npm run build
if: steps.checkout.outcome == 'success'
if: always()
env:
CYPRESS_INSTALL_BINARY: 0
run: |
@@ -65,8 +59,8 @@ jobs:
npm run build --if-present
- name: Create Pull Request
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
if: always()
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(deps): Fix npm audit'

View File

@@ -103,7 +103,7 @@ jobs:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
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

View File

@@ -106,7 +106,7 @@ jobs:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
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

View File

@@ -95,7 +95,7 @@ jobs:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
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

View File

@@ -15,13 +15,8 @@ on:
schedule:
- cron: '30 1 * * *'
permissions:
contents: read
pull-requests: write
jobs:
pr-feedback:
if: ${{ github.repository_owner == 'nextcloud' }}
runs-on: ubuntu-latest
steps:
- name: The get-github-handles-from-website action

View File

@@ -35,8 +35,8 @@ jobs:
- 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-min }}
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.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

View File

@@ -16,7 +16,7 @@ permissions:
jobs:
reuse-compliance-check:
runs-on: ubuntu-latest-low
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

View File

@@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['main', 'master', 'stable32', 'stable31', 'stable30']
branches: ['main', 'master', 'stable30', 'stable29', 'stable28']
name: update-nextcloud-ocp-${{ matrix.branches }}
@@ -38,7 +38,7 @@ jobs:
- name: Set up php8.2
if: steps.checkout.outcome == 'success'
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
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
@@ -107,7 +107,7 @@ jobs:
- name: Create Pull Request
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'chore(dev-deps): Bump nextcloud/ocp package'

View File

@@ -6,7 +6,6 @@
- Adrian Missy <adrian.missy@onewavestudios.com>
- Alexandru Puiu <alexpuiu20@yahoo.com>
- Arne Bartelt <arne.bartelt@gmail.com>
- Chandi Langecker <git@chandi.it>
- Christoph Wurst <christoph@winzerhof-wurst.at>
- Gary Kim <gary@garykim.dev>

View File

@@ -5,16 +5,64 @@
# Changelog
All notable changes to this project will be documented in this file.
## 1.16.0-beta.1
# 1.15.3
### Fixed
* [stable31] fix: Use getId() method for card ID retrieval by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7144
* [stable31]fix: ensure correct type when filtering events by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7148
* [stable31] fix: do not change focus when card id stays the same by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7173
* [stable31] fix(darkmode): Fix activity icon colors by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7240
* [stable31] fix: make comments with mention editable @backportbot[bot] in https://github.com/nextcloud/deck/pull/7198
* [stable31] fix: redirect to cleaner URL if RewriteBase is enabled by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7267
* [stable31] fix: missing push notifications by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7269
* [stable31] fix: use text cursor for card title on dashboard by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7274
* [stable31] fix: parse arguments to CardService.reorder correctly to int by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7275
### Improvements
* [stable31] Clean attachment sharing records after permanent deleted by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7180
* Chore(deps): Bump @nextcloud/vue from 8.22.0 to 8.31.0 by @luka-nextcloud in https://github.com/nextcloud/deck/pull/7272
# 1.15.2
### Fixed
* [stable31] fix: update DeleteCron to remove deleted lists by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7029
* [stable31] fix: not show Share with a Deck card for unauthorized users by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7061
* [stable31] fix: unstable cypress test by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7063
* [stable31] fix: add retry and show warning on description saving error by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7091
* [stable31] fix: styling for new stack input field by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7113
* [stable31] fix:allow foreign label deletion by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7130
* [stable31] fix: acl check when delete, update board acl by @backportbot[bot] in https://github.com/nextcloud/deck/pull/7132
### Improvements
* [stable31] perf: don't enrich cards when finding calendar entries by @backportbot[bot] in https://github.com/nextcloud/deck/pull/6959
## 1.15.1
### Fixed
* [stable31] fix: Properly show attachment extension by @backportbot in https://github.com/nextcloud/deck/pull/6701
* [stable31] Clear selected stack when selected board changed by @backportbot in https://github.com/nextcloud/deck/pull/6915
* [stable31] fix: Use strings as rich object ids by @backportbot in https://github.com/nextcloud/deck/pull/6951
* [stable31] fix: Limit label actions to labels of the cards board by @backportbot in https://github.com/nextcloud/deck/pull/6954
* [stable31] fix: only delete assignments on unshared board by @grnd-alt in https://github.com/nextcloud/deck/pull/6934
### Improvements
* [stable31] perf: Skip doing a query just to check if a board is deleted by @backportbot in https://github.com/nextcloud/deck/pull/6894
## 1.15.0
### Fixed
- Fix: Adapt URLs generated in the backend to new routes #6743
- Fix npm audit #6719
- Fix: skip exporting a deleted card #6723
## 1.15.0-beta.2
### 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)
### Fixed
- CSV export fixes @gidan80 [#6800](https://github.com/nextcloud/deck/pull/6800)
- feat: Implement reference resolving for cards that have a link in the title @juliusknorr [#6286](https://github.com/nextcloud/deck/pull/6286)
### Other
- Remove old project from README @edent [#6658](https://github.com/nextcloud/deck/pull/6658)
- devcontainer(image): Fix package path @niclasheinz [#6653](https://github.com/nextcloud/deck/pull/6653)
- remove deprecated nextcloud-vue-collections @grnd-alt [#6664](https://github.com/nextcloud/deck/pull/6664)
- fix: set cypress ci server version to stable31 @grnd-alt [#6705](https://github.com/nextcloud/deck/pull/6705)
## 1.15.0-beta.1
### Fixed

View File

@@ -12,7 +12,7 @@ SPDX-FileCopyrightText = "none"
SPDX-License-Identifier = "CC0-1.0"
[[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", "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"]
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"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2019 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "AGPL-3.0-or-later"

View File

@@ -20,7 +20,7 @@
- 🚀 Get your project organized
</description>
<version>2.0.0-dev.0</version>
<version>1.15.3</version>
<licence>agpl</licence>
<author>Julius Härtl</author>
<namespace>Deck</namespace>
@@ -42,7 +42,7 @@
<database min-version="9.4">pgsql</database>
<database>sqlite</database>
<database min-version="8.0">mysql</database>
<nextcloud min-version="33" max-version="33"/>
<nextcloud min-version="31" max-version="31"/>
</dependencies>
<background-jobs>
<job>OCA\Deck\Cron\DeleteCron</job>
@@ -54,15 +54,11 @@
<live-migration>
<step>OCA\Deck\Migration\DeletedCircleCleanup</step>
</live-migration>
<post-migration>
<step>OCA\Deck\Migration\LabelMismatchCleanup</step>
</post-migration>
</repair-steps>
<commands>
<command>OCA\Deck\Command\UserExport</command>
<command>OCA\Deck\Command\BoardImport</command>
<command>OCA\Deck\Command\TransferOwnership</command>
<command>OCA\Deck\Command\CalendarToggle</command>
</commands>
<activity>
<settings>

View File

@@ -29,7 +29,6 @@ return [
['name' => 'board#clone', 'url' => '/boards/{boardId}/clone', 'verb' => 'POST'],
['name' => 'board#transferOwner', 'url' => '/boards/{boardId}/transferOwner', 'verb' => 'PUT'],
['name' => 'board#export', 'url' => '/boards/{boardId}/export', 'verb' => 'GET'],
['name' => 'board#import', 'url' => '/boards/import', 'verb' => 'POST'],
// stacks
['name' => 'stack#index', 'url' => '/stacks/{boardId}', 'verb' => 'GET'],

View File

@@ -9,35 +9,31 @@
}
],
"require": {
"justinrainbow/json-schema": "^6.0",
"bamarni/composer-bin-plugin": "^1.8"
"justinrainbow/json-schema": "^6.0"
},
"require-dev": {
"roave/security-advisories": "dev-master",
"phpunit/phpunit": "^9",
"nextcloud/coding-standard": "^1.1",
"nextcloud/ocp": "dev-master"
"nextcloud/ocp": "dev-stable31",
"psalm/phar": "^5.13"
},
"config": {
"optimize-autoloader": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"bamarni/composer-bin-plugin": true
"composer/package-versions-deprecated": true
},
"platform": {
"php": "8.1"
}
},
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi"
],
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm",
"psalm:update-baseline": "psalm --threads=$(nproc) --no-cache --update-baseline",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
"psalm": "psalm.phar",
"psalm:update-baseline": "psalm.phar --update-baseline",
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
"test": [
"@test:unit",
"@test:integration"

217
composer.lock generated
View File

@@ -4,91 +4,146 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "263f9ff9e6a13d50ab09bc9f4e06b749",
"content-hash": "c89537a172cee5c19093b4ea0cb5365c",
"packages": [
{
"name": "bamarni/composer-bin-plugin",
"version": "1.8.2",
"name": "icecave/parity",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880"
"url": "https://github.com/icecave/parity.git",
"reference": "0109fef58b3230d23b20b2ac52ecdf477218d300"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"url": "https://api.github.com/repos/icecave/parity/zipball/0109fef58b3230d23b20b2ac52ecdf477218d300",
"reference": "0109fef58b3230d23b20b2ac52ecdf477218d300",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2.5 || ^8.0"
"icecave/repr": "~1",
"php": ">=5.3"
},
"require-dev": {
"composer/composer": "^2.0",
"ext-json": "*",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.5",
"symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
"eloquent/liberator": "~1",
"icecave/archer": "~1"
},
"type": "composer-plugin",
"extra": {
"class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
"suggest": {
"eloquent/asplode": "Drop-in exception-based error handling."
},
"type": "library",
"autoload": {
"psr-4": {
"Bamarni\\Composer\\Bin\\": "src"
"psr-0": {
"Icecave\\Parity": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "No conflicts for your bin dependencies",
"authors": [
{
"name": "James Harris",
"email": "james.harris@icecave.com.au",
"homepage": "https://github.com/jmalloc"
}
],
"description": "A customizable deep comparison library.",
"homepage": "https://github.com/IcecaveStudios/parity",
"keywords": [
"composer",
"conflict",
"dependency",
"executable",
"isolation",
"tool"
"compare",
"comparison",
"equal",
"equality",
"greater",
"less",
"sort",
"sorting"
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
"source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
"issues": "https://github.com/icecave/parity/issues",
"source": "https://github.com/icecave/parity/tree/1.0.0"
},
"time": "2022-10-31T08:38:03+00:00"
"time": "2014-01-17T05:56:27+00:00"
},
{
"name": "justinrainbow/json-schema",
"version": "6.5.2",
"name": "icecave/repr",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/jsonrainbow/json-schema.git",
"reference": "ac0d369c09653cf7af561f6d91a705bc617a87b8"
"url": "https://github.com/icecave/repr.git",
"reference": "8a3d2953adf5f464a06e3e2587aeacc97e2bed07"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/ac0d369c09653cf7af561f6d91a705bc617a87b8",
"reference": "ac0d369c09653cf7af561f6d91a705bc617a87b8",
"url": "https://api.github.com/repos/icecave/repr/zipball/8a3d2953adf5f464a06e3e2587aeacc97e2bed07",
"reference": "8a3d2953adf5f464a06e3e2587aeacc97e2bed07",
"shasum": ""
},
"require": {
"ext-json": "*",
"marc-mabe/php-enum": "^4.0",
"php": "^7.2 || ^8.0"
"php": ">=5.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.3.0",
"json-schema/json-schema-test-suite": "^23.2",
"marc-mabe/php-enum-phpstan": "^2.0",
"phpspec/prophecy": "^1.19",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^8.5"
"icecave/archer": "~1"
},
"suggest": {
"eloquent/asplode": "Drop-in exception-based error handling."
},
"type": "library",
"autoload": {
"psr-4": {
"Icecave\\Repr\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "James Harris",
"email": "james.harris@icecave.com.au",
"homepage": "https://github.com/jmalloc"
}
],
"description": "A library for generating string representations of any value, inspired by Python's reprlib library.",
"homepage": "https://github.com/IcecaveStudios/repr",
"keywords": [
"human",
"readable",
"repr",
"representation",
"string"
],
"support": {
"issues": "https://github.com/icecave/repr/issues",
"source": "https://github.com/icecave/repr/tree/1.0.1"
},
"time": "2014-07-25T05:44:41+00:00"
},
{
"name": "justinrainbow/json-schema",
"version": "6.0.0",
"source": {
"type": "git",
"url": "https://github.com/jsonrainbow/json-schema.git",
"reference": "a38c6198d53b09c0702f440585a4f4a5d9137bd9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/a38c6198d53b09c0702f440585a4f4a5d9137bd9",
"reference": "a38c6198d53b09c0702f440585a4f4a5d9137bd9",
"shasum": ""
},
"require": {
"icecave/parity": "1.0.0",
"marc-mabe/php-enum": "^2.0 || ^3.0 || ^4.0",
"php": ">=5.3.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.2.20 || ~2.19.0",
"json-schema/json-schema-test-suite": "1.2.0",
"phpunit/phpunit": "^4.8.35"
},
"bin": [
"bin/validate-json"
@@ -134,22 +189,22 @@
],
"support": {
"issues": "https://github.com/jsonrainbow/json-schema/issues",
"source": "https://github.com/jsonrainbow/json-schema/tree/6.5.2"
"source": "https://github.com/jsonrainbow/json-schema/tree/6.0.0"
},
"time": "2025-09-09T09:42:27+00:00"
"time": "2024-07-30T17:49:21+00:00"
},
{
"name": "marc-mabe/php-enum",
"version": "v4.7.2",
"version": "v4.7.1",
"source": {
"type": "git",
"url": "https://github.com/marc-mabe/php-enum.git",
"reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef"
"reference": "7159809e5cfa041dca28e61f7f7ae58063aae8ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef",
"reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef",
"url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/7159809e5cfa041dca28e61f7f7ae58063aae8ed",
"reference": "7159809e5cfa041dca28e61f7f7ae58063aae8ed",
"shasum": ""
},
"require": {
@@ -207,9 +262,9 @@
],
"support": {
"issues": "https://github.com/marc-mabe/php-enum/issues",
"source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2"
"source": "https://github.com/marc-mabe/php-enum/tree/v4.7.1"
},
"time": "2025-09-14T11:18:39+00:00"
"time": "2024-11-28T04:54:44+00:00"
}
],
"packages-dev": [
@@ -433,16 +488,16 @@
},
{
"name": "nextcloud/ocp",
"version": "dev-master",
"version": "dev-stable31",
"source": {
"type": "git",
"url": "https://github.com/nextcloud-deps/ocp.git",
"reference": "9a2e6c0bf6f2d87e1db8d18063a5bedf85040bb2"
"reference": "abd32429d794ede1d92b7b0a88a1070371c907b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/9a2e6c0bf6f2d87e1db8d18063a5bedf85040bb2",
"reference": "9a2e6c0bf6f2d87e1db8d18063a5bedf85040bb2",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/abd32429d794ede1d92b7b0a88a1070371c907b5",
"reference": "abd32429d794ede1d92b7b0a88a1070371c907b5",
"shasum": ""
},
"require": {
@@ -452,11 +507,10 @@
"psr/event-dispatcher": "^1.0",
"psr/log": "^3.0.2"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "33.0.0-dev"
"dev-stable31": "31.0.0-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -476,9 +530,9 @@
"description": "Composer package containing Nextcloud's public OCP API and the unstable NCU API",
"support": {
"issues": "https://github.com/nextcloud-deps/ocp/issues",
"source": "https://github.com/nextcloud-deps/ocp/tree/master"
"source": "https://github.com/nextcloud-deps/ocp/tree/stable31"
},
"time": "2025-09-27T00:45:05+00:00"
"time": "2025-07-31T00:57:37+00:00"
},
{
"name": "nikic/php-parser",
@@ -1130,6 +1184,41 @@
],
"time": "2024-12-05T13:48:26+00:00"
},
{
"name": "psalm/phar",
"version": "5.26.1",
"source": {
"type": "git",
"url": "https://github.com/psalm/phar.git",
"reference": "8a38e7ad04499a0ccd2c506fd1da6fc01fff4547"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/psalm/phar/zipball/8a38e7ad04499a0ccd2c506fd1da6fc01fff4547",
"reference": "8a38e7ad04499a0ccd2c506fd1da6fc01fff4547",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"conflict": {
"vimeo/psalm": "*"
},
"bin": [
"psalm.phar"
],
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Composer-based Psalm Phar",
"support": {
"issues": "https://github.com/psalm/phar/issues",
"source": "https://github.com/psalm/phar/tree/5.26.1"
},
"time": "2024-09-09T16:22:43+00:00"
},
{
"name": "psr/clock",
"version": "1.0.0",

View File

@@ -14,7 +14,6 @@
input[type=submit].icon-confirm {
border-color: var(--color-border-maxcontrast) !important;
border-style: solid;
border-left: none;
}

View File

@@ -129,81 +129,3 @@ describe('Board cloning', function() {
})
})
})
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')
})
})

View File

@@ -302,9 +302,6 @@ describe('Card', function () {
.first().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('.vs__dropdown-menu .tag:contains("Action needed")').should('be.visible').click()
cy.get('.vs__dropdown-menu .tag:contains("Later")').should('be.visible').click()

View File

@@ -22,10 +22,10 @@ describe('Deck dashboard', function() {
.should($el => expect($el.text().trim()).to.equal('Upcoming cards'))
})
it('Can see the default "Welcome Board" created for user by default', function() {
it('Can see the default "Personal Board" created for user by default', function() {
cy.visit('/apps/deck')
const defaultBoard = 'Welcome to Nextcloud Deck!'
const defaultBoard = 'Personal'
cy.get('.app-navigation-entry-wrapper[icon=icon-deck]')
.find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + defaultBoard + ')')

View File

@@ -1,102 +0,0 @@
{
"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"
}
]
}

View File

@@ -102,11 +102,7 @@ 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.get('[aria-label="Open details"]').click()
cy.get('.app-sidebar').should('be.visible')
// Add delay to ensure the events are bound
cy.wait(1000)
cy.get('.select input').click().type(`${query}`)
cy.get('.select input').type(`${query}`)
cy.wait('@fetchRecipients', { timeout: 7000 })
cy.get('.vs__dropdown-menu .option').first().contains(query)

View File

@@ -6,7 +6,7 @@ The REST API provides access for authenticated users to their data inside the De
# Prerequisites
- 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`.
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`.
- The API is located at https://nextcloud.local/index.php/apps/deck/api/v1.0
- All request parameters are required, unless otherwise specified
@@ -733,7 +733,6 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
| Parameter | Type | Description |
| --------- | ------- | --------------------------------------- |
| labelId | Integer | The label id to assign to the card |
#### Response
##### 200 Success
@@ -998,12 +997,10 @@ The request can fail with a bad request response for the following reasons:
#### Request data
The request is performed as `multipart/form-data`.
| Parameter | Type | Description |
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
| 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. |
| Parameter | Type | Description |
| --------- | ------- | --------------------------------------------- |
| type | String | The type of the attachement |
| file | Binary | File data to add as an attachment |
- 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
@@ -1025,13 +1022,12 @@ The request is performed as `multipart/form-data`.
#### Request data
The request is performed as `multipart/form-data`.
| Parameter | Type | Description |
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
| 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. |
| Parameter | Type | Description |
| --------- | ------- | --------------------------------------------- |
| type | String | The type of the attachement |
| file | Binary | File data to add as an attachment |
For now only `deck_file` is supported as an attachment type.
#### Response

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -9,9 +9,11 @@ OC.L10N.register(
"Missing a temporary folder" : "Адсутнічае часовая папка",
"Could not write file to disk" : "Не ўдалося запісаць файл на дыск",
"A PHP extension stopped the file upload" : "Пашырэнне PHP спыніла запампоўванне файла",
"No file uploaded or file size exceeds maximum of %s" : "Файл не запампаваны, або памер файла перавышае максімальны %s",
"copy" : "копія",
"Done" : "Гатова",
"File" : "Файл",
"Invalid date, date format must be YYYY-MM-DD" : "Памылковая дата, дата павінна быць у фармаце ГГГГ-ММ-ДД",
"Cancel" : "Скасаваць",
"Drop your files to upload" : "Перацягніце файлы для запампоўвання",
"File already exists" : "Файл ужо існуе",
@@ -50,6 +52,7 @@ OC.L10N.register(
"Reply" : "Адказаць",
"Update" : "Абнавіць",
"Description" : "Апісанне",
"Formatting help" : "Даведка па фармаціраванні",
"Later today {timeLocale}" : "Пазней сёння {timeLocale}",
"Set due date for later today" : "Задаць дату выканання на пазней сёння",
"Tomorrow {timeLocale}" : "Заўтра {timeLocale}",
@@ -66,6 +69,7 @@ OC.L10N.register(
"Keyboard shortcut" : "Спалучэнне клавіш",
"Action" : "Дзеянне",
"Shift" : "Shift",
"Ctrl" : "Ctrl",
"Search" : "Пошук",
"Enter" : "Enter",
"Shared with you" : "Абагулена з вамі",

View File

@@ -7,9 +7,11 @@
"Missing a temporary folder" : "Адсутнічае часовая папка",
"Could not write file to disk" : "Не ўдалося запісаць файл на дыск",
"A PHP extension stopped the file upload" : "Пашырэнне PHP спыніла запампоўванне файла",
"No file uploaded or file size exceeds maximum of %s" : "Файл не запампаваны, або памер файла перавышае максімальны %s",
"copy" : "копія",
"Done" : "Гатова",
"File" : "Файл",
"Invalid date, date format must be YYYY-MM-DD" : "Памылковая дата, дата павінна быць у фармаце ГГГГ-ММ-ДД",
"Cancel" : "Скасаваць",
"Drop your files to upload" : "Перацягніце файлы для запампоўвання",
"File already exists" : "Файл ужо існуе",
@@ -48,6 +50,7 @@
"Reply" : "Адказаць",
"Update" : "Абнавіць",
"Description" : "Апісанне",
"Formatting help" : "Даведка па фармаціраванні",
"Later today {timeLocale}" : "Пазней сёння {timeLocale}",
"Set due date for later today" : "Задаць дату выканання на пазней сёння",
"Tomorrow {timeLocale}" : "Заўтра {timeLocale}",
@@ -64,6 +67,7 @@
"Keyboard shortcut" : "Спалучэнне клавіш",
"Action" : "Дзеянне",
"Shift" : "Shift",
"Ctrl" : "Ctrl",
"Search" : "Пошук",
"Enter" : "Enter",
"Shared with you" : "Абагулена з вамі",

View File

@@ -188,6 +188,10 @@ OC.L10N.register(
"Add Attachment" : "Tilføj vedhæftning",
"Choose attachment" : "Vælg en vedhæftning",
"Select Date" : "Vælg dato",
"Later today {timeLocale}" : "Senere i dag {timeLocale}",
"Tomorrow {timeLocale}" : "I morgen {timeLocale}",
"This weekend {timeLocale}" : "Denne weekend {timeLocale}",
"Next week {timeLocale}" : "Næste uge {timeLocale}",
"Set a due date" : "Angiv en forfaldsdato",
"Remove due date" : "Fjern forfaldsdato",
"Mark as done" : "Marker som færdig",

View File

@@ -186,6 +186,10 @@
"Add Attachment" : "Tilføj vedhæftning",
"Choose attachment" : "Vælg en vedhæftning",
"Select Date" : "Vælg dato",
"Later today {timeLocale}" : "Senere i dag {timeLocale}",
"Tomorrow {timeLocale}" : "I morgen {timeLocale}",
"This weekend {timeLocale}" : "Denne weekend {timeLocale}",
"Next week {timeLocale}" : "Næste uge {timeLocale}",
"Set a due date" : "Angiv en forfaldsdato",
"Remove due date" : "Fjern forfaldsdato",
"Mark as done" : "Marker som færdig",

View File

@@ -373,6 +373,7 @@ OC.L10N.register(
"Note: Only the JSON format is supported for importing back into the Deck app." : "Megjegyzés: Csak a JSON formátum támogatott a Kártyák alkalmazásba való importáláskor.",
"Export" : "Exportálás",
"Loading filtered view" : "Szűrt nézet betöltése",
"Search for {searchQuery} in other boards" : "Keresés a(z) {searchQuery} kifejezésre a többi táblában",
"Search for {searchQuery} in all boards" : "Keresés a(z) {searchQuery} kifejezésre az összes táblában",
"No results found" : "Nincs találat",
"Deck board {name}\n* Last modified on {lastMod}" : "{name} kártyatábla\n* Legutóbb módosítva: {lastMod}",

View File

@@ -371,6 +371,7 @@
"Note: Only the JSON format is supported for importing back into the Deck app." : "Megjegyzés: Csak a JSON formátum támogatott a Kártyák alkalmazásba való importáláskor.",
"Export" : "Exportálás",
"Loading filtered view" : "Szűrt nézet betöltése",
"Search for {searchQuery} in other boards" : "Keresés a(z) {searchQuery} kifejezésre a többi táblában",
"Search for {searchQuery} in all boards" : "Keresés a(z) {searchQuery} kifejezésre az összes táblában",
"No results found" : "Nincs találat",
"Deck board {name}\n* Last modified on {lastMod}" : "{name} kártyatábla\n* Legutóbb módosítva: {lastMod}",

View File

@@ -81,10 +81,14 @@ OC.L10N.register(
"Could not write file to disk" : "Неможе да се запишува на дискот",
"A PHP extension stopped the file upload" : "PHP додаток го стопираше прикачувањето на датотеката",
"No file uploaded or file size exceeds maximum of %s" : "Нема прикачена дадотека или големината го надмминува максимумот од %s",
"Invalid file type. Only JSON files are allowed." : "Невалиден тип на датотека. Дозволени се само JSON датотеки.",
"Invalid JSON data" : "Невалидни JSON податоци",
"Failed to import board" : "Неуспешен увоз на табла",
"Cards due today" : "Картици со рок до денес",
"Cards due tomorrow" : "Картици со рок до утре",
"Upcoming cards" : "Престојни картици",
"Load more" : "Вчитај повеќе",
"Welcome to Nextcloud Deck!" : "Добредојдовте во Nextcloud Deck!",
"The card \"%s\" on \"%s\" has been assigned to you by %s." : "Картицата \"%s\" на \"%s\" ти е доделена од %s.",
"{user} has assigned the card {deck-card} on {deck-board} to you." : "{user} ти ја додели картицата {deck-card} на {deck-board}.",
"The card \"%s\" on \"%s\" has reached its due date." : "Картицата \"%s\" на \"%s\" го достигна датумот на истекување.",
@@ -108,9 +112,15 @@ OC.L10N.register(
"Later" : "Покасно",
"copy" : "копирај",
"Read more inside" : "Прочитај повеќе",
"Custom lists - click to rename!" : "Прилагодени листи кликнете за преименување!",
"To Do" : "За правење",
"In Progress" : "Во тек",
"Done" : "Готово",
"1. Open to learn more about boards and cards" : "1. Отворете за да дознаете повеќе за таблите и картичките",
"2. Drag cards left and right, up and down" : "2. Влечете ги картичките лево и десно, горе и долу",
"3. Apply rich formatting and link content" : "3. Применете богато форматирање и поврзете содржина",
"4. Share, comment and collaborate!" : "4. Споделувајте, коментирајте и соработувајте!",
"Create your first card!" : "Креирајте ја вашата прва картичка!",
"This comment has more than %s characters.\nAdded as an attachment to the card with name %s.\nAccessible on URL: %s." : "Коментарот има повеќе од %s карактери.\nДодаден е како пролог на картицата со име %s.\nДостапен е на линк: %s.",
"Attachments" : "Прилози",
"File" : "Датотека",
@@ -152,6 +162,7 @@ OC.L10N.register(
"Filter by assigned user" : "Филтрирај по назначени корисници",
"Unassigned" : "Неназначени",
"Filter by status" : "Филтрирај по статус",
"Open and completed" : "Отворени и завршени",
"Open" : "Отвори",
"Completed" : "Завршено",
"Filter by due date" : "Филтрирај по краен рок",
@@ -294,7 +305,9 @@ OC.L10N.register(
"Action" : "Акција",
"Shift" : "Shift",
"Scroll" : "Scroll",
"Scroll sideways" : "Лизгај странично",
"Navigate between cards" : "Навигација помеѓу картиците",
"Esc" : "Esc",
"Close card details" : "Затвори детали на картица",
"Ctrl" : "Ctrl",
"Search" : "Барај",
@@ -342,6 +355,9 @@ OC.L10N.register(
"Assigned cards" : "Доделени картици",
"No notifications" : "Нема известувања",
"Delete board" : "Избриши табла",
"Importing board..." : "Увезување табла...",
"Board imported successfully" : "Таблата е успешно увезена",
"Import board" : "Увези табла",
"Clone {boardTitle}" : "Клонирај {boardTitle}",
"Clone cards" : "Клинирај картици",
"Clone assignments" : "Клонирај задачи",
@@ -352,6 +368,9 @@ OC.L10N.register(
"Restore archived cards" : "Врати архивирани картици",
"Clone" : "Клонирај",
"Export {boardTitle}" : "Извези {boardTitle}",
"Export as JSON" : "Извези како JSON",
"Export as CSV" : "Извези како CSV",
"Note: Only the JSON format is supported for importing back into the Deck app." : "Забелешка: Поддржан е само JSON формат за увоз назад во апликацијата Deck.",
"Export" : "Извези",
"Loading filtered view" : "Вчитување на филтриран поглед",
"Search for {searchQuery} in other boards" : "Барај {searchQuery} во други табли",

View File

@@ -79,10 +79,14 @@
"Could not write file to disk" : "Неможе да се запишува на дискот",
"A PHP extension stopped the file upload" : "PHP додаток го стопираше прикачувањето на датотеката",
"No file uploaded or file size exceeds maximum of %s" : "Нема прикачена дадотека или големината го надмминува максимумот од %s",
"Invalid file type. Only JSON files are allowed." : "Невалиден тип на датотека. Дозволени се само JSON датотеки.",
"Invalid JSON data" : "Невалидни JSON податоци",
"Failed to import board" : "Неуспешен увоз на табла",
"Cards due today" : "Картици со рок до денес",
"Cards due tomorrow" : "Картици со рок до утре",
"Upcoming cards" : "Престојни картици",
"Load more" : "Вчитај повеќе",
"Welcome to Nextcloud Deck!" : "Добредојдовте во Nextcloud Deck!",
"The card \"%s\" on \"%s\" has been assigned to you by %s." : "Картицата \"%s\" на \"%s\" ти е доделена од %s.",
"{user} has assigned the card {deck-card} on {deck-board} to you." : "{user} ти ја додели картицата {deck-card} на {deck-board}.",
"The card \"%s\" on \"%s\" has reached its due date." : "Картицата \"%s\" на \"%s\" го достигна датумот на истекување.",
@@ -106,9 +110,15 @@
"Later" : "Покасно",
"copy" : "копирај",
"Read more inside" : "Прочитај повеќе",
"Custom lists - click to rename!" : "Прилагодени листи кликнете за преименување!",
"To Do" : "За правење",
"In Progress" : "Во тек",
"Done" : "Готово",
"1. Open to learn more about boards and cards" : "1. Отворете за да дознаете повеќе за таблите и картичките",
"2. Drag cards left and right, up and down" : "2. Влечете ги картичките лево и десно, горе и долу",
"3. Apply rich formatting and link content" : "3. Применете богато форматирање и поврзете содржина",
"4. Share, comment and collaborate!" : "4. Споделувајте, коментирајте и соработувајте!",
"Create your first card!" : "Креирајте ја вашата прва картичка!",
"This comment has more than %s characters.\nAdded as an attachment to the card with name %s.\nAccessible on URL: %s." : "Коментарот има повеќе од %s карактери.\nДодаден е како пролог на картицата со име %s.\nДостапен е на линк: %s.",
"Attachments" : "Прилози",
"File" : "Датотека",
@@ -150,6 +160,7 @@
"Filter by assigned user" : "Филтрирај по назначени корисници",
"Unassigned" : "Неназначени",
"Filter by status" : "Филтрирај по статус",
"Open and completed" : "Отворени и завршени",
"Open" : "Отвори",
"Completed" : "Завршено",
"Filter by due date" : "Филтрирај по краен рок",
@@ -292,7 +303,9 @@
"Action" : "Акција",
"Shift" : "Shift",
"Scroll" : "Scroll",
"Scroll sideways" : "Лизгај странично",
"Navigate between cards" : "Навигација помеѓу картиците",
"Esc" : "Esc",
"Close card details" : "Затвори детали на картица",
"Ctrl" : "Ctrl",
"Search" : "Барај",
@@ -340,6 +353,9 @@
"Assigned cards" : "Доделени картици",
"No notifications" : "Нема известувања",
"Delete board" : "Избриши табла",
"Importing board..." : "Увезување табла...",
"Board imported successfully" : "Таблата е успешно увезена",
"Import board" : "Увези табла",
"Clone {boardTitle}" : "Клонирај {boardTitle}",
"Clone cards" : "Клинирај картици",
"Clone assignments" : "Клонирај задачи",
@@ -350,6 +366,9 @@
"Restore archived cards" : "Врати архивирани картици",
"Clone" : "Клонирај",
"Export {boardTitle}" : "Извези {boardTitle}",
"Export as JSON" : "Извези како JSON",
"Export as CSV" : "Извези како CSV",
"Note: Only the JSON format is supported for importing back into the Deck app." : "Забелешка: Поддржан е само JSON формат за увоз назад во апликацијата Deck.",
"Export" : "Извези",
"Loading filtered view" : "Вчитување на филтриран поглед",
"Search for {searchQuery} in other boards" : "Барај {searchQuery} во други табли",

View File

@@ -266,6 +266,7 @@ OC.L10N.register(
"{count} comments, {unread} unread" : "{count} reacties, {unread} ongelezen",
"Todo items" : "Te doen onderwerpen",
"Edit card title" : "Wijzig de titel van de kaart",
"Open link" : "Open link",
"Card deleted" : "Kaart verwijderd",
"Edit title" : "Titel bewerken",
"Assign to me" : "Aan mij toewijzen",
@@ -279,6 +280,7 @@ OC.L10N.register(
"Shift" : "Shift",
"Ctrl" : "Ctrl",
"Search" : "Zoeken",
"Enter" : "Enter",
"All boards" : "Alle borden",
"Archived boards" : "Gearchiveerde borden",
"Shared with you" : "Deelde met jou",

View File

@@ -264,6 +264,7 @@
"{count} comments, {unread} unread" : "{count} reacties, {unread} ongelezen",
"Todo items" : "Te doen onderwerpen",
"Edit card title" : "Wijzig de titel van de kaart",
"Open link" : "Open link",
"Card deleted" : "Kaart verwijderd",
"Edit title" : "Titel bewerken",
"Assign to me" : "Aan mij toewijzen",
@@ -277,6 +278,7 @@
"Shift" : "Shift",
"Ctrl" : "Ctrl",
"Search" : "Zoeken",
"Enter" : "Enter",
"All boards" : "Alle borden",
"Archived boards" : "Gearchiveerde borden",
"Shared with you" : "Deelde met jou",

View File

@@ -516,7 +516,7 @@ class ActivityManager {
];
}
private function findDetailsForCard(int $cardId, ?string $subject = null): array {
private function findDetailsForCard($cardId, $subject = null) {
$card = $this->cardMapper->find($cardId);
$stack = $this->stackMapper->find($card->getStackId());
$board = $this->boardMapper->find($stack->getBoardId());

View File

@@ -7,9 +7,6 @@
namespace OCA\Deck\Activity;
/**
* @psalm-api SettingComment
*/
class SettingComment extends SettingBase {
/**

View File

@@ -1,67 +0,0 @@
<?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;
}
}

View File

@@ -6,13 +6,9 @@
*/
namespace OCA\Deck\Controller;
use OCA\Deck\Db\Attachment;
use OCA\Deck\Service\AttachmentService;
use OCP\AppFramework\ApiController;
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\IRequest;
@@ -25,52 +21,72 @@ class AttachmentApiController extends ApiController {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function getAll(string $apiVersion): DataResponse {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*/
public function getAll($apiVersion) {
$attachment = $this->attachmentService->findAll($this->request->getParam('cardId'), true);
if ($apiVersion === '1.0') {
$attachment = array_filter($attachment, fn (Attachment $attachment): bool => $attachment->getType() === 'deck_file');
$attachment = array_filter($attachment, function ($attachment) {
return $attachment->getType() === 'deck_file';
});
}
return new DataResponse($attachment, HTTP::STATUS_OK);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function display(int $cardId, int $attachmentId, string $type = 'deck_file') {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*/
public function display($cardId, $attachmentId, $type = 'deck_file') {
return $this->attachmentService->display($cardId, $attachmentId, $type);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function create(int $cardId, string $type, string $data): DataResponse {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*/
public function create($cardId, $type, $data) {
$attachment = $this->attachmentService->create($cardId, $type, $data);
return new DataResponse($attachment, HTTP::STATUS_OK);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function update(int $cardId, int $attachmentId, string $data, string $type = 'deck_file'): DataResponse {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*/
public function update($cardId, $attachmentId, $data, $type = 'deck_file') {
$attachment = $this->attachmentService->update($cardId, $attachmentId, $data, $type);
return new DataResponse($attachment, HTTP::STATUS_OK);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function delete(int $cardId, int $attachmentId, string $type = 'deck_file'): DataResponse {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*/
public function delete($cardId, $attachmentId, $type = 'deck_file') {
$attachment = $this->attachmentService->delete($cardId, $attachmentId, $type);
return new DataResponse($attachment, HTTP::STATUS_OK);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function restore(int $cardId, int $attachmentId, string $type = 'deck_file'): DataResponse {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*/
public function restore($cardId, $attachmentId, $type = 'deck_file') {
$attachment = $this->attachmentService->restore($cardId, $attachmentId, $type);
return new DataResponse($attachment, HTTP::STATUS_OK);
}

View File

@@ -7,13 +7,8 @@
namespace OCA\Deck\Controller;
use OCA\Deck\BadRequestException;
use OCA\Deck\Db\Attachment;
use OCA\Deck\Service\AttachmentService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Response;
use OCP\IRequest;
class AttachmentController extends Controller {
@@ -25,66 +20,74 @@ class AttachmentController extends Controller {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
public function getAll(int $cardId): array {
/**
* @NoAdminRequired
*/
public function getAll($cardId) {
return $this->attachmentService->findAll($cardId, true);
}
/**
* @param $cardId
* @param $attachmentId
* @NoCSRFRequired
* @NoAdminRequired
* @return \OCP\AppFramework\Http\Response
* @throws \OCA\Deck\NotFoundException
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function display(int $cardId, string $attachmentId): Response {
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
return $this->attachmentService->display($cardId, $attachmentId, $type);
}
#[NoAdminRequired]
public function create(int $cardId): Attachment {
return $this->attachmentService->create(
$cardId,
$this->request->getParam('type'),
$this->request->getParam('data') ?? '',
);
}
#[NoAdminRequired]
public function update(int $cardId, string $attachmentId): Attachment {
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
return $this->attachmentService->update($cardId, $attachmentId, $this->request->getParam('data') ?? '', $type);
}
#[NoAdminRequired]
public function delete(int $cardId, string $attachmentId): Attachment {
['type' => $type, 'attachmentId' => $attachmentId] = $this->extractTypeAndAttachmentId($attachmentId);
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);
}
/**
* @return array{type: string, attachmentId: int}
* @throws BadRequestException
*/
private function extractTypeAndAttachmentId(string $attachmentId): array {
public function display($cardId, $attachmentId) {
if (!str_contains($attachmentId, ':')) {
$type = 'deck_file';
} else {
[$type, $attachmentId] = [...explode(':', $attachmentId), '', ''];
[$type, $attachmentId] = explode(':', $attachmentId);
}
return $this->attachmentService->display($cardId, $attachmentId, $type);
}
if ($type === '' || !is_numeric($attachmentId)) {
throw new BadRequestException('Invalid attachment id');
/**
* @NoAdminRequired
*/
public function create($cardId) {
return $this->attachmentService->create(
$cardId,
$this->request->getParam('type'),
$this->request->getParam('data')
);
}
/**
* @NoAdminRequired
*/
public function update($cardId, $attachmentId) {
if (!str_contains($attachmentId, ':')) {
$type = 'deck_file';
} else {
[$type, $attachmentId] = explode(':', $attachmentId);
}
return $this->attachmentService->update($cardId, $attachmentId, $this->request->getParam('data'), $type);
}
return [
'type' => $type,
'attachmentId' => (int)$attachmentId,
];
/**
* @NoAdminRequired
*/
public function delete($cardId, $attachmentId) {
if (!str_contains($attachmentId, ':')) {
$type = 'deck_file';
} else {
[$type, $attachmentId] = explode(':', $attachmentId);
}
return $this->attachmentService->delete($cardId, $attachmentId, $type);
}
/**
* @NoAdminRequired
*/
public function restore($cardId, $attachmentId) {
if (!str_contains($attachmentId, ':')) {
$type = 'deck_file';
} else {
[$type, $attachmentId] = explode(':', $attachmentId);
}
return $this->attachmentService->restore($cardId, $attachmentId, $type);
}
}

View File

@@ -12,13 +12,10 @@ use OCA\Deck\Service\BoardService;
use OCA\Deck\StatusException;
use OCP\AppFramework\ApiController;
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\IRequest;
use function Sabre\HTTP\parseDate;
use OCP\IRequest;
use Sabre\HTTP\Util;
/**
* Class BoardApiController
@@ -39,18 +36,21 @@ class BoardApiController extends ApiController {
}
/**
* Return all the boards that the current user has access to.
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Return all of the boards that the current user has access to.
*
* @param bool $details
* @throws StatusException
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function index(bool $details = false): DataResponse {
public function index(bool $details = false) {
$modified = $this->request->getHeader('If-Modified-Since');
if ($modified === '') {
if ($modified === null || $modified === '') {
$boards = $this->boardService->findAll(0, $details === true);
} else {
$date = parseDate($modified);
$date = Util::parseHTTPDate($modified);
if (!$date) {
throw new StatusException('Invalid If-Modified-Since header provided.');
}
@@ -64,12 +64,14 @@ class BoardApiController extends ApiController {
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*
* Return the board specified by $this->request->getParam('boardId').
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function get(): DataResponse {
public function get() {
$board = $this->boardService->find($this->request->getParam('boardId'));
$response = new DataResponse($board, HTTP::STATUS_OK);
$response->setETag($board->getEtag());
@@ -77,53 +79,68 @@ class BoardApiController extends ApiController {
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* @params $title
* @params $color
*
* Create a board with the specified title and color.
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function create(string $title, string $color): DataResponse {
public function create($title, $color) {
$board = $this->boardService->create($title, $this->userId, $color);
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.
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function update(string $title, string $color, bool $archived = false): DataResponse {
public function update($title, $color, $archived = false) {
$board = $this->boardService->update($this->request->getParam('boardId'), $title, $color, $archived);
return new DataResponse($board, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*
* Delete the board specified by $boardId. Return the board that was deleted.
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function delete(): DataResponse {
public function delete() {
$board = $this->boardService->delete($this->request->getParam('boardId'));
return new DataResponse($board, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*
* Undo the deletion of the board specified by $boardId.
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function undoDelete(): DataResponse {
public function undoDelete() {
$board = $this->boardService->deleteUndo($this->request->getParam('boardId'));
return new DataResponse($board, HTTP::STATUS_OK);
}
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function addAcl(int $boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage) {
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*/
public function addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage) {
$acl = $this->boardService->addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage);
return new DataResponse($acl, HTTP::STATUS_OK);
}

View File

@@ -10,13 +10,10 @@ namespace OCA\Deck\Controller;
use OCA\Deck\Db\Acl;
use OCA\Deck\Db\Board;
use OCA\Deck\Service\BoardService;
use OCA\Deck\Service\Importer\BoardImportService;
use OCA\Deck\Service\PermissionService;
use OCP\AppFramework\ApiController;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\IL10N;
use OCP\IRequest;
class BoardController extends ApiController {
@@ -25,45 +22,73 @@ class BoardController extends ApiController {
IRequest $request,
private BoardService $boardService,
private PermissionService $permissionService,
private BoardImportService $boardImportService,
private IL10N $l10n,
private $userId,
) {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
/**
* @NoAdminRequired
*/
public function index() {
return $this->boardService->findAll();
}
#[NoAdminRequired]
public function read(int $boardId): Board {
/**
* @NoAdminRequired
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
*/
public function read(int $boardId) {
return $this->boardService->find($boardId);
}
#[NoAdminRequired]
public function create(string $title, string $color): Board {
/**
* @NoAdminRequired
* @param $title
* @param $color
* @return \OCP\AppFramework\Db\Entity
*/
public function create($title, $color) {
return $this->boardService->create($title, $this->userId, $color);
}
#[NoAdminRequired]
public function update(int $id, string $title, string $color, bool $archived): Board {
/**
* @NoAdminRequired
* @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);
}
#[NoAdminRequired]
public function delete(int $boardId): Board {
/**
* @NoAdminRequired
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
*/
public function delete($boardId) {
return $this->boardService->delete($boardId);
}
#[NoAdminRequired]
public function deleteUndo(int $boardId): Board {
/**
* @NoAdminRequired
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
*/
public function deleteUndo($boardId) {
return $this->boardService->deleteUndo($boardId);
}
#[NoAdminRequired]
public function getUserPermissions(int $boardId): array {
/**
* @NoAdminRequired
* @param $boardId
* @return array|bool
* @internal param $userId
*/
public function getUserPermissions($boardId) {
$permissions = $this->permissionService->getPermissions($boardId);
return [
'PERMISSION_READ' => $permissions[Acl::PERMISSION_READ],
@@ -74,10 +99,16 @@ class BoardController extends ApiController {
}
/**
* @NoAdminRequired
* @param $boardId
* @param $type
* @param $participant
* @param $permissionEdit
* @param $permissionShare
* @param $permissionManage
* @return \OCP\AppFramework\Db\Entity
*/
#[NoAdminRequired]
public function addAcl(int $boardId, int $type, $participant, bool $permissionEdit, bool $permissionShare, bool $permissionManage): Acl {
public function addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage) {
return $this->boardService->addAcl($boardId, $type, $participant, $permissionEdit, $permissionShare, $permissionManage);
}
@@ -132,62 +163,4 @@ class BoardController extends ApiController {
public function 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);
}
}
}

View File

@@ -9,9 +9,6 @@ namespace OCA\Deck\Controller;
use OCA\Deck\Service\Importer\BoardImportService;
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\OCSController;
use OCP\IRequest;
@@ -26,9 +23,11 @@ class BoardImportApiController extends OCSController {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*/
public function import(string $system, array $config, array $data): DataResponse {
$this->boardImportService->setSystem($system);
$config = json_decode(json_encode($config));
@@ -39,17 +38,21 @@ class BoardImportApiController extends OCSController {
return new DataResponse($this->boardImportService->getBoard(), Http::STATUS_OK);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*/
public function getAllowedSystems(): DataResponse {
$allowedSystems = $this->boardImportService->getAllowedImportSystems();
return new DataResponse($allowedSystems, Http::STATUS_OK);
}
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*/
public function getConfigSchema(string $name): DataResponse {
$this->boardImportService->setSystem($name);
$this->boardImportService->validateSystem();

View File

@@ -12,9 +12,6 @@ use OCA\Deck\Service\AssignmentService;
use OCA\Deck\Service\CardService;
use OCP\AppFramework\ApiController;
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\IRequest;
@@ -30,7 +27,7 @@ class CardApiController extends ApiController {
* @param IRequest $request
* @param CardService $cardService
* @param AssignmentService $assignmentService
* @param string $userId
* @param $userId
*/
public function __construct(
string $appName,
@@ -83,102 +80,112 @@ class CardApiController extends ApiController {
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
*
* Update a card
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function update(string $title, $type, string $owner, string $description = '', int $order = 0, $duedate = null, $archived = null): DataResponse {
public function update($title, $type, $owner, $description = '', $order = 0, $duedate = null, $archived = 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);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Delete a specific card.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function delete(): DataResponse {
public function delete() {
$card = $this->cardService->delete($this->request->getParam('cardId'));
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Assign a label to a card.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function assignLabel(int $labelId): DataResponse {
public function assignLabel($labelId) {
$card = $this->cardService->assignLabel($this->request->getParam('cardId'), $labelId);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Assign a label to a card.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function removeLabel(int $labelId): DataResponse {
public function removeLabel($labelId) {
$card = $this->cardService->removeLabel($this->request->getParam('cardId'), $labelId);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Assign a user to a card
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function assignUser(int $cardId, string $userId, int $type = 0): DataResponse {
public function assignUser($cardId, $userId, $type = 0) {
$card = $this->assignmentService->assignUser($cardId, $userId, $type);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Unassign a user from a card
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function unassignUser(int $cardId, string $userId, int $type = 0): DataResponse {
public function unassignUser($cardId, $userId, $type = 0) {
$card = $this->assignmentService->unassignUser($cardId, $userId, $type);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Archive card
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function archive(int $cardId): DataResponse {
public function archive($cardId) {
$card = $this->cardService->archive($cardId);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Unarchive card
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function unarchive(int $cardId): DataResponse {
public function unarchive($cardId) {
$card = $this->cardService->unarchive($cardId);
return new DataResponse($card, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Reorder cards
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function reorder(int $stackId, int $order): DataResponse {
$card = $this->cardService->reorder((int)$this->request->getParam('cardId'), $stackId, $order);
public function reorder($stackId, $order) {
$card = $this->cardService->reorder((int)$this->request->getParam('cardId'), (int)$stackId, (int)$order);
return new DataResponse($card, HTTP::STATUS_OK);
}
}

View File

@@ -7,12 +7,9 @@
namespace OCA\Deck\Controller;
use OCA\Deck\Db\Assignment;
use OCA\Deck\Db\Card;
use OCA\Deck\Service\AssignmentService;
use OCA\Deck\Service\CardService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\IRequest;
class CardController extends Controller {
@@ -26,26 +23,45 @@ class CardController extends Controller {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
public function read(int $cardId): Card {
/**
* @NoAdminRequired
* @param $cardId
* @return \OCP\AppFramework\Db\Entity
*/
public function read($cardId) {
return $this->cardService->find($cardId);
}
/**
* @return Card[]
* @NoAdminRequired
* @param $cardId
* @param $stackId
* @param $order
* @return array
*/
#[NoAdminRequired]
public function reorder(int $cardId, int $stackId, int $order): array {
return $this->cardService->reorder($cardId, $stackId, $order);
public function reorder($cardId, $stackId, $order) {
return $this->cardService->reorder((int)$cardId, (int)$stackId, (int)$order);
}
#[NoAdminRequired]
public function rename(int $cardId, string $title): Card {
/**
* @NoAdminRequired
* @param $cardId
* @param $title
* @return \OCP\AppFramework\Db\Entity
*/
public function rename($cardId, $title) {
return $this->cardService->rename($cardId, $title);
}
#[NoAdminRequired]
public function create(string $title, int $stackId, string $type = 'plain', int $order = 999, string $description = '', $duedate = null, array $labels = [], array $users = []): Card {
/**
* @NoAdminRequired
* @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);
foreach ($labels as $label) {
@@ -60,68 +76,113 @@ class CardController extends Controller {
}
/**
* @NoAdminRequired
* @param $id
* @param $title
* @param $stackId
* @param $type
* @param $order
* @param $description
* @param $duedate
* @param $deletedAt
* @return \OCP\AppFramework\Db\Entity
*/
#[NoAdminRequired]
public function update(int $id, string $title, int $stackId, string $type, int $order, string $description, $duedate, $deletedAt): Card {
public function update($id, $title, $stackId, $type, $order, $description, $duedate, $deletedAt) {
return $this->cardService->update($id, $title, $stackId, $type, $this->userId, $description, $order, $duedate, $deletedAt);
}
#[NoAdminRequired]
public function clone(int $cardId, ?int $targetStackId = null): Card {
/**
* @NoAdminRequired
* @param $cardId
* @param $targetStackId
* @return \OCP\AppFramework\Db\Entity
*/
public function clone(int $cardId, ?int $targetStackId = null) {
return $this->cardService->cloneCard($cardId, $targetStackId);
}
#[NoAdminRequired]
public function delete(int $cardId): Card {
/**
* @NoAdminRequired
* @param $cardId
* @return \OCP\AppFramework\Db\Entity
*/
public function delete($cardId) {
return $this->cardService->delete($cardId);
}
/**
* @return Card[]
* @NoAdminRequired
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
*/
#[NoAdminRequired]
public function deleted(int $boardId): array {
public function deleted($boardId) {
return $this->cardService->fetchDeleted($boardId);
}
#[NoAdminRequired]
/**
* @NoAdminRequired
* @param $cardId
* @return \OCP\AppFramework\Db\Entity
*/
public function archive($cardId) {
return $this->cardService->archive($cardId);
}
#[NoAdminRequired]
public function unarchive(int $cardId): Card {
/**
* @NoAdminRequired
* @param $cardId
* @return \OCP\AppFramework\Db\Entity
*/
public function unarchive($cardId) {
return $this->cardService->unarchive($cardId);
}
#[NoAdminRequired]
public function done(int $cardId): Card {
/**
* @NoAdminRequired
* @param $cardId
* @return \OCP\AppFramework\Db\Entity
*/
public function done(int $cardId) {
return $this->cardService->done($cardId);
}
#[NoAdminRequired]
public function undone(int $cardId): Card {
/**
* @NoAdminRequired
* @param $cardId
* @return \OCP\AppFramework\Db\Entity
*/
public function undone(int $cardId) {
return $this->cardService->undone($cardId);
}
#[NoAdminRequired]
public function assignLabel(int $cardId, int $labelId): void {
/**
* @NoAdminRequired
* @param $cardId
* @param $labelId
*/
public function assignLabel($cardId, $labelId) {
$this->cardService->assignLabel($cardId, $labelId);
}
#[NoAdminRequired]
public function removeLabel(int $cardId, int $labelId): void {
/**
* @NoAdminRequired
* @param $cardId
* @param $labelId
*/
public function removeLabel($cardId, $labelId) {
$this->cardService->removeLabel($cardId, $labelId);
}
#[NoAdminRequired]
public function assignUser(int $cardId, string $userId, int $type = 0): Assignment {
/**
* @NoAdminRequired
*/
public function assignUser($cardId, $userId, $type = 0) {
return $this->assignmentService->assignUser($cardId, $userId, $type);
}
#[NoAdminRequired]
public function unassignUser(int $cardId, string $userId, int $type = 0): Assignment {
/**
* @NoAdminRequired
*/
public function unassignUser($cardId, $userId, $type = 0) {
return $this->assignmentService->unassignUser($cardId, $userId, $type);
}
}

View File

@@ -9,15 +9,11 @@ namespace OCA\Deck\Controller;
use OCA\Deck\Service\CommentService;
use OCA\Deck\StatusException;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\IRequest;
/**
* @psalm-api
*/
class CommentsApiController extends OCSController {
public function __construct(
string $appName,
@@ -31,33 +27,33 @@ class CommentsApiController extends OCSController {
}
/**
* @NoAdminRequired
* @throws StatusException
*/
#[NoAdminRequired]
public function list(int $cardId, int $limit = 20, int $offset = 0): DataResponse {
public function list(string $cardId, int $limit = 20, int $offset = 0): DataResponse {
return $this->commentService->list($cardId, $limit, $offset);
}
/**
* @NoAdminRequired
* @throws StatusException
*/
#[NoAdminRequired]
public function create(int $cardId, string $message, int $parentId = 0): DataResponse {
return $this->commentService->create($cardId, $message, $parentId);
}
/**
* @NoAdminRequired
* @throws StatusException
*/
#[NoAdminRequired]
public function update(int $cardId, int $commentId, string $message): DataResponse {
return $this->commentService->update($cardId, $commentId, $message);
}
/**
* @NoAdminRequired
* @throws StatusException
*/
#[NoAdminRequired]
public function delete(int $cardId, int $commentId): DataResponse {
return $this->commentService->delete($cardId, $commentId);
}

View File

@@ -8,8 +8,6 @@
namespace OCA\Deck\Controller;
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\NotFoundResponse;
use OCP\AppFramework\OCSController;
@@ -24,15 +22,19 @@ class ConfigController extends OCSController {
parent::__construct($AppName, $request);
}
#[NoAdminRequired]
#[NoCSRFRequired]
/**
* @NoCSRFRequired
* @NoAdminRequired
*/
public function get(): DataResponse {
return new DataResponse($this->configService->getAll());
}
#[NoAdminRequired]
#[NoCSRFRequired]
public function setValue(string $key, mixed $value): DataResponse|NotFoundResponse {
/**
* @NoCSRFRequired
* @NoAdminRequired
*/
public function setValue(string $key, $value) {
$result = $this->configService->set($key, $value);
if ($result === null) {
return new NotFoundResponse();

View File

@@ -10,9 +10,6 @@ namespace OCA\Deck\Controller;
use OCA\Deck\Service\LabelService;
use OCP\AppFramework\ApiController;
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\IRequest;
@@ -29,50 +26,59 @@ class LabelApiController extends ApiController {
$appName,
IRequest $request,
private LabelService $labelService,
private $userId,
) {
parent::__construct($appName, $request);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Get a specific label.
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function get(): DataResponse {
public function get() {
$label = $this->labelService->find($this->request->getParam('labelId'));
return new DataResponse($label, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* @params $title
* @params $color
* Create a new label
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function create(string $title, string $color): DataResponse {
public function create($title, $color) {
$label = $this->labelService->create($title, $color, $this->request->getParam('boardId'));
return new DataResponse($label, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* @params $title
* @params $color
* Update a specific label
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function update(string $title, string $color): DataResponse {
public function update($title, $color) {
$label = $this->labelService->update($this->request->getParam('labelId'), $title, $color);
return new DataResponse($label, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Delete a specific label
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[CORS]
public function delete(): DataResponse {
public function delete() {
$label = $this->labelService->delete($this->request->getParam('labelId'));
return new DataResponse($label, HTTP::STATUS_OK);
}

View File

@@ -7,10 +7,8 @@
namespace OCA\Deck\Controller;
use OCA\Deck\Db\Label;
use OCA\Deck\Service\LabelService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\IRequest;
class LabelController extends Controller {
@@ -22,18 +20,34 @@ class LabelController extends Controller {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
public function create(string $title, string $color, int $boardId): Label {
/**
* @NoAdminRequired
* @param $title
* @param $color
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
*/
public function create($title, $color, $boardId) {
return $this->labelService->create($title, $color, $boardId);
}
#[NoAdminRequired]
public function update(int $id, string $title, string $color): Label {
/**
* @NoAdminRequired
* @param $id
* @param $title
* @param $color
* @return \OCP\AppFramework\Db\Entity
*/
public function update($id, $title, $color) {
return $this->labelService->update($id, $title, $color);
}
#[NoAdminRequired]
public function delete(int $labelId): Label {
/**
* @NoAdminRequired
* @param $labelId
* @return \OCP\AppFramework\Db\Entity
*/
public function delete($labelId) {
return $this->labelService->delete($labelId);
}
}

View File

@@ -10,7 +10,6 @@ declare(strict_types=1);
namespace OCA\Deck\Controller;
use OCA\Deck\Service\OverviewService;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\IRequest;
@@ -25,7 +24,9 @@ class OverviewApiController extends OCSController {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
/**
* @NoAdminRequired
*/
public function upcomingCards(): DataResponse {
return new DataResponse($this->dashboardService->findUpcomingCards($this->userId));
}

View File

@@ -13,7 +13,6 @@ namespace OCA\Deck\Controller;
use OCA\Deck\Db\Card;
use OCA\Deck\Model\CardDetails;
use OCA\Deck\Service\SearchService;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\IRequest;
@@ -27,7 +26,9 @@ class SearchController extends OCSController {
parent::__construct($appName, $request);
}
#[NoAdminRequired]
/**
* @NoAdminRequired
*/
public function search(string $term, ?int $limit = null, ?int $cursor = null): DataResponse {
$cards = $this->searchService->searchCards($term, $limit, $cursor);
return new DataResponse(array_map(function (Card $card) {

View File

@@ -7,16 +7,14 @@
namespace OCA\Deck\Controller;
use OCA\Deck\Service\BoardService;
use OCA\Deck\Service\StackService;
use OCA\Deck\StatusException;
use OCP\AppFramework\ApiController;
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\IRequest;
use function Sabre\HTTP\parseDate;
use Sabre\HTTP\Util;
/**
* Class StackApiController
@@ -31,21 +29,23 @@ class StackApiController extends ApiController {
$appName,
IRequest $request,
private StackService $stackService,
private BoardService $boardService,
) {
parent::__construct($appName, $request);
}
/**
* Return all the stacks in the specified board.
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Return all of the stacks in the specified board.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function index(): DataResponse {
public function index() {
$since = 0;
$modified = $this->request->getHeader('If-Modified-Since');
if ($modified !== '') {
$date = parseDate($modified);
if ($modified !== null && $modified !== '') {
$date = Util::parseHTTPDate($modified);
if (!$date) {
throw new StatusException('Invalid If-Modified-Since header provided.');
}
@@ -56,12 +56,13 @@ class StackApiController extends ApiController {
}
/**
* Return all the stacks in the specified board.
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Return all of the stacks in the specified board.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function get(): DataResponse {
public function get() {
$stack = $this->stackService->find($this->request->getParam('stackId'));
$response = new DataResponse($stack, HTTP::STATUS_OK);
$response->setETag($stack->getETag());
@@ -69,45 +70,55 @@ class StackApiController extends ApiController {
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* @params $title
* @params $order
*
* Create a stack with the specified title and order.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function create(string $title, int $order): DataResponse {
public function create($title, $order) {
$stack = $this->stackService->create($title, $this->request->getParam('boardId'), $order);
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.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function update(string $title, int $order) {
public function update($title, $order) {
$stack = $this->stackService->update($this->request->getParam('stackId'), $title, $this->request->getParam('boardId'), $order, 0);
return new DataResponse($stack, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* Delete the stack specified by $this->request->getParam('stackId').
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function delete(): DataResponse {
public function delete() {
$stack = $this->stackService->delete($this->request->getParam('stackId'));
return new DataResponse($stack, HTTP::STATUS_OK);
}
/**
* Get the stacks that have been archived.
* @NoAdminRequired
* @CORS
* @NoCSRFRequired
*
* get the stacks that have been archived.
*/
#[NoAdminRequired]
#[CORS]
#[NoCSRFRequired]
public function getArchived(): DataResponse {
public function getArchived() {
$stacks = $this->stackService->findAllArchived($this->request->getParam('boardId'));
return new DataResponse($stacks, HTTP::STATUS_OK);
}

View File

@@ -7,12 +7,10 @@
namespace OCA\Deck\Controller;
use OCA\Deck\Db\Stack;
use OCA\Deck\Service\StackService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\IRequest;
class StackController extends Controller {
@@ -20,54 +18,78 @@ class StackController extends Controller {
string $appName,
IRequest $request,
private StackService $stackService,
private $userId,
) {
parent::__construct($appName, $request);
}
/**
* @return Stack[]
* @NoAdminRequired
* @param $boardId
* @return array
*/
#[NoAdminRequired]
public function index(int $boardId): array {
public function index($boardId) {
return $this->stackService->findAll($boardId);
}
/**
* @return Stack[]
* @NoAdminRequired
* @param $boardId
* @return array
*/
#[NoAdminRequired]
public function archived(int $boardId): array {
public function archived($boardId) {
return $this->stackService->findAllArchived($boardId);
}
#[NoAdminRequired]
public function create(string $title, int $boardId, int $order = 999): Stack {
/**
* @NoAdminRequired
* @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);
}
#[NoAdminRequired]
public function update(int $id, string $title, int $boardId, int $order, ?int $deletedAt = null): Stack {
/**
* @NoAdminRequired
* @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 array<int, Stack>
* @NoAdminRequired
* @param $stackId
* @param $order
* @return array
*/
#[NoAdminRequired]
public function reorder(int $stackId, int $order): array {
return $this->stackService->reorder($stackId, $order);
public function reorder($stackId, $order) {
return $this->stackService->reorder((int)$stackId, (int)$order);
}
#[NoAdminRequired]
public function delete(int $stackId): Stack {
/**
* @NoAdminRequired
* @param $stackId
* @return \OCP\AppFramework\Db\Entity
*/
public function delete($stackId) {
return $this->stackService->delete($stackId);
}
/**
* @return Stack[]
* @NoAdminRequired
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
*/
#[NoAdminRequired]
public function deleted(int $boardId): array {
public function deleted($boardId) {
return $this->stackService->fetchDeleted($boardId);
}
}

View File

@@ -7,20 +7,6 @@
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 {
public const PERMISSION_READ = 0;
public const PERMISSION_EDIT = 1;
@@ -51,13 +37,17 @@ class Acl extends RelationalEntity {
$this->addResolvable('participant');
}
public function getPermission(int $permission): bool {
return match ($permission) {
self::PERMISSION_READ => true,
self::PERMISSION_EDIT => $this->getPermissionEdit(),
self::PERMISSION_SHARE => $this->getPermissionShare(),
self::PERMISSION_MANAGE => $this->getPermissionManage(),
default => false,
};
public function getPermission($permission) {
switch ($permission) {
case self::PERMISSION_READ:
return true;
case self::PERMISSION_EDIT:
return $this->getPermissionEdit();
case self::PERMISSION_SHARE:
return $this->getPermissionShare();
case self::PERMISSION_MANAGE:
return $this->getPermissionManage();
}
return false;
}
}

View File

@@ -19,10 +19,13 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $boardId
* @param int|null $limit
* @param int|null $offset
* @return Acl[]
* @throws \OCP\DB\Exception
*/
public function findAll(int $boardId, ?int $limit = null, ?int $offset = null) {
public function findAll($boardId, $limit = null, $offset = null) {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'board_id', 'type', 'participant', 'permission_edit', 'permission_share', 'permission_manage')
->from('deck_board_acl')
@@ -48,9 +51,12 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $userId
* @param numeric $id
* @return bool
* @throws \OCP\DB\Exception
*/
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $id): bool {
$aclId = $id;
$qb = $this->db->getQueryBuilder();
$qb->select('acl.id')
@@ -62,7 +68,11 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
return count($qb->executeQuery()->fetchAll()) > 0;
}
public function findBoardId(int $id): ?int {
/**
* @param numeric $id
* @return int|null
*/
public function findBoardId($id): ?int {
try {
$entity = $this->find($id);
return $entity->getBoardId();
@@ -77,7 +87,7 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
* @return Acl[]
* @throws \OCP\DB\Exception
*/
public function findByParticipant(int $type, string $participant): array {
public function findByParticipant($type, $participant): array {
$qb = $this->db->getQueryBuilder();
$qb->select('*')

View File

@@ -77,41 +77,26 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
}
public function deleteByParticipantOnBoard(string $participant, int $boardId, $type = Assignment::TYPE_USER) {
// 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
$qb = $this->db->getQueryBuilder();
$cardIdQuery = $this->db->getQueryBuilder();
$cardIdQuery->select('a.card_id')
->from('deck_assigned_users', 'a')
->innerJoin('a', 'deck_cards', 'c', 'c.id = a.card_id')
->innerJoin('c', 'deck_stacks', 's', 's.id = c.stack_id')
->where($cardIdQuery->expr()->eq('a.participant', $cardIdQuery->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
->andWhere($cardIdQuery->expr()->eq('s.board_id', $cardIdQuery->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
->andWhere($cardIdQuery->expr()->eq('a.type', $cardIdQuery->createNamedParameter($type, IQueryBuilder::PARAM_INT)));
$result = $cardIdQuery->executeQuery();
$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();
}
->where($cardIdQuery->expr()->eq('a.participant', $qb->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
->andWhere($cardIdQuery->expr()->eq('s.board_id', $qb->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
->andWhere($cardIdQuery->expr()->eq('a.type', $qb->createNamedParameter($type, IQueryBuilder::PARAM_INT)));
$qb->delete('deck_assigned_users')
->where($qb->expr()->in('card_id', $qb->createFunction($cardIdQuery->getSQL()), IQueryBuilder::PARAM_INT_ARRAY));
$qb->executeStatement();
}
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $id): bool {
return $this->cardMapper->isOwner($userId, $id);
}
public function findBoardId(int $id): ?int {
public function findBoardId($id): ?int {
return $this->cardMapper->findBoardId($id);
}
@@ -123,9 +108,6 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
* @throws NotFoundException
*/
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);
if ($origin === null) {
throw new NotFoundException('No origin found for assignment');
@@ -144,7 +126,7 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
});
}
public function isUserAssigned(int $cardId, string $userId): bool {
public function isUserAssigned($cardId, $userId): bool {
$assignments = $this->findAll($cardId);
foreach ($assignments as $assignment) {
$origin = $this->getOrigin($assignment);

View File

@@ -36,11 +36,13 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param int $id
* @return Attachment
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws \OCP\DB\Exception
*/
public function find(int $id): Attachment {
public function find($id) {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -50,11 +52,14 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param int $cardId
* @param string $data
* @return Attachment
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws \OCP\DB\Exception
*/
public function findByData(int $cardId, string $data): Attachment {
public function findByData($cardId, $data) {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -65,10 +70,11 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param $cardId
* @return Entity[]
* @throws \OCP\DB\Exception
*/
public function findAll(int $cardId): array {
public function findAll($cardId) {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -80,9 +86,11 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @return Attachment[]
* @param null $cardId
* @param bool $withOffset
* @return array
*/
public function findToDelete(?int $cardId = null, bool $withOffset = true): array {
public function findToDelete($cardId = null, $withOffset = true) {
// add buffer of 5 min
$timeLimit = time() - (60 * 5);
$qb = $this->db->getQueryBuilder();
@@ -104,8 +112,12 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
/**
* Check if $userId is owner of Entity with $id
*
* @param $userId string userId
* @param $id int|string unique entity identifier
* @return boolean
*/
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $id): bool {
try {
$attachment = $this->find($id);
return $this->cardMapper->isOwner($userId, $attachment->getCardId());
@@ -118,10 +130,10 @@ class AttachmentMapper extends DeckMapper implements IPermissionMapper {
/**
* Query boardId for Entity of given $id
*
* @param $id int unique entity identifier
* @param $id int|string unique entity identifier
* @return int|null id of Board
*/
public function findBoardId(int $id): ?int {
public function findBoardId($id): ?int {
try {
$attachment = $this->find($id);
} catch (\Exception $e) {

View File

@@ -10,20 +10,10 @@ namespace OCA\Deck\Db;
/**
* @method int getId()
* @method string getTitle()
* @method void setTitle(string $title)
* @method int getShared()
* @method void setShared(int $shared)
* @method bool isArchived()
* @method bool getArchived()
* @method void setArchived(bool $archived)
* @method int getDeletedAt()
* @method void setDeletedAt(int $deletedAt)
* @method int getLastModified()
* @method void setLastModified(int $lastModified)
* @method string getOwner()
* @method void setOwner(string $owner)
* @method string getColor()
* @method void setColor(string $color)
*/
class Board extends RelationalEntity {
protected $title;

View File

@@ -469,16 +469,16 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
return parent::delete($entity);
}
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $id): bool {
$board = $this->find($id);
return ($board->getOwner() === $userId);
}
public function findBoardId(int $id): ?int {
public function findBoardId($id): ?int {
return $id;
}
public function mapAcl(Acl &$acl): void {
public function mapAcl(Acl &$acl) {
$acl->resolveRelation('participant', function ($participant) use (&$acl) {
if ($acl->getType() === Acl::PERMISSION_TYPE_USER) {
if ($this->userManager->userExists($acl->getParticipant())) {

View File

@@ -15,18 +15,13 @@ use Sabre\VObject\Component\VCalendar;
/**
* @method string getTitle()
* @method void setTitle(string $title)
* @method string getDescription()
* @method string getDescriptionPrev()
* @method int getStackId()
* @method void setStackId(int $stackId)
* @method int getOrder()
* @method void setOrder(int $order)
* @method int getLastModified()
* @method int getCreatedAt()
* @method bool getArchived()
* @method string getType()
* @method void setType(string $type)
* @method int getDeletedAt()
* @method void setDeletedAt(int $deletedAt)
* @method bool getNotified()
@@ -73,8 +68,8 @@ class Card extends RelationalEntity {
protected $createdAt;
protected $labels;
protected $assignedUsers;
protected array $attachments = [];
protected int $attachmentCount = 0;
protected $attachments;
protected $attachmentCount;
protected $owner;
protected $order;
protected $archived = false;

View File

@@ -86,15 +86,16 @@ class CardMapper extends QBMapper implements IPermissionMapper {
$updatedFields = $entity->getUpdatedFields();
if (isset($updatedFields['duedate']) && $updatedFields['duedate']) {
try {
/** @var Card $existing */
$existing = $this->find($entity->getId());
if ($entity->getDueDate() !== $existing->getDueDate()) {
if ($existing && $entity->getDuedate() !== $existing->getDuedate()) {
$entity->setNotified(false);
}
// remove pending notifications
$notification = $this->notificationManager->createNotification();
$notification
->setApp('deck')
->setObject('card', (string)$entity->getId());
->setObject('card', $entity->getId());
$this->notificationManager->markProcessed($notification);
} catch (Exception $e) {
}
@@ -130,11 +131,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $card;
}
/**
* @return Card[]
* @throws \OCP\DB\Exception
*/
public function findAll($stackId, ?int $limit = null, int $offset = 0, int $since = -1) {
public function findAll($stackId, $limit = null, $offset = null, $since = -1) {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from('deck_cards')
@@ -149,32 +146,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @param int[] $stackIds
* @return array<int, null|Card[]>
* @throws \OCP\DB\Exception
*/
public function findAllForStacks(array $stackIds, ?int $limit = null, int $offset = 0, int $since = -1): array {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from('deck_cards')
->where($qb->expr()->in('stack_id', $qb->createNamedParameter($stackIds, IQueryBuilder::PARAM_INT_ARRAY)))
->andWhere($qb->expr()->eq('archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
->andWhere($qb->expr()->eq('deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->gt('last_modified', $qb->createNamedParameter($since, IQueryBuilder::PARAM_INT)))
->setMaxResults($limit)
->setFirstResult($offset)
->orderBy('order')
->addOrderBy('id');
$rawCards = $this->findEntities($qb);
$cards = array_fill_keys($stackIds, null);
foreach ($rawCards as $card) {
$cards[$card->getStackId()][] = $card;
}
return $cards;
}
public function queryCardsByBoard(int $boardId): IQueryBuilder {
$qb = $this->db->getQueryBuilder();
$qb->select('c.*')
@@ -193,10 +164,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $qb;
}
/**
* @return Card[]
*/
public function findToDelete(int $timeLimit, ?int $limit = null): array {
public function findToDelete($timeLimit, $limit = null) {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'title', 'owner', 'archived', 'deleted_at', 'last_modified')
->from('deck_cards')
@@ -207,10 +175,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @return Card[]
*/
public function findDeleted(int $boardId, ?int $limit = null, int $offset = 0): array {
public function findDeleted($boardId, $limit = null, $offset = null) {
$qb = $this->queryCardsByBoard($boardId);
$qb->andWhere($qb->expr()->neq('c.deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
->setMaxResults($limit)
@@ -220,10 +185,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @return Card[]
*/
public function findCalendarEntries(int $boardId, ?int $limit = null, $offset = 0): array {
public function findCalendarEntries($boardId, $limit = null, $offset = null) {
$qb = $this->db->getQueryBuilder();
$qb->select('c.*')
->from('deck_cards', 'c')
@@ -278,11 +240,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @param int[] $boardIds
* @return Card[]
*/
public function findAllWithDue(array $boardIds): array {
public function findAllWithDue(array $boardIds) {
$qb = $this->db->getQueryBuilder();
$qb->select('c.*')
->from('deck_cards', 'c')
@@ -299,11 +257,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @param int[] $boardIds
* @return Card[]
*/
public function findToMeOrNotAssignedCards(array $boardIds, string $username): array {
public function findToMeOrNotAssignedCards(array $boardIds, string $username) {
$qb = $this->db->getQueryBuilder();
$qb->select('c.*')
->from('deck_cards', 'c')
@@ -325,10 +279,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @return Card[]
*/
public function findOverdue(): array {
public function findOverdue() {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'title', 'duedate', 'notified')
->from('deck_cards')
@@ -340,9 +291,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @return Card[]
*/
public function findUnexposedDescriptionChances() {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description')
@@ -351,9 +299,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
/**
* @return Card[]
*/
public function search(array $boardIds, SearchQuery $query, ?int $limit = null, ?int $offset = null): array {
$qb = $this->queryCardsByBoards($boardIds);
$this->extendQueryByFilter($qb, $query);
@@ -388,7 +333,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
$qb->andWhere($qb->expr()->lt('c.last_modified', $qb->createNamedParameter($offset, IQueryBuilder::PARAM_INT)));
}
$result = $qb->executeQuery();
$result = $qb->execute();
$entities = [];
while ($row = $result->fetch()) {
$entities[] = Card::fromRow($row);
@@ -431,7 +376,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
$qb->andWhere($qb->expr()->lt('comments.id', $qb->createNamedParameter($offset, IQueryBuilder::PARAM_INT)));
}
$result = $qb->executeQuery();
$result = $qb->execute();
$entities = $result->fetchAll();
$result->closeCursor();
return $entities;
@@ -527,7 +472,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
});
$groups = $this->groupManager->search($assignment->getValue());
foreach ($searchUsers as $user) {
$groups = array_merge($groups, $this->groupManager->getUserGroups($user));
$groups = array_merge($groups, $this->groupManager->getUserIdGroups($user->getUID()));
}
$assignmentSearches = [];
@@ -580,7 +525,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
if ($offset !== null) {
$qb->setFirstResult($offset);
}
$result = $qb->executeQuery();
$result = $qb->execute();
$all = $result->fetchAll();
$result->closeCursor();
return $all;
@@ -592,32 +537,32 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return parent::delete($entity);
}
public function deleteByStack($stackId): void {
public function deleteByStack($stackId) {
$cards = $this->findAllByStack($stackId);
foreach ($cards as $card) {
$this->delete($card);
}
}
public function assignLabel(int $card, int $label): void {
public function assignLabel($card, $label) {
$qb = $this->db->getQueryBuilder();
$qb->insert('deck_assigned_labels')
->values([
'label_id' => $qb->createNamedParameter($label, IQueryBuilder::PARAM_INT),
'card_id' => $qb->createNamedParameter($card, IQueryBuilder::PARAM_INT),
]);
$qb->executeStatement();
$qb->execute();
}
public function removeLabel(int $card, int $label): void {
public function removeLabel($card, $label) {
$qb = $this->db->getQueryBuilder();
$qb->delete('deck_assigned_labels')
->where($qb->expr()->eq('card_id', $qb->createNamedParameter($card, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->eq('label_id', $qb->createNamedParameter($label, IQueryBuilder::PARAM_INT)));
$qb->executeStatement();
$qb->execute();
}
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $id): bool {
$qb = $this->db->getQueryBuilder();
$qb->select('c.id')
->from($this->getTableName(), 'c')
@@ -629,7 +574,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return count($qb->executeQuery()->fetchAll()) > 0;
}
public function findBoardId(int $id): ?int {
public function findBoardId($id): ?int {
$result = $this->cache->get('findBoardId:' . $id);
if ($result === null) {
try {
@@ -659,11 +604,13 @@ class CardMapper extends QBMapper implements IPermissionMapper {
}
public function transferOwnership(string $ownerId, string $newOwnerId, ?int $boardId = null): void {
$qb = $this->db->getQueryBuilder();
$qb->update($this->getTableName())
->set('owner', $qb->createNamedParameter($newOwnerId, IQueryBuilder::PARAM_STR))
->where('owner', $qb->createNamedParameter($ownerId, IQueryBuilder::PARAM_STR))
->executeStatement();
$params = [
'owner' => $ownerId,
'newOwner' => $newOwnerId
];
$sql = "UPDATE `*PREFIX*{$this->tableName}` SET `owner` = :newOwner WHERE `owner` = :owner";
$stmt = $this->db->executeQuery($sql, $params);
$stmt->closeCursor();
}
public function remapCardOwner(int $boardId, string $userId, string $newUserId): void {

View File

@@ -19,11 +19,12 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
abstract class DeckMapper extends QBMapper {
/**
* @param $id
* @return T
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws \OCP\AppFramework\Db\DoesNotExistException
*/
public function find(int $id): Entity {
public function find($id) {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -36,7 +37,7 @@ abstract class DeckMapper extends QBMapper {
* Helper function to split passed array into chunks of 1000 elements and
* call a given callback for fetching query results
*
* Can be useful to limit to 1000 results per query for oracle compatibility
* Can be useful to limit to 1000 results per query for oracle compatiblity
* but still iterate over all results
*/
public function chunkQuery(array $ids, callable $callback): Generator {

View File

@@ -8,25 +8,22 @@
namespace OCA\Deck\Db;
/**
*
*/
interface IPermissionMapper {
/**
* Check if $userId is owner of Entity with $id
*
* @param $userId string userId
* @param $id int unique entity identifier
* @param $id int|string unique entity identifier
* @return boolean
*/
public function isOwner(string $userId, int $id): bool;
public function isOwner($userId, $id): bool;
/**
* Query boardId for Entity of given $id
*
* @param $id int unique entity identifier
* @return ?int id of Board
* @param $id int|string unique entity identifier
* @return int|null id of Board
*/
public function findBoardId(int $id): ?int;
public function findBoardId($id): ?int;
}

View File

@@ -8,16 +8,7 @@
namespace OCA\Deck\Db;
/**
* @method string getTitle()
* @method void setTitle(string $title)
* @method string getColor()
* @method void setColor(string $color)
* @method int getBoardId()
* @method void setBoardId(int $boardId)
* @method int getCardId()
* @method void setCardId(int $cardId)
* @method int getLastModified()
* @method void setLastModified(int $lastModified)
* @method getTitle(): string
*/
class Label extends RelationalEntity {
protected $title;
@@ -33,7 +24,7 @@ class Label extends RelationalEntity {
$this->addType('lastModified', 'integer');
}
public function getETag(): string {
public function getETag() {
return md5((string)$this->getLastModified());
}
}

View File

@@ -20,10 +20,13 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $boardId
* @param int|null $limit
* @param int|null $offset
* @return Label[]
* @throws \OCP\DB\Exception
*/
public function findAll(int $boardId, ?int $limit = null, int $offset = 0): array {
public function findAll($boardId, $limit = null, $offset = null): array {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -41,10 +44,13 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $cardId
* @param int|null $limit
* @param int|null $offset
* @return Label[]
* @throws \OCP\DB\Exception
*/
public function findAssignedLabelsForCard(int $cardId, ?int $limit = null, int $offset = 0): array {
public function findAssignedLabelsForCard($cardId, $limit = null, $offset = null): array {
$qb = $this->db->getQueryBuilder();
$qb->select('l.*', 'card_id')
->from($this->getTableName(), 'l')
@@ -57,7 +63,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
return $this->findEntities($qb);
}
public function findAssignedLabelsForCards(array $cardIds, ?int $limit = null, int $offset = 0): array {
public function findAssignedLabelsForCards($cardIds, $limit = null, $offset = null): array {
$qb = $this->db->getQueryBuilder();
$qb->select('l.*', 'card_id')
->from($this->getTableName(), 'l')
@@ -71,10 +77,13 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $boardId
* @param int|null $limit
* @param int|null $offset
* @return Label[]
* @throws \OCP\DB\Exception
*/
public function findAssignedLabelsForBoard(int $boardId, ?int $limit = null, int $offset = 0): array {
public function findAssignedLabelsForBoard($boardId, $limit = null, $offset = null): array {
$qb = $this->db->getQueryBuilder();
$qb->select('l.id as id', 'l.title as title', 'l.color as color')
->selectAlias('c.id', 'card_id')
@@ -104,10 +113,11 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @return array<int, list<Label>>
* @param numeric $boardId
* @return array
* @throws \OCP\DB\Exception
*/
public function getAssignedLabelsForBoard(int $boardId): array {
public function getAssignedLabelsForBoard($boardId) {
$labels = $this->findAssignedLabelsForBoard($boardId);
$result = [];
foreach ($labels as $label) {
@@ -120,9 +130,11 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $labelId
* @return void
* @throws \OCP\DB\Exception
*/
public function deleteLabelAssignments(int $labelId): void {
public function deleteLabelAssignments($labelId) {
$qb = $this->db->getQueryBuilder();
$qb->delete('deck_assigned_labels')
->where($qb->expr()->eq('label_id', $qb->createNamedParameter($labelId, IQueryBuilder::PARAM_INT)));
@@ -130,9 +142,11 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $cardId
* @return void
* @throws \OCP\DB\Exception
*/
public function deleteLabelAssignmentsForCard(int $cardId): void {
public function deleteLabelAssignmentsForCard($cardId) {
$qb = $this->db->getQueryBuilder();
$qb->delete('deck_assigned_labels')
->where($qb->expr()->eq('card_id', $qb->createNamedParameter($cardId, IQueryBuilder::PARAM_INT)));
@@ -140,25 +154,33 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param string $userId
* @param numeric $labelId
* @return bool
* @throws \OCP\DB\Exception
*/
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $labelId): bool {
$qb = $this->db->getQueryBuilder();
$qb->select('l.id')
->from($this->getTableName(), 'l')
->innerJoin('l', 'deck_boards', 'b', 'l.board_id = b.id')
->where($qb->expr()->eq('l.id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)))
->where($qb->expr()->eq('l.id', $qb->createNamedParameter($labelId, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->eq('b.owner', $qb->createNamedParameter($userId, IQueryBuilder::PARAM_STR)));
return count($qb->executeQuery()->fetchAll()) > 0;
}
public function findBoardId(int $id): ?int {
/**
* @param numeric $id
* @return int|null
*/
public function findBoardId($id): ?int {
try {
$entity = $this->find($id);
return $entity->getBoardId();
} catch (DoesNotExistException|MultipleObjectsReturnedException) {
return null;
} catch (DoesNotExistException $e) {
} catch (MultipleObjectsReturnedException $e) {
}
return null;
}
}

View File

@@ -11,17 +11,10 @@ use Sabre\VObject\Component\VCalendar;
/**
* @method int getId()
* @method string getTitle()
* @method void setTitle(string $title)
* @method int getBoardId()
* @method void setBoardId(int $boardId)
* @method int getDeletedAt()
* @method void setDeletedAt(int $deletedAt)
* @method int getLastModified()
* @method void setLastModified(int $lastModified)
* @method \int getOrder()
* @method void setOrder(int $order)
* @method Card[] getCards()
* @method int getOrder()
*/
class Stack extends RelationalEntity {
protected $title;

View File

@@ -35,11 +35,13 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
/**
* @param numeric $id
* @return Stack
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws \OCP\DB\Exception
*/
public function find(int $id): Stack {
public function find($id): Stack {
if (isset($this->stackCache[(string)$id])) {
return $this->stackCache[(string)$id];
}
@@ -54,9 +56,11 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param $cardId
* @return Stack|null
* @throws \OCP\DB\Exception
*/
public function findStackFromCardId(int $cardId): ?Stack {
public function findStackFromCardId($cardId): ?Stack {
$qb = $this->db->getQueryBuilder();
$qb->select('s.*')
->from($this->getTableName(), 's')
@@ -72,10 +76,13 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $boardId
* @param int|null $limit
* @param int|null $offset
* @return Stack[]
* @throws \OCP\DB\Exception
*/
public function findAll(int $boardId, ?int $limit = null, int $offset = 0): array {
public function findAll($boardId, $limit = null, $offset = null): array {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -88,9 +95,13 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $boardId
* @param int|null $limit
* @param int|null $offset
* @return Stack[]
* @throws \OCP\DB\Exception
*/
public function findDeleted(int $boardId, ?int $limit = null, int $offset = 0): array {
public function findDeleted($boardId, $limit = null, $offset = null) {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from($this->getTableName())
@@ -116,9 +127,12 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $userId
* @param numeric $stackId
* @return bool
* @throws \OCP\DB\Exception
*/
public function isOwner(string $userId, int $id): bool {
public function isOwner($userId, $id): bool {
$qb = $this->db->getQueryBuilder();
$qb->select('s.id')
->from($this->getTableName(), 's')
@@ -130,9 +144,11 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
}
/**
* @param numeric $id
* @return int|null
* @throws \OCP\DB\Exception
*/
public function findBoardId(int $id): ?int {
public function findBoardId($id): ?int {
$result = $this->cache->get('findBoardId:' . $id);
if ($result !== null) {
return $result !== false ? $result : null;
@@ -149,10 +165,6 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
return $result !== false ? $result : null;
}
/**
* @return array<Stack>
* @throws \OCP\DB\Exception
*/
public function findToDelete(): array {
// add buffer of 5 min
$timeLimit = time() - (60 * 5);

View File

@@ -35,10 +35,6 @@ class BeforeTemplateRenderedListener implements IEventListener {
Util::addStyle('deck', 'deck');
$pathInfo = $this->request->getPathInfo();
if (!$pathInfo) {
return;
}
if (str_starts_with($pathInfo, '/apps/calendar')) {
Util::addScript('deck', 'deck-calendar');
}

View File

@@ -18,10 +18,14 @@ use OCP\EventDispatcher\IEventListener;
/** @template-implements IEventListener<Event|AclDeletedEvent|AclCreatedEvent> */
class ResourceListener implements IEventListener {
public function __construct(
private readonly IManager $resourceManager,
private readonly ResourceProviderCard $resourceProviderCard,
) {
/** @var IManager */
private $resourceManager;
/** @var ResourceProviderCard */
private $resourceProviderCard;
public function __construct(IManager $resourceManager, ResourceProviderCard $resourceProviderCard) {
$this->resourceManager = $resourceManager;
$this->resourceProviderCard = $resourceProviderCard;
}
public function handle(Event $event): void {
@@ -34,10 +38,10 @@ class ResourceListener implements IEventListener {
$this->resourceManager->invalidateAccessCacheForProvider($this->resourceProviderCard);
try {
$resource = $this->resourceManager->getResourceForUser(ResourceProvider::RESOURCE_TYPE, (string)$boardId, null);
$resource = $this->resourceManager->getResourceForUser(ResourceProvider::RESOURCE_TYPE, $boardId, null);
$this->resourceManager->invalidateAccessCacheForResource($resource);
} catch (ResourceException $e) {
// If there is no resource we don't need to invalidate anything, but this should not happen anyway
// If there is no resource we don't need to invalidate anything, but this should not happen anyways
}
}
}

View File

@@ -27,7 +27,7 @@ class DefaultBoardMiddleware extends Middleware {
public function beforeController($controller, $methodName) {
try {
if ($this->userId !== null && $this->defaultBoardService->checkFirstRun($this->userId) && $this->permissionService->canCreate()) {
$this->defaultBoardService->createDefaultBoard($this->l10n->t('Welcome to Nextcloud Deck!'), $this->userId, 'bf678b');
$this->defaultBoardService->createDefaultBoard($this->l10n->t('Personal'), $this->userId, '0087C5');
}
} catch (\Throwable $e) {
$this->logger->error('Could not create default board', ['exception' => $e]);

View File

@@ -1,78 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Deck\Migration;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
class LabelMismatchCleanup implements IRepairStep {
public function __construct(
private IDBConnection $db,
) {
}
public function getName() {
return 'Migrate labels with wrong board mapping';
}
public function run(IOutput $output) {
// Find assingments where a label of another (wrong) board is used
$qb = $this->db->getQueryBuilder();
$qb->select('al.id', 'al.label_id', 'al.card_id', 's.board_id as actual_board_id', 'l.board_id as wrong_id', 'l.color', 'l.title')
->from('deck_assigned_labels', 'al')
->innerJoin('al', 'deck_cards', 'c', 'c.id = al.card_id')
->innerJoin('c', 'deck_stacks', 's', 'c.stack_id = s.id')
->innerJoin('al', 'deck_labels', 'l', 'l.id = al.label_id')
->where($qb->expr()->neq('l.board_id', 's.board_id'));
$labels = $qb->executeQUery()->fetchAll();
if (count($labels) === 0) {
return;
}
$output->info('Found ' . count($labels) . ' labels with wrong board mapping');
foreach ($labels as $label) {
// Select existing label on the correct board
$qb = $this->db->getQueryBuilder();
$qb->select('id')
->from('deck_labels')
->where($qb->expr()->eq('title', $qb->createNamedParameter($label['title'])))
->andWhere($qb->expr()->eq('color', $qb->createNamedParameter($label['color'])))
->andWhere($qb->expr()->eq('board_id', $qb->createNamedParameter($label['actual_board_id'])));
$result = $qb->executeQuery();
$newLabel = $result->fetchOne();
$result->closeCursor();
if (!$newLabel) {
// Create a new label with the same title and color on the correct board
$qb = $this->db->getQueryBuilder();
$qb->insert('deck_labels')
->values([
'title' => $qb->createNamedParameter($label['title']),
'color' => $qb->createNamedParameter($label['color']),
'board_id' => $qb->createNamedParameter($label['actual_board_id']),
]);
$qb->executeStatement();
$newLabel = $qb->getLastInsertId();
$output->debug('Created new label ' . $label['title'] . ' on board ' . $label['actual_board_id']);
} else {
$output->debug('Found existing label ' . $label['title'] . ' on board ' . $label['actual_board_id']);
}
// Update the assignment to use the new label
$qb = $this->db->getQueryBuilder();
$qb->update('deck_assigned_labels')
->set('label_id', $qb->createNamedParameter($newLabel))
->where($qb->expr()->eq('id', $qb->createNamedParameter($label['id'])));
$qb->executeStatement();
$output->debug('Updated label assignment ' . $label['id'] . ' to use label ' . $newLabel);
}
}
}

View File

@@ -11,7 +11,6 @@ use OCA\Deck\Db\Board;
class BoardSummary extends Board {
private Board $board;
/** @psalm-suppress ConstructorSignatureMismatch */
public function __construct(Board $board) {
parent::__construct();
$this->board = $board;
@@ -28,7 +27,7 @@ class BoardSummary extends Board {
return $this->board->getter($name);
}
public function __call($methodName, $args) {
return $this->board->__call($methodName, $args);
public function __call($name, $arguments) {
return $this->board->__call($name, $arguments);
}
}

View File

@@ -15,7 +15,6 @@ class CardDetails extends Card {
private ?Board $board;
private ?Reference $referenceData = null;
/** @psalm-suppress ConstructorSignatureMismatch */
public function __construct(Card $card, ?Board $board = null) {
parent::__construct();
$this->card = $card;

View File

@@ -95,7 +95,7 @@ class NotificationHelper {
$shouldNotify = $notificationSetting === ConfigService::SETTING_BOARD_NOTIFICATION_DUE_ALL;
if ($user->getUID() === $board->getOwner() && count($board->getAcl() ?? []) === 0) {
if ($user->getUID() === $board->getOwner() && count($board->getAcl()) === 0) {
// Notify if all or assigned is configured for unshared boards
$shouldNotify = true;
} elseif ($notificationSetting === ConfigService::SETTING_BOARD_NOTIFICATION_DUE_ASSIGNED && $this->assignmentMapper->isUserAssigned($card->getId(), $user->getUID())) {

View File

@@ -64,7 +64,6 @@ class BoardReferenceProvider implements IReferenceProvider {
$reference = new Reference($referenceText);
$reference->setTitle($this->l10n->t('Deck board') . ': ' . $board['title']);
$ownerDisplayName = $board['owner']['displayname'] ?? $board['owner']['uid'] ?? '???';
// TRANSLATORS Owned by {boardOwnerName}
$reference->setDescription($this->l10n->t('Owned by %1$s', [$ownerDisplayName]));
$imageUrl = $this->urlGenerator->getAbsoluteURL(
$this->urlGenerator->imagePath(Application::APP_ID, 'deck-dark.svg')

View File

@@ -90,7 +90,6 @@ class CommentReferenceProvider implements IReferenceProvider {
$reference->setTitle($comment['message']);
$boardOwnerDisplayName = $board['owner']['displayname'] ?? $board['owner']['uid'] ?? '???';
$reference->setDescription(
// TRANSLATORS From {userName}, in {boardTitle}/{stackTitle}, owned by {boardOwnerName}
$this->l10n->t('From %1$s, in %2$s/%3$s, owned by %4$s', [
$comment['actorDisplayName'],
$board['title'],

View File

@@ -21,6 +21,7 @@ use OCA\Deck\NotFoundException;
use OCA\Deck\Notification\NotificationHelper;
use OCA\Deck\Validators\AssignmentServiceValidator;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\Entity;
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\EventDispatcher\IEventDispatcher;
@@ -91,12 +92,15 @@ class AssignmentService {
}
/**
* @param $cardId
* @param $userId
* @return bool|null|Entity
* @throws BadRequestException
* @throws NoPermissionException
* @throws MultipleObjectsReturnedException
* @throws DoesNotExistException
*/
public function assignUser(int $cardId, string $userId, int $type = Assignment::TYPE_USER): Assignment {
public function assignUser($cardId, $userId, int $type = Assignment::TYPE_USER) {
$this->assignmentServiceValidator->check(compact('cardId', 'userId'));
if ($type !== Assignment::TYPE_USER && $type !== Assignment::TYPE_GROUP) {
@@ -140,13 +144,16 @@ class AssignmentService {
}
/**
* @param $cardId
* @param $userId
* @return Entity
* @throws BadRequestException
* @throws NotFoundException
* @throws NoPermissionException
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*/
public function unassignUser(int $cardId, string $userId, int $type = 0): Assignment {
public function unassignUser($cardId, $userId, $type = 0) {
$this->assignmentServiceValidator->check(compact('cardId', 'userId'));
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);

View File

@@ -25,7 +25,6 @@ use OCP\AppFramework\Db\IMapperException;
use OCP\AppFramework\Http\Response;
use OCP\IL10N;
use OCP\IUserManager;
use Psr\Container\ContainerExceptionInterface;
class AttachmentService {
private $attachmentMapper;
@@ -81,16 +80,20 @@ class AttachmentService {
}
/**
* @throws ContainerExceptionInterface
* @param string $type
* @param string $class
* @throws \OCP\AppFramework\QueryException
*/
public function registerAttachmentService(string $type, string $class): void {
$this->services[$type] = $this->application->getContainer()->get($class);
public function registerAttachmentService($type, $class) {
$this->services[$type] = $this->application->getContainer()->query($class);
}
/**
* @param string $type
* @return IAttachmentService
* @throws InvalidAttachmentType
*/
public function getService(string $type): IAttachmentService {
public function getService($type) {
if (isset($this->services[$type])) {
return $this->services[$type];
}
@@ -98,11 +101,16 @@ class AttachmentService {
}
/**
* @return Attachment[]
* @param $cardId
* @return array
* @throws \OCA\Deck\NoPermissionException
* @throws BadRequestException
*/
public function findAll(int $cardId, bool $withDeleted = false): array {
public function findAll($cardId, $withDeleted = false) {
if (is_numeric($cardId) === false) {
throw new BadRequestException('card id must be a number');
}
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
$attachments = $this->attachmentMapper->findAll($cardId);
@@ -114,7 +122,7 @@ class AttachmentService {
/** @var IAttachmentService $service */
$service = $this->getService($attachmentType);
if ($service instanceof ICustomAttachmentService) {
$attachments = array_merge($attachments, $service->listAttachments($cardId));
$attachments = array_merge($attachments, $service->listAttachments((int)$cardId));
}
}
@@ -132,40 +140,49 @@ class AttachmentService {
}
/**
* @param $cardId
* @return int|mixed
* @throws BadRequestException
* @throws InvalidAttachmentType
* @throws \OCP\DB\Exception
*/
public function count(int $cardId): int {
$count = $this->attachmentCacheHelper->getAttachmentCount($cardId);
public function count($cardId) {
if (is_numeric($cardId) === false) {
throw new BadRequestException('card id must be a number');
}
$count = $this->attachmentCacheHelper->getAttachmentCount((int)$cardId);
if ($count === null) {
$count = count($this->attachmentMapper->findAll($cardId));
foreach (array_keys($this->services) as $attachmentType) {
$service = $this->getService($attachmentType);
if ($service instanceof ICustomAttachmentService) {
$count += $service->getAttachmentCount($cardId);
$count += $service->getAttachmentCount((int)$cardId);
}
}
$this->attachmentCacheHelper->setAttachmentCount($cardId, $count);
$this->attachmentCacheHelper->setAttachmentCount((int)$cardId, $count);
}
return $count;
}
/**
* @param $cardId
* @param $type
* @param $data
* @return Attachment|\OCP\AppFramework\Db\Entity
* @throws NoPermissionException
* @throws StatusException
* @throws BadRequestException
*/
public function create(int $cardId, string $type, string $data) {
public function create($cardId, $type, $data) {
$this->attachmentServiceValidator->check(compact('cardId', 'type'));
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);
$this->attachmentCacheHelper->clearAttachmentCount($cardId);
$this->attachmentCacheHelper->clearAttachmentCount((int)$cardId);
$attachment = new Attachment();
$attachment->setCardId($cardId);
$attachment->setType($type);
@@ -201,10 +218,12 @@ class AttachmentService {
/**
* Display the attachment
*
* @param $attachmentId
* @return Response
* @throws NoPermissionException
* @throws NotFoundException
*/
public function display(int $cardId, int $attachmentId, string $type = 'deck_file'): Response {
public function display($cardId, $attachmentId, $type = 'deck_file') {
try {
$service = $this->getService($type);
} catch (InvalidAttachmentType $e) {
@@ -238,10 +257,13 @@ class AttachmentService {
/**
* Update an attachment with custom data
*
* @param $attachmentId
* @param $data
* @return mixed
* @throws BadRequestException
* @throws NoPermissionException
*/
public function update(int $cardId, int $attachmentId, string $data, string $type = 'deck_file'): Attachment {
public function update($cardId, $attachmentId, $data, $type = 'deck_file') {
$this->attachmentServiceValidator->check(compact('cardId', 'type', 'data'));
try {
@@ -362,6 +384,8 @@ class AttachmentService {
}
/**
* @param Attachment $attachment
* @return Attachment
* @throws \ReflectionException
*/
private function addCreator(Attachment $attachment): Attachment {

View File

@@ -75,6 +75,8 @@ class BoardService {
/**
* Set a different user than the current one, e.g. when no user is available in occ
*
* @param string $userId
*/
public function setUserId(string $userId): void {
$this->userId = $userId;
@@ -115,18 +117,22 @@ class BoardService {
}
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
/** @var Board $board */
$board = $this->boardMapper->find($boardId, true, true, $allowDeleted);
[$board] = $this->enrichBoards([$board], $fullDetails);
return $board;
}
/**
* @param $mapper
* @param $id
* @return bool
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function isArchived($mapper, int $id): bool {
public function isArchived($mapper, $id) {
$this->boardServiceValidator->check(compact('id'));
try {
@@ -145,12 +151,15 @@ class BoardService {
}
/**
* @param $mapper
* @param $id
* @return bool
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function isDeleted($mapper, int $id): bool {
public function isDeleted($mapper, $id) {
$this->boardServiceValidator->check(compact('mapper', 'id'));
try {
@@ -170,9 +179,13 @@ class BoardService {
/**
* @param $title
* @param $userId
* @param $color
* @return \OCP\AppFramework\Db\Entity
* @throws BadRequestException
*/
public function create(string $title, string $userId, string $color): Board {
public function create($title, $userId, $color) {
$this->boardServiceValidator->check(compact('title', 'userId', 'color'));
if (!$this->permissionService->canCreate()) {
@@ -183,8 +196,7 @@ class BoardService {
$board->setTitle($title);
$board->setOwner($userId);
$board->setColor($color);
/** @var Board $board */
$board = $this->boardMapper->insert($board);
$new_board = $this->boardMapper->insert($board);
// create new labels
$default_labels = [
@@ -198,31 +210,33 @@ class BoardService {
$label = new Label();
$label->setColor($labelColor);
$label->setTitle($labelTitle);
$label->setBoardId($board->getId());
$label->setBoardId($new_board->getId());
$labels[] = $this->labelMapper->insert($label);
}
$board->setLabels($labels);
$this->boardMapper->mapOwner($board);
$permissions = $this->permissionService->matchPermissions($board);
$board->setPermissions([
$new_board->setLabels($labels);
$this->boardMapper->mapOwner($new_board);
$permissions = $this->permissionService->matchPermissions($new_board);
$new_board->setPermissions([
'PERMISSION_READ' => $permissions[Acl::PERMISSION_READ] ?? false,
'PERMISSION_EDIT' => $permissions[Acl::PERMISSION_EDIT] ?? false,
'PERMISSION_MANAGE' => $permissions[Acl::PERMISSION_MANAGE] ?? false,
'PERMISSION_SHARE' => $permissions[Acl::PERMISSION_SHARE] ?? false
]);
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_BOARD, $board, ActivityManager::SUBJECT_BOARD_CREATE, [], $userId);
$this->changeHelper->boardChanged($board->getId());
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_BOARD, $new_board, ActivityManager::SUBJECT_BOARD_CREATE, [], $userId);
$this->changeHelper->boardChanged($new_board->getId());
return $board;
return $new_board;
}
/**
* @param $id
* @return Board
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function delete(int $id): Board {
public function delete($id) {
$this->boardServiceValidator->check(compact('id'));
$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_MANAGE);
@@ -239,11 +253,13 @@ class BoardService {
}
/**
* @param $id
* @return \OCP\AppFramework\Db\Entity
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
*/
public function deleteUndo(int $id): Board {
public function deleteUndo($id) {
$this->boardServiceValidator->check(compact('id'));
$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_MANAGE);
@@ -257,12 +273,14 @@ class BoardService {
}
/**
* @param $id
* @return \OCP\AppFramework\Db\Entity
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function deleteForce(int $id): Board {
public function deleteForce($id) {
$this->boardServiceValidator->check(compact('id'));
$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_MANAGE);
@@ -273,12 +291,17 @@ class BoardService {
}
/**
* @param $id
* @param $title
* @param $color
* @param $archived
* @return \OCP\AppFramework\Db\Entity
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function update(int $id, string $title, string $color, bool $archived): Board {
public function update($id, $title, $color, $archived) {
$this->boardServiceValidator->check(compact('id', 'title', 'color', 'archived'));
$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_MANAGE);
@@ -297,7 +320,7 @@ class BoardService {
return $board;
}
private function applyPermissions(int $boardId, bool $edit, bool $share, bool $manage, ?Acl $oldAcl = null): array {
private function applyPermissions($boardId, $edit, $share, $manage, $oldAcl = null) {
try {
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_MANAGE);
} catch (NoPermissionException $e) {
@@ -309,7 +332,7 @@ class BoardService {
return [$edit, $share, $manage];
}
public function enrichWithBoardSettings(Board $board): void {
public function enrichWithBoardSettings(Board $board) {
$globalCalendarConfig = (bool)$this->config->getUserValue($this->userId, Application::APP_ID, 'calendar', true);
$settings = [
'notify-due' => $this->config->getUserValue($this->userId, Application::APP_ID, 'board:' . $board->getId() . ':notify-due', ConfigService::SETTING_BOARD_NOTIFICATION_DUE_ASSIGNED),
@@ -318,7 +341,7 @@ class BoardService {
$board->setSettings($settings);
}
public function enrichWithActiveSessions(Board $board): void {
public function enrichWithActiveSessions(Board $board) {
$sessions = $this->sessionMapper->findAllActive($board->getId());
$board->setActiveSessions(array_values(
@@ -331,11 +354,17 @@ class BoardService {
}
/**
* @param Acl::PERMISSION_TYPE_* $type
* @param $boardId
* @param $type
* @param $participant
* @param $edit
* @param $share
* @param $manage
* @return \OCP\AppFramework\Db\Entity
* @throws BadRequestException
* @throws NoPermissionException
*/
public function addAcl(int $boardId, int $type, $participant, bool $edit, bool $share, bool $manage): Acl {
public function addAcl($boardId, $type, $participant, $edit, $share, $manage) {
$this->boardServiceValidator->check(compact('boardId', 'type', 'participant', 'edit', 'share', 'manage'));
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_SHARE);
@@ -371,12 +400,17 @@ class BoardService {
}
/**
* @param $id
* @param $edit
* @param $share
* @param $manage
* @return \OCP\AppFramework\Db\Entity
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function updateAcl(int $id, bool $edit, bool $share, bool $manage): Acl {
public function updateAcl($id, $edit, $share, $manage) {
$this->boardServiceValidator->check(compact('id', 'edit', 'share', 'manage'));
$this->permissionService->checkPermission($this->aclMapper, $id, Acl::PERMISSION_SHARE);
@@ -388,12 +422,12 @@ class BoardService {
$acl->setPermissionShare($share);
$acl->setPermissionManage($manage);
$this->boardMapper->mapAcl($acl);
$acl = $this->aclMapper->update($acl);
$board = $this->aclMapper->update($acl);
$this->changeHelper->boardChanged($acl->getBoardId());
$this->eventDispatcher->dispatchTyped(new AclUpdatedEvent($acl));
return $acl;
return $board;
}
/**
@@ -545,23 +579,27 @@ class BoardService {
}
/**
* @param $id
* @return Board
* @throws DoesNotExistException
* @throws NoPermissionException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function export(int $id): Board {
public function export($id) : Board {
if (is_numeric($id) === false) {
throw new BadRequestException('board id must be a number');
}
$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_READ);
$board = $this->boardMapper->find($id);
$board = $this->boardMapper->find((int)$id);
$this->enrichWithCards($board);
$this->enrichWithLabels($board);
return $board;
}
/**
* @param Board[] $boards
* @return Board[]
*/
/** @param Board[] $boards */
private function enrichBoards(array $boards, bool $fullDetails = true): array {
$result = [];
foreach ($boards as $board) {
@@ -677,8 +715,8 @@ class BoardService {
}
}
private function enrichWithStacks(Board $board): void {
$stacks = $this->stackMapper->findAll($board->getId());
private function enrichWithStacks($board, $since = -1) {
$stacks = $this->stackMapper->findAll($board->getId(), null, null, $since);
if (\count($stacks) === 0) {
return;
@@ -687,8 +725,8 @@ class BoardService {
$board->setStacks($stacks);
}
private function enrichWithLabels(Board $board): void {
$labels = $this->labelMapper->findAll($board->getId());
private function enrichWithLabels($board, $since = -1) {
$labels = $this->labelMapper->findAll($board->getId(), null, null, $since);
if (\count($labels) === 0) {
return;
@@ -697,7 +735,7 @@ class BoardService {
$board->setLabels($labels);
}
private function enrichWithUsers(Board $board): void {
private function enrichWithUsers($board, $since = -1) {
$boardUsers = $this->permissionService->findUsers($board->getId());
if ($boardUsers === null || \count($boardUsers) === 0) {
return;
@@ -708,7 +746,7 @@ class BoardService {
/**
* Clean a given board data from the Cache
*/
private function clearBoardFromCache(Board $board): void {
private function clearBoardFromCache(Board $board) {
$boardId = $board->getId();
$boardOwnerId = $board->getOwner();
@@ -717,15 +755,13 @@ class BoardService {
unset($this->boardsCachePartial[$boardId]);
}
private function enrichWithCards(Board $board): void {
private function enrichWithCards($board) {
$stacks = $this->stackMapper->findAll($board->getId());
foreach ($stacks as $stack) {
$cards = $this->cardMapper->findAllByStack($stack->getId());
$fullCards = [];
foreach ($cards as $card) {
$fullCard = $this->cardMapper->find($card->getId());
$assignedUsers = $this->assignedUsersMapper->findAll($card->getId());
$fullCard->setAssignedUsers($assignedUsers);
array_push($fullCards, $fullCard);
}
$stack->setCards($fullCards);

View File

@@ -64,14 +64,10 @@ class CardService {
) {
}
/**
* @param Card[] $cards
* @return CardDetails[]
*/
public function enrichCards(array $cards): array {
public function enrichCards($cards) {
$user = $this->userManager->get($this->userId);
$cardIds = array_map(function (Card $card) use ($user): int {
$cardIds = array_map(function (Card $card) use ($user) {
// Everything done in here might be heavy as it is executed for every card
$cardId = $card->getId();
$this->cardMapper->mapOwner($card);
@@ -124,8 +120,7 @@ class CardService {
);
}
/** @return Card[] */
public function fetchDeleted($boardId): array {
public function fetchDeleted($boardId) {
$this->cardServiceValidator->check(compact('boardId'));
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
$cards = $this->cardMapper->findDeleted($boardId);
@@ -134,12 +129,13 @@ class CardService {
}
/**
* @return \OCA\Deck\Db\RelationalEntity
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function find(int $cardId): Card {
public function find(int $cardId) {
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
$card = $this->cardMapper->find($cardId);
[$card] = $this->enrichCards([$card]);
@@ -156,10 +152,7 @@ class CardService {
return $card;
}
/**
* @return Card[]
*/
public function findCalendarEntries(int $boardId): array {
public function findCalendarEntries($boardId) {
try {
$this->permissionService->checkPermission($this->boardMapper, $boardId, Acl::PERMISSION_READ);
} catch (NoPermissionException $e) {
@@ -170,13 +163,20 @@ class CardService {
}
/**
* @param $title
* @param $stackId
* @param $type
* @param integer $order
* @param $description
* @param $owner
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadrequestException
*/
public function create(string $title, int $stackId, string $type, int $order, string $owner, string $description = '', $duedate = null): Card {
public function create($title, $stackId, $type, $order, $owner, $description = '', $duedate = null) {
$this->cardServiceValidator->check(compact('title', 'stackId', 'type', 'order', 'owner'));
$this->permissionService->checkPermission($this->stackMapper, $stackId, Acl::PERMISSION_EDIT);
@@ -203,13 +203,19 @@ class CardService {
}
/**
* @param $id
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function delete(int $id): Card {
public function delete($id) {
if (is_numeric($id) === false) {
throw new BadRequestException('card id must be a number');
}
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
if ($this->boardService->isArchived($this->cardMapper, $id)) {
throw new StatusException('Operation not allowed. This board is archived.');
@@ -227,13 +233,25 @@ class CardService {
}
/**
* @param $id
* @param $title
* @param $stackId
* @param $type
* @param $owner
* @param $description
* @param $order
* @param $duedate
* @param $deletedAt
* @param $archived
* @param $done
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function update(int $id, string $title, int $stackId, string $type, string $owner, string $description = '', int $order = 0, ?string $duedate = null, ?int $deletedAt = null, ?bool $archived = null, ?OptionalNullableValue $done = null): Card {
public function update($id, $title, $stackId, $type, $owner, $description = '', $order = 0, $duedate = null, $deletedAt = null, $archived = null, ?OptionalNullableValue $done = null) {
$this->cardServiceValidator->check(compact('id', 'title', 'stackId', 'type', 'owner', 'order'));
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT, allowDeletedCard: true);
@@ -338,7 +356,7 @@ class CardService {
if ($resetDuedateNotification) {
$this->notificationHelper->markDuedateAsRead($card);
}
$this->changeHelper->cardChanged($card->getId());
$this->changeHelper->cardChanged($card->getId(), true);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
@@ -380,13 +398,16 @@ class CardService {
}
/**
* @param $id
* @param $title
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function rename(int $id, string $title): Card {
public function rename($id, $title) {
$this->cardServiceValidator->check(compact('id', 'title'));
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
@@ -397,27 +418,30 @@ class CardService {
if ($card->getArchived()) {
throw new StatusException('Operation not allowed. This card is archived.');
}
$changes = new ChangeSet($card);
$card->setTitle($title);
$this->changeHelper->cardChanged($card->getId(), false);
$update = $this->cardMapper->update($card);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $update;
}
/**
* @return list<Card>
* @param $id
* @param $stackId
* @param $order
* @return array
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function reorder(int $id, int $stackId, int $order): array {
public function reorder(int $id, int $stackId, int $order) {
$this->cardServiceValidator->check(compact('id', 'stackId', 'order'));
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
$this->permissionService->checkPermission($this->stackMapper, $stackId, Acl::PERMISSION_EDIT);
@@ -435,69 +459,73 @@ class CardService {
$changes->setAfter($card);
$this->activityManager->triggerUpdateEvents(ActivityManager::DECK_OBJECT_CARD, $changes, ActivityManager::SUBJECT_CARD_UPDATE);
$cardsToReorder = $this->cardMapper->findAll($stackId);
$cards = $this->cardMapper->findAll($stackId);
$result = [];
$i = 0;
foreach ($cardsToReorder as $cardToReorder) {
if ($cardToReorder->getArchived()) {
foreach ($cards as $card) {
if ($card->getArchived()) {
throw new StatusException('Operation not allowed. This card is archived.');
}
if ($cardToReorder->id === $id) {
$cardToReorder->setOrder($order);
$cardToReorder->setLastModified(time());
if ($card->id === $id) {
$card->setOrder($order);
$card->setLastModified(time());
}
if ($i === $order) {
$i++;
}
if ($cardToReorder->id !== $id) {
$cardToReorder->setOrder($i++);
if ($card->id !== $id) {
$card->setOrder($i++);
}
$this->cardMapper->update($cardToReorder);
$result[$cardToReorder->getOrder()] = $cardToReorder;
$this->cardMapper->update($card);
$result[$card->getOrder()] = $card;
}
$this->changeHelper->cardChanged($id, false);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return array_values($result);
}
/**
* @param $id
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function archive(int $id): Card {
public function archive($id) {
$this->cardServiceValidator->check(compact('id'));
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
if ($this->boardService->isArchived($this->cardMapper, $id)) {
throw new StatusException('Operation not allowed. This board is archived.');
}
$card = $this->cardMapper->find($id);
$changes = new ChangeSet($card);
$card->setArchived(true);
$newCard = $this->cardMapper->update($card);
$this->notificationHelper->markDuedateAsRead($card);
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_ARCHIVE);
$this->changeHelper->cardChanged($id, false);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $newCard;
}
/**
* @param $id
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function unarchive(int $id): Card {
public function unarchive($id) {
$this->cardServiceValidator->check(compact('id'));
@@ -506,18 +534,19 @@ class CardService {
throw new StatusException('Operation not allowed. This board is archived.');
}
$card = $this->cardMapper->find($id);
$changes = new ChangeSet($card);
$card->setArchived(false);
$newCard = $this->cardMapper->update($card);
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_UNARCHIVE);
$this->changeHelper->cardChanged($id, false);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $newCard;
}
/**
* @param $id
* @return \OCA\Deck\Db\Card
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
@@ -530,14 +559,13 @@ class CardService {
throw new StatusException('Operation not allowed. This board is archived.');
}
$card = $this->cardMapper->find($id);
$changes = new ChangeSet($card);
$card->setDone(new \DateTime());
$newCard = $this->cardMapper->update($card);
$this->notificationHelper->markDuedateAsRead($card);
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_DONE);
$this->changeHelper->cardChanged($id, false);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $newCard;
}
@@ -557,25 +585,26 @@ class CardService {
throw new StatusException('Operation not allowed. This board is archived.');
}
$card = $this->cardMapper->find($id);
$changes = new ChangeSet($card);
$card->setDone(null);
$newCard = $this->cardMapper->update($card);
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_UNDONE);
$this->changeHelper->cardChanged($id, false);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card, $changes->getBefore()));
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $newCard;
}
/**
* @param $cardId
* @param $labelId
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function assignLabel(int $cardId, int $labelId): Card {
public function assignLabel($cardId, $labelId) {
$this->cardServiceValidator->check(compact('cardId', 'labelId'));
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);
@@ -597,16 +626,18 @@ class CardService {
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $card, ActivityManager::SUBJECT_LABEL_ASSIGN, ['label' => $label]);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $card;
}
/**
* @param $cardId
* @param $labelId
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function removeLabel(int $cardId, int $labelId): Card {
public function removeLabel($cardId, $labelId) {
$this->cardServiceValidator->check(compact('cardId', 'labelId'));
@@ -626,7 +657,6 @@ class CardService {
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $card, ActivityManager::SUBJECT_LABEL_UNASSING, ['label' => $label]);
$this->eventDispatcher->dispatchTyped(new CardUpdatedEvent($card));
return $card;
}
public function getCardUrl(int $cardId): string {

View File

@@ -66,7 +66,7 @@ class CirclesService {
$circlesManager->startSession($federatedUser);
$circle = $circlesManager->getCircle($circleId);
$member = $circle->getInitiator();
$isUserInCircle = $member->getLevel() >= Member::LEVEL_MEMBER;
$isUserInCircle = $member !== null && $member->getLevel() >= Member::LEVEL_MEMBER;
if (!isset($this->userCircleCache[$circleId])) {
$this->userCircleCache[$circleId] = [];

View File

@@ -22,6 +22,8 @@ use OCP\IUserManager;
use OutOfBoundsException;
use Psr\Log\LoggerInterface;
use function is_numeric;
class CommentService {
public function __construct(
@@ -34,9 +36,12 @@ class CommentService {
) {
}
public function list(int $cardId, int $limit = 20, int $offset = 0): DataResponse {
public function list(string $cardId, int $limit = 20, int $offset = 0): DataResponse {
if (!is_numeric($cardId)) {
throw new BadRequestException('A valid card id must be provided');
}
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
$comments = $this->commentsManager->getForObject(Application::COMMENT_ENTITY_TYPE, (string)$cardId, $limit, $offset);
$comments = $this->commentsManager->getForObject(Application::COMMENT_ENTITY_TYPE, $cardId, $limit, $offset);
$result = [];
foreach ($comments as $comment) {
$formattedComment = $this->formatComment($comment);
@@ -91,13 +96,13 @@ class CommentService {
* @throws BadRequestException
* @throws NotFoundException|NoPermissionException
*/
public function create(int $cardId, string $message, int $replyTo = 0): DataResponse {
public function create(int $cardId, string $message, string $replyTo = '0'): DataResponse {
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
// Check if parent is a comment on the same card
if ($replyTo !== 0) {
if ($replyTo !== '0') {
try {
$comment = $this->commentsManager->get((string)$replyTo);
$comment = $this->commentsManager->get($replyTo);
if ($comment->getObjectType() !== Application::COMMENT_ENTITY_TYPE || (int)$comment->getObjectId() !== $cardId) {
throw new CommentNotFoundException();
}
@@ -110,7 +115,7 @@ class CommentService {
$comment = $this->commentsManager->create('users', $this->userId, Application::COMMENT_ENTITY_TYPE, (string)$cardId);
$comment->setMessage($message);
$comment->setVerb('comment');
$comment->setParentId((string)$replyTo);
$comment->setParentId($replyTo);
$this->commentsManager->save($comment);
return new DataResponse($this->formatComment($comment, true));
} catch (\InvalidArgumentException $e) {
@@ -123,8 +128,14 @@ class CommentService {
}
}
public function update(int $cardId, int $commentId, string $message): DataResponse {
$comment = $this->get($cardId, $commentId);
public function update(string $cardId, string $commentId, string $message): DataResponse {
if (!is_numeric($cardId)) {
throw new BadRequestException('A valid card id must be provided');
}
if (!is_numeric($commentId)) {
throw new BadRequestException('A valid comment id must be provided');
}
$comment = $this->get((int)$cardId, (int)$commentId);
if ($comment->getActorType() !== 'users' || $comment->getActorId() !== $this->userId) {
throw new NoPermissionException('Only authors are allowed to edit their comment.');
}
@@ -134,12 +145,18 @@ class CommentService {
return new DataResponse($this->formatComment($comment));
}
public function delete(int $cardId, int $commentId): DataResponse {
public function delete(string $cardId, string $commentId): DataResponse {
if (!is_numeric($cardId)) {
throw new BadRequestException('A valid card id must be provided');
}
if (!is_numeric($commentId)) {
throw new BadRequestException('A valid comment id must be provided');
}
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
try {
$comment = $this->commentsManager->get((string)$commentId);
if ($comment->getObjectType() !== Application::COMMENT_ENTITY_TYPE || (int)$comment->getObjectId() !== $cardId) {
$comment = $this->commentsManager->get($commentId);
if ($comment->getObjectType() !== Application::COMMENT_ENTITY_TYPE || $comment->getObjectId() !== $cardId) {
throw new CommentNotFoundException();
}
} catch (CommentNotFoundException $e) {
@@ -148,11 +165,11 @@ class CommentService {
if ($comment->getActorType() !== 'users' || $comment->getActorId() !== $this->userId) {
throw new NoPermissionException('Only authors are allowed to edit their comment.');
}
$this->commentsManager->delete((string)$commentId);
$this->commentsManager->delete($commentId);
return new DataResponse([]);
}
private function formatComment(IComment $comment, bool $addReplyTo = false): array {
private function formatComment(IComment $comment, $addReplyTo = false): array {
$actorDisplayName = $this->userManager->getDisplayName($comment->getActorId()) ?? $comment->getActorId();
$formattedComment = [

View File

@@ -48,8 +48,7 @@ class ConfigService {
}
public function getAll(): array {
$userId = $this->getUserId();
if ($userId === null) {
if ($this->getUserId() === null) {
return [];
}
@@ -58,7 +57,7 @@ class ConfigService {
'cardDetailsInModal' => $this->isCardDetailsInModal(),
'cardIdBadge' => $this->isCardIdBadgeEnabled()
];
if ($this->groupManager->isAdmin($userId)) {
if ($this->groupManager->isAdmin($this->getUserId())) {
$data['groupLimit'] = $this->get('groupLimit');
}
return $data;
@@ -96,48 +95,44 @@ class ConfigService {
}
public function isCalendarEnabled(?int $boardId = null): bool {
$userId = $this->getUserId();
if ($userId === null) {
if ($this->getUserId() === null) {
return false;
}
$appConfigState = $this->config->getAppValue(Application::APP_ID, 'calendar', 'yes') === 'yes';
$defaultState = (bool)$this->config->getUserValue($userId, Application::APP_ID, 'calendar', $appConfigState);
$defaultState = (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'calendar', $appConfigState);
if ($boardId === null) {
return $defaultState;
}
return (bool)$this->config->getUserValue($userId, Application::APP_ID, 'board:' . $boardId . ':calendar', $defaultState);
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'board:' . $boardId . ':calendar', $defaultState);
}
public function isCardDetailsInModal(?int $boardId = null): bool {
$userId = $this->getUserId();
if ($userId === null) {
if ($this->getUserId() === null) {
return false;
}
$defaultState = (bool)$this->config->getUserValue($userId, Application::APP_ID, 'cardDetailsInModal', true);
$defaultState = (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'cardDetailsInModal', true);
if ($boardId === null) {
return $defaultState;
}
return (bool)$this->config->getUserValue($userId, Application::APP_ID, 'board:' . $boardId . ':cardDetailsInModal', $defaultState);
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'board:' . $boardId . ':cardDetailsInModal', $defaultState);
}
public function isCardIdBadgeEnabled(): bool {
$userId = $this->getUserId();
if ($userId === null) {
if ($this->getUserId() === null) {
return false;
}
$appConfigState = $this->config->getAppValue(Application::APP_ID, 'cardIdBadge', 'yes') === 'no';
$defaultState = (bool)$this->config->getUserValue($userId, Application::APP_ID, 'cardIdBadge', $appConfigState);
$defaultState = (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'cardIdBadge', $appConfigState);
return (bool)$this->config->getUserValue($userId, Application::APP_ID, 'cardIdBadge', $defaultState);
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'cardIdBadge', $defaultState);
}
public function set($key, $value) {
$userId = $this->getUserId();
if ($userId === null) {
if ($this->getUserId() === null) {
throw new NoPermissionException('Must be logged in to set user config');
}
@@ -145,21 +140,21 @@ class ConfigService {
[$scope] = explode(':', $key, 2);
switch ($scope) {
case 'groupLimit':
if (!$this->groupManager->isAdmin($userId)) {
if (!$this->groupManager->isAdmin($this->getUserId())) {
throw new NoPermissionException('You must be admin to set the group limit');
}
$result = $this->setGroupLimit($value);
break;
case 'calendar':
$this->config->setUserValue($userId, Application::APP_ID, 'calendar', (string)$value);
$this->config->setUserValue($this->getUserId(), Application::APP_ID, 'calendar', (string)$value);
$result = $value;
break;
case 'cardDetailsInModal':
$this->config->setUserValue($userId, Application::APP_ID, 'cardDetailsInModal', (string)$value);
$this->config->setUserValue($this->getUserId(), Application::APP_ID, 'cardDetailsInModal', (string)$value);
$result = $value;
break;
case 'cardIdBadge':
$this->config->setUserValue($userId, Application::APP_ID, 'cardIdBadge', (string)$value);
$this->config->setUserValue($this->getUserId(), Application::APP_ID, 'cardIdBadge', (string)$value);
$result = $value;
break;
case 'board':
@@ -167,7 +162,7 @@ class ConfigService {
if ($boardConfigKey === 'notify-due' && !in_array($value, [self::SETTING_BOARD_NOTIFICATION_DUE_ALL, self::SETTING_BOARD_NOTIFICATION_DUE_ASSIGNED, self::SETTING_BOARD_NOTIFICATION_DUE_OFF], true)) {
throw new BadRequestException('Board notification option must be one of: off, assigned, all');
}
$this->config->setUserValue($userId, Application::APP_ID, $key, (string)$value);
$this->config->setUserValue($this->getUserId(), Application::APP_ID, $key, (string)$value);
$result = $value;
}
return $result;

View File

@@ -9,7 +9,6 @@ namespace OCA\Deck\Service;
use OCA\Deck\AppInfo\Application;
use OCA\Deck\BadRequestException;
use OCA\Deck\Db\Board;
use OCA\Deck\Db\BoardMapper;
use OCP\IConfig;
use OCP\IL10N;
@@ -22,8 +21,6 @@ class DefaultBoardService {
private $cardService;
private $config;
private $l10n;
private LabelService $labelService;
private AttachmentService $attachmentService;
public function __construct(
IL10N $l10n,
@@ -32,8 +29,6 @@ class DefaultBoardService {
StackService $stackService,
CardService $cardService,
IConfig $config,
LabelService $labelService,
AttachmentService $attachmentService,
) {
$this->boardService = $boardService;
$this->stackService = $stackService;
@@ -41,8 +36,6 @@ class DefaultBoardService {
$this->config = $config;
$this->boardMapper = $boardMapper;
$this->l10n = $l10n;
$this->labelService = $labelService;
$this->attachmentService = $attachmentService;
}
/**
@@ -66,13 +59,10 @@ class DefaultBoardService {
return false;
}
private function getDefaultBoardData(): array {
$defaultBoardDataJson = file_get_contents(__DIR__ . '/fixtures/default-board.json');
return json_decode($defaultBoardDataJson, true);
}
/**
* @param $title
* @param $userId
* @param $color
* @return \OCP\AppFramework\Db\Entity
* @throws \OCA\Deck\NoPermissionException
* @throws \OCA\Deck\StatusException
@@ -81,71 +71,19 @@ class DefaultBoardService {
* @throws BadRequestException
*/
public function createDefaultBoard(string $title, string $userId, string $color) {
$boardData = $this->getDefaultBoardData();
$defaultBoard = $this->boardService->create($title, $userId, $color);
$defaultStacks = [];
$defaultCards = [];
/** @var Board $defaultBoard */
$defaultBoard = $this->boardService->create(
$boardData['title'] ?? $title,
$userId,
$boardData['color'] ?? $color,
);
$boardId = $defaultBoard->getId();
$additionLabels = [];
$translatedLabelTitles = [
'Read more inside' => $this->l10n->t('Read more inside'),
];
$translatedStackTitles = [
'Custom lists - click to rename!' => $this->l10n->t('Custom lists - click to rename!'),
'To Do' => $this->l10n->t('To Do'),
'In Progress' => $this->l10n->t('In Progress'),
'Done' => $this->l10n->t('Done'),
];
$translatedCardTitles = [
'1. Open to learn more about boards and cards' => $this->l10n->t('1. Open to learn more about boards and cards'),
'2. Drag cards left and right, up and down' => $this->l10n->t('2. Drag cards left and right, up and down'),
'3. Apply rich formatting and link content' => $this->l10n->t('3. Apply rich formatting and link content'),
'4. Share, comment and collaborate!' => $this->l10n->t('4. Share, comment and collaborate!'),
'Create your first card!' => $this->l10n->t('Create your first card!'),
];
foreach ($boardData['addition_labels'] as $labelData) {
$additionLabels[] = $this->labelService->create(
$translatedLabelTitles[$labelData['title']] ?? $labelData['title'],
$labelData['color'],
$boardId
);
}
$defaultStacks[] = $this->stackService->create($this->l10n->t('To do'), $boardId, 1);
$defaultStacks[] = $this->stackService->create($this->l10n->t('Doing'), $boardId, 1);
$defaultStacks[] = $this->stackService->create($this->l10n->t('Done'), $boardId, 1);
$defaultLabels = array_merge($defaultBoard->getLabels() ?? [], $additionLabels);
foreach ($boardData['stacks'] as $stackData) {
$stack = $this->stackService->create(
$translatedStackTitles[$stackData['title']] ?? $stackData['title'],
$boardId,
$stackData['order']
);
foreach ($stackData['cards'] as $cardData) {
$card = $this->cardService->create(
$translatedCardTitles[$cardData['title']] ?? $cardData['title'],
$stack->getId(),
$cardData['type'],
$cardData['order'],
$userId,
$cardData['description'],
);
foreach ($defaultLabels as $defaultLabel) {
if ($defaultLabel && in_array($defaultLabel->getTitle(), $cardData['labels'])) {
$this->cardService->assignLabel($card->getId(), $defaultLabel->getId());
}
}
if (!empty($cardData['has_example_attachment'])) {
$this->attachmentService->create($card->getId(), 'file', 'DEFAULT_SAMPLE_FILE');
}
}
}
$defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 3'), $defaultStacks[0]->getId(), 'text', 0, $userId);
$defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 2'), $defaultStacks[1]->getId(), 'text', 0, $userId);
$defaultCards[] = $this->cardService->create($this->l10n->t('Example Task 1'), $defaultStacks[2]->getId(), 'text', 0, $userId);
return $defaultBoard;
}

View File

@@ -162,15 +162,7 @@ class FilesAppService implements IAttachmentService, ICustomAttachmentService {
}
public function create(Attachment $attachment) {
if ($attachment->getData() === 'DEFAULT_SAMPLE_FILE' && !$this->request->getUploadedFile('file')) {
$file = [
'name' => 'Nextcloud sample image - add your image here!.jpg',
'tmp_name' => __DIR__ . '/../../img/sample-image.jpg',
];
} else {
$file = $this->getUploadedFile();
}
$file = $this->getUploadedFile();
$fileName = $file['name'];
// get shares for current card

View File

@@ -124,15 +124,18 @@ class FullTextSearchService {
/**
* @param int $cardId
*
* @return Board
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*/
public function getBoardFromCardId(int $cardId): Board {
$boardId = $this->cardMapper->findBoardId($cardId);
if ($boardId === null) {
throw new DoesNotExistException("Board '$cardId' does not exist");
}
return $this->boardMapper->find($boardId);
$boardId = (int)$this->cardMapper->findBoardId($cardId);
/** @var Board $board */
$board = $this->boardMapper->find($boardId);
return $board;
}
@@ -142,7 +145,7 @@ class FullTextSearchService {
* @return Card[]
*/
private function getCardsFromStack(int $stackId): array {
return $this->cardMapper->findAll($stackId);
return $this->cardMapper->findAll($stackId, null, null);
}
@@ -152,7 +155,7 @@ class FullTextSearchService {
* @return Stack[]
*/
private function getStacksFromBoard(int $boardId): array {
return $this->stackMapper->findAll($boardId);
return $this->stackMapper->findAll($boardId, null, null);
}
@@ -162,6 +165,6 @@ class FullTextSearchService {
* @return Board[]
*/
private function getBoardsFromUser(string $userId): array {
return $this->boardMapper->findAllByUser($userId);
return $this->boardMapper->findAllByUser($userId, null, null, null);
}
}

View File

@@ -19,25 +19,29 @@ use OCP\Comments\IComment;
abstract class ABoardImportService {
/** @var string */
public static $name = '';
private BoardImportService $boardImportService;
protected bool $needValidateData = true;
/** @var BoardImportService */
private $boardImportService;
/** @var bool */
protected $needValidateData = true;
/** @var Stack[] */
protected array $stacks = [];
protected $stacks = [];
/** @var Label[] */
protected array $labels = [];
protected $labels = [];
/** @var Card[] */
protected array $cards = [];
protected $cards = [];
/** @var Acl[] */
protected array $acls = [];
protected $acls = [];
/** @var IComment[][] */
protected array $comments = [];
protected $comments = [];
/** @var Assignment[] */
protected array $assignments = [];
/** @var int[][] */
protected array $labelCardAssignments = [];
protected $assignments = [];
/** @var string[][] */
protected $labelCardAssignments = [];
/**
* Configure import service
*
* @return void
*/
abstract public function bootstrap(): void;
@@ -64,13 +68,10 @@ abstract class ABoardImportService {
abstract public function getCardAssignments(): array;
/**
* @return array<int, array<int, int>>
*/
abstract public function getCardLabelAssignment(): array;
/**
* @return array<int, array<string, IComment>>
* @return IComment[][]|array
*/
abstract public function getComments(): array;
@@ -97,16 +98,16 @@ abstract class ABoardImportService {
$this->acls[$code] = $acl;
}
public function updateComment(int $cardId, string $commentId, IComment $comment): void {
public function updateComment(string $cardId, string $commentId, IComment $comment): void {
$this->comments[$cardId][$commentId] = $comment;
}
public function updateCardAssignment(int $cardId, int $assignmentId, Entity $assignment): void {
public function updateCardAssignment(string $cardId, string $assignmentId, Entity $assignment): void {
$this->assignments[$cardId][$assignmentId] = $assignment;
}
public function updateCardLabelsAssignment(int $cardId, int $assignmentId, int $labelId): void {
$this->labelCardAssignments[$cardId][$assignmentId] = $labelId;
public function updateCardLabelsAssignment(string $cardId, string $assignmentId, string $assignment): void {
$this->labelCardAssignments[$cardId][$assignmentId] = $assignment;
}
public function setImportService(BoardImportService $service): void {

View File

@@ -209,15 +209,14 @@ class BoardImportService {
public function importBoard(): void {
$board = $this->getImportSystem()->getBoard();
if ($board === null) {
throw new \LogicException('Import board not found');
}
if (!$this->userManager->userExists($board->getOwner())) {
throw new \Exception('Target owner ' . $board->getOwner() . ' not found. Please provide a mapping through the import config.');
}
$this->boardMapper->insert($board);
$this->board = $board;
if ($board) {
$this->boardMapper->insert($board);
$this->board = $board;
}
}
public function getBoard(bool $reset = false): Board {
@@ -293,7 +292,12 @@ class BoardImportService {
}
}
public function assignCardToLabel(int $cardId, int $labelId): self {
/**
* @param mixed $cardId
* @param mixed $labelId
* @return self
*/
public function assignCardToLabel($cardId, $labelId): self {
$this->cardMapper->assignLabel(
$cardId,
$labelId
@@ -303,14 +307,14 @@ class BoardImportService {
public function assignCardsToLabels(): void {
$data = $this->getImportSystem()->getCardLabelAssignment();
foreach ($data as $cardId => $assignment) {
foreach ($assignment as $assignmentId => $labelId) {
foreach ($data as $cardId => $assignemnt) {
foreach ($assignemnt as $assignmentId => $labelId) {
try {
$this->assignCardToLabel(
(int)$cardId,
$cardId,
$labelId
);
$this->getImportSystem()->updateCardLabelsAssignment((int)$cardId, (int)$assignmentId, $labelId);
$this->getImportSystem()->updateCardLabelsAssignment($cardId, $assignmentId, $labelId);
} catch (\Exception $e) {
$this->addError('Failed to assign label ' . $labelId . ' to ' . $cardId, $e);
}
@@ -322,20 +326,20 @@ class BoardImportService {
$allComments = $this->getImportSystem()->getComments();
foreach ($allComments as $cardId => $comments) {
foreach ($comments as $commentId => $comment) {
$this->insertComment((int)$cardId, $comment);
$this->getImportSystem()->updateComment((int)$cardId, $commentId, $comment);
$this->insertComment($cardId, $comment);
$this->getImportSystem()->updateComment($cardId, $commentId, $comment);
}
}
}
private function insertComment(int $cardId, IComment $comment): void {
$comment->setObject('deckCard', (string)$cardId);
private function insertComment(string $cardId, IComment $comment): void {
$comment->setObject('deckCard', $cardId);
$comment->setVerb('comment');
// Check if parent is a comment on the same card
if ($comment->getParentId() !== '0') {
try {
$parent = $this->commentsManager->get($comment->getParentId());
if ($parent->getObjectType() !== Application::COMMENT_ENTITY_TYPE || (int)$parent->getObjectId() !== $cardId) {
if ($parent->getObjectType() !== Application::COMMENT_ENTITY_TYPE || $parent->getObjectId() !== $cardId) {
throw new CommentNotFoundException();
}
} catch (CommentNotFoundException $e) {
@@ -358,7 +362,7 @@ class BoardImportService {
foreach ($assignments as $assignment) {
try {
$assignment = $this->assignmentMapper->insert($assignment);
$this->getImportSystem()->updateCardAssignment((int)$cardId, $assignment->getId(), $assignment);
$this->getImportSystem()->updateCardAssignment($cardId, (string)$assignment->getId(), $assignment);
$this->addOutput('Assignment ' . $assignment->getParticipant() . ' added');
} catch (NotFoundException $e) {
$this->addError('No origin or mapping found for card "' . $cardId . '" and ' . $assignment->getTypeString() . ' assignment "' . $assignment->getParticipant(), $e);

View File

@@ -16,7 +16,6 @@ use OCA\Deck\Db\Card;
use OCA\Deck\Db\Label;
use OCA\Deck\Db\Stack;
use OCA\Deck\Service\Importer\ABoardImportService;
use OCP\Comments\IComment;
use OCP\IUser;
use OCP\IUserManager;
@@ -119,7 +118,6 @@ class DeckJsonService extends ABoardImportService {
$comments[$this->cards[$sourceCard->id]->getId()][$commentOriginal->id] = $comment;
}
}
/** @var array<int, array<string, IComment>> */
return $comments;
}

View File

@@ -17,7 +17,7 @@ use Psr\Log\LoggerInterface;
class TrelloApiService extends TrelloJsonService {
/** @var string */
public static $name = 'Trello API';
protected bool $needValidateData = false;
protected $needValidateData = false;
/** @var IClient */
private $httpClient;
/** @var LoggerInterface */
@@ -176,7 +176,7 @@ class TrelloApiService extends TrelloJsonService {
if (empty($queryString['limit'])) {
return [];
}
if ((count($data) < $queryString['limit']) || (count($data) === 0)) {
if (count($data) < $queryString['limit']) {
return [];
}
$queryString['before'] = end($data)->id;

View File

@@ -159,7 +159,6 @@ class TrelloJsonService extends ABoardImportService {
$comments[$cardId][$commentId] = $comment;
}
}
/** @var array<int, array<string, IComment>> */
return $comments;
}

View File

@@ -43,24 +43,33 @@ class LabelService {
}
/**
* @param $labelId
* @return \OCP\AppFramework\Db\Entity
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function find(int $labelId): Label {
public function find($labelId) {
if (is_numeric($labelId) === false) {
throw new BadRequestException('label id must be a number');
}
$this->permissionService->checkPermission($this->labelMapper, $labelId, Acl::PERMISSION_READ);
return $this->labelMapper->find($labelId);
}
/**
* @param $title
* @param $color
* @param $boardId
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function create(string $title, string $color, int $boardId): Label {
public function create($title, $color, $boardId) {
$this->labelServiceValidator->check(compact('title', 'color', 'boardId'));
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
@@ -97,13 +106,15 @@ class LabelService {
}
/**
* @param $id
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function delete(int $id): Label {
public function delete($id) {
$this->labelServiceValidator->check(compact('id'));
$this->permissionService->checkPermission($this->labelMapper, $id, Acl::PERMISSION_MANAGE);
@@ -116,13 +127,17 @@ class LabelService {
}
/**
* @param $id
* @param $title
* @param $color
* @return \OCP\AppFramework\Db\Entity
* @throws StatusException
* @throws \OCA\Deck\NoPermissionException
* @throws \OCP\AppFramework\Db\DoesNotExistException
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function update(int $id, string $title, string $color): Label {
public function update($id, $title, $color) {
$this->labelServiceValidator->check(compact('title', 'color', 'id'));
$this->permissionService->checkPermission($this->labelMapper, $id, Acl::PERMISSION_MANAGE);

Some files were not shown because too many files have changed in this diff Show More