Compare commits

...

24 Commits

Author SHA1 Message Date
Jonas
df5b5690a0 Only check path for being accessible when the storage is a object home
Forward-ported https://github.com/nextcloud/server/pull/24103

Signed-off-by: Jonas <jonas@freesources.org>
2024-07-02 10:37:56 +02:00
Julius Härtl
2a4ea73023 Merge pull request #6051 from nextcloud/dependabot/npm_and_yarn/main/relative-ci/agent-4.2.9
Chore(deps-dev): Bump @relative-ci/agent from 4.2.8 to 4.2.9
2024-07-01 09:34:19 +02:00
Julius Härtl
9c5498a050 Merge pull request #6053 from nextcloud/dependabot/npm_and_yarn/main/nextcloud/dialogs-5.3.4
Chore(deps): Bump @nextcloud/dialogs from 5.3.3 to 5.3.4
2024-07-01 09:34:11 +02:00
Julius Härtl
24a1666c36 Merge pull request #6055 from nextcloud/dependabot/github_actions/alexwilson/enable-github-automerge-action-95df6f3009ad99156b8b23cd8b0f26b815333981
Chore(deps): Bump alexwilson/enable-github-automerge-action from 835faa041540d2234ea4530506a7abd42c847dfc to 95df6f3009ad99156b8b23cd8b0f26b815333981
2024-07-01 09:33:19 +02:00
github-actions[bot]
de5c625e86 Merge pull request #6059 from nextcloud/automated/noid/main-update-nextcloud-ocp
[main] Update nextcloud/ocp dependency
2024-06-30 04:43:02 +00:00
nextcloud-command
544581bbdc chore(dev-deps): Bump nextcloud/ocp package
Signed-off-by: GitHub <noreply@github.com>
2024-06-30 02:49:23 +00:00
dependabot[bot]
3852119f4f Merge pull request #6054 from nextcloud/dependabot/github_actions/shivammathur/setup-php-2.31.0 2024-06-29 03:44:02 +00:00
dependabot[bot]
fd540be9c2 Merge pull request #6052 from nextcloud/dependabot/npm_and_yarn/main/nextcloud/vue-8.13.0 2024-06-29 03:24:32 +00:00
dependabot[bot]
cfcfaad6c6 Chore(deps): Bump alexwilson/enable-github-automerge-action
Bumps [alexwilson/enable-github-automerge-action](https://github.com/alexwilson/enable-github-automerge-action) from 835faa041540d2234ea4530506a7abd42c847dfc to 95df6f3009ad99156b8b23cd8b0f26b815333981.
- [Release notes](https://github.com/alexwilson/enable-github-automerge-action/releases)
- [Commits](835faa0415...95df6f3009)

---
updated-dependencies:
- dependency-name: alexwilson/enable-github-automerge-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-29 03:00:36 +00:00
dependabot[bot]
040df707b2 Chore(deps): Bump shivammathur/setup-php from 2.30.5 to 2.31.0
Bumps [shivammathur/setup-php](https://github.com/shivammathur/setup-php) from 2.30.5 to 2.31.0.
- [Release notes](https://github.com/shivammathur/setup-php/releases)
- [Commits](https://github.com/shivammathur/setup-php/compare/2.30.5...2.31.0)

---
updated-dependencies:
- dependency-name: shivammathur/setup-php
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-29 03:00:31 +00:00
dependabot[bot]
4a00ce2e45 Chore(deps): Bump @nextcloud/dialogs from 5.3.3 to 5.3.4
Bumps [@nextcloud/dialogs](https://github.com/nextcloud-libraries/nextcloud-dialogs) from 5.3.3 to 5.3.4.
- [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/v5.3.3...v5.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-29 02:24:33 +00:00
dependabot[bot]
80a51d64b6 Chore(deps): Bump @nextcloud/vue from 8.12.0 to 8.13.0
Bumps [@nextcloud/vue](https://github.com/nextcloud-libraries/nextcloud-vue) from 8.12.0 to 8.13.0.
- [Release notes](https://github.com/nextcloud-libraries/nextcloud-vue/releases)
- [Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.12.0...v8.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-29 02:24:19 +00:00
dependabot[bot]
c741c1190b Chore(deps-dev): Bump @relative-ci/agent from 4.2.8 to 4.2.9
Bumps [@relative-ci/agent](https://github.com/relative-ci/agent) from 4.2.8 to 4.2.9.
- [Release notes](https://github.com/relative-ci/agent/releases)
- [Commits](https://github.com/relative-ci/agent/compare/v4.2.8...v4.2.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-29 02:23:45 +00:00
Julius Härtl
2f5d39fc5b Merge pull request #6008 from nextcloud/chore/comments-event-legacy
chore: Move comments event handler to use proper event dispatcher
2024-06-28 16:16:19 +02:00
Julius Härtl
a6b31d6a5f Merge pull request #6029 from nextcloud/StCyr-patch-1-1
Update User_documentation_en.md
2024-06-28 14:31:22 +02:00
Julius Härtl
261e6d0362 chore: Move comments event handler to use proper event dispatcher
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-06-28 14:20:38 +02:00
Nextcloud bot
8ceed06aca Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-06-27 00:37:38 +00:00
Julius Härtl
02f63d9967 Merge pull request #6010 from nextcloud/perf/permission-skip-enhance 2024-06-26 23:57:01 +02:00
Julius Härtl
206a735c55 Merge pull request #6033 from nextcloud/fix/symlink
docs: Fix symlink to readme
2024-06-26 10:26:51 +02:00
Julius Härtl
ab94a5cc32 docs: Fix symlink to readme
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-06-26 10:23:40 +02:00
Julius Härtl
4b2c191e21 Merge pull request #6005 from nextcloud/fix/5628-deck-card-descriptions-not-saved
don't reset update time when no update was written to db
2024-06-26 10:15:17 +02:00
Julius Härtl
d4ea088cd2 perf: Avoid fetching labels and owner details on permission check
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-06-25 17:01:30 +02:00
Cyrille Bollu
979c1be7f3 Update User_documentation_en.md
Adds documentation how permissions are granted when sharing boards, based on what I have found here: ea4655b24e/lib/Service/PermissionService.php (L169)

Signed-off-by: Cyrille Bollu <StCyr@users.noreply.github.com>
2024-06-24 17:28:42 +02:00
grnd-alt
3c5ca27eb8 don't reset update time when no update was written to db
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
2024-06-17 13:43:12 +02:00
26 changed files with 123 additions and 141 deletions

View File

@@ -24,7 +24,7 @@ jobs:
- name: Set up npm7
run: npm i -g npm@7
- name: Setup PHP
uses: shivammathur/setup-php@2.30.5
uses: shivammathur/setup-php@2.31.0
with:
php-version: '7.4'
tools: composer

View File

@@ -72,7 +72,7 @@ jobs:
filename: ${{ env.APP_NAME }}/appinfo/info.xml
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: ${{ steps.php-versions.outputs.php-min }}
coverage: none

View File

@@ -91,7 +91,7 @@ jobs:
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@2.30.5
uses: shivammathur/setup-php@2.31.0
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.30.5
uses: shivammathur/setup-php@2.31.0
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu

View File

@@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up php8.2
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: 8.2
coverage: none

View File

@@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

View File

@@ -92,7 +92,7 @@ jobs:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

View File

@@ -80,7 +80,7 @@ jobs:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

View File

@@ -69,7 +69,7 @@ jobs:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

View File

@@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up php8.2
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: 8.2
coverage: none

View File

@@ -43,7 +43,7 @@ jobs:
# Enable GitHub auto merge
- name: Auto merge
uses: alexwilson/enable-github-automerge-action@835faa041540d2234ea4530506a7abd42c847dfc # main
uses: alexwilson/enable-github-automerge-action@95df6f3009ad99156b8b23cd8b0f26b815333981 # main
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -31,7 +31,7 @@ jobs:
- name: Set up php8.2
if: steps.checkout.outcome == 'success'
uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761 # v2
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2
with:
php-version: 8.2
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

8
composer.lock generated
View File

@@ -254,12 +254,12 @@
"source": {
"type": "git",
"url": "https://github.com/nextcloud-deps/ocp.git",
"reference": "bdeabb2fbb4691ac3d72dc27f56dd52aa6c61725"
"reference": "6a23d33b2cfd8660aa2a23ee377329773451dcf7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/bdeabb2fbb4691ac3d72dc27f56dd52aa6c61725",
"reference": "bdeabb2fbb4691ac3d72dc27f56dd52aa6c61725",
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/6a23d33b2cfd8660aa2a23ee377329773451dcf7",
"reference": "6a23d33b2cfd8660aa2a23ee377329773451dcf7",
"shasum": ""
},
"require": {
@@ -291,7 +291,7 @@
"issues": "https://github.com/nextcloud-deps/ocp/issues",
"source": "https://github.com/nextcloud-deps/ocp/tree/master"
},
"time": "2024-06-18T00:36:38+00:00"
"time": "2024-06-28T00:36:28+00:00"
},
{
"name": "nikic/php-parser",

View File

@@ -20,9 +20,11 @@ Overall, Deck is easy to use. You can create boards, add users, share the Deck,
4. [Mark task as done](#4-mark-as-done)
5. [Archive old tasks](#5-archive-old-tasks)
6. [Manage your board](#6-manage-your-board)
7. [Import boards](#7-import-boards)
8. [Search](#8-search)
9. [New owner for the deck entities](#9-new-owner-for-the-deck-entities)
7. [Sharing boards](#7-sharing-boards)
8. [Import boards](#8-import-boards)
9. [Trello interoperability](#9-trello-interoperability)
10. [Search](#10-search)
11. [New owner for the deck entities](#11-new-owner-for-the-deck-entities)
### 1. Create my first board
In this example, we're going to create a board and share it with an other nextcloud user.
@@ -84,7 +86,14 @@ The **sharing tab** allows you to add users or even groups to your boards.
**Deleted objects** allows you to return previously deleted stacks or cards.
The **Timeline** allows you to see everything that happened in your boards. Everything!
### 7. Import boards
### 7. Sharing boards
You can share boards with a user, a group, or, if you are using the [Circles](https://apps.nextcloud.com/apps/circles) app, with a circle.
If a user is member of one or several group(s) or circle(s) a board is shared with, the following rules apply:
1. If a user is namely specified in a board's acl, (s)he gets the permission assigned to her/him;
2. Else, if a user is member of one or several circle(s) or group(s), (s)he gets the permission when at least one circle/group (s)he is member of has the permission.
### 8. Import boards
Importing can be done using the API or the `occ` `deck:import` command.
@@ -92,6 +101,8 @@ Comments with more than 1000 characters are placed as attached files to the card
It is possible to import from the following sources:
### 9. Trello interoperability
#### Trello JSON
Steps:
@@ -150,7 +161,7 @@ Example configuration file:
}
```
### 8. Search
### 10. Search
Deck provides a global search either through the unified search in the Nextcloud header or with the inline search next to the board controls.
This search allows advanced filtering of cards across all board of the logged in user.
@@ -173,7 +184,7 @@ Other text tokens will be used to perform a case-insensitive search on the card
In addition, quotes can be used to pass a query with spaces, e.g. `"Exact match with spaces"` or `title:"My card"`.
### 9. New owner for the deck entities
### 11. New owner for the deck entities
You can transfer ownership of boards, cards, etc to a new user, using `occ` command `deck:transfer-ownership`
```bash

View File

@@ -1,5 +1 @@
<!--
- SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
../README.md

View File

@@ -149,6 +149,7 @@ OC.L10N.register(
"Filter by tag" : "Filtrer på knagg",
"Filter by assigned user" : "Filtrer på tildelt bruker",
"Unassigned" : "Ikke tildelt",
"Filter by status" : "Filtrer etter status",
"Open and completed" : "Åpen og fullført",
"Open" : "Åpne",
"Completed" : "Ferdig",
@@ -257,6 +258,7 @@ OC.L10N.register(
"Remove due date" : "Fjern forfallsdato",
"Mark as done" : "Marker som fullført",
"Due at:" : "Forfaller den:",
"Not done" : "Ikke fullført",
"Unarchive card" : "Hent kort fra arkiv",
"Archive card" : "Arkiver kort",
"Select Date" : "Velg dato",

View File

@@ -147,6 +147,7 @@
"Filter by tag" : "Filtrer på knagg",
"Filter by assigned user" : "Filtrer på tildelt bruker",
"Unassigned" : "Ikke tildelt",
"Filter by status" : "Filtrer etter status",
"Open and completed" : "Åpen og fullført",
"Open" : "Åpne",
"Completed" : "Ferdig",
@@ -255,6 +256,7 @@
"Remove due date" : "Fjern forfallsdato",
"Mark as done" : "Marker som fullført",
"Due at:" : "Forfaller den:",
"Not done" : "Ikke fullført",
"Unarchive card" : "Hent kort fra arkiv",
"Archive card" : "Arkiver kort",
"Select Date" : "Velg dato",

View File

@@ -9,7 +9,6 @@ namespace OCA\Deck\AppInfo;
use Closure;
use Exception;
use OCA\Circles\Events\CircleDestroyedEvent;
use OCA\Deck\Activity\CommentEventHandler;
use OCA\Deck\Capabilities;
use OCA\Deck\Collaboration\Resources\ResourceProvider;
use OCA\Deck\Collaboration\Resources\ResourceProviderCard;
@@ -28,6 +27,7 @@ use OCA\Deck\Event\CardUpdatedEvent;
use OCA\Deck\Event\SessionClosedEvent;
use OCA\Deck\Event\SessionCreatedEvent;
use OCA\Deck\Listeners\BeforeTemplateRenderedListener;
use OCA\Deck\Listeners\CommentEventListener;
use OCA\Deck\Listeners\FullTextSearchEventListener;
use OCA\Deck\Listeners\LiveUpdateListener;
use OCA\Deck\Listeners\ParticipantCleanupListener;
@@ -56,7 +56,7 @@ use OCP\Collaboration\Reference\RenderReferenceEvent;
use OCP\Collaboration\Resources\IProviderManager;
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent;
use OCP\Comments\CommentsEntityEvent;
use OCP\Comments\ICommentsManager;
use OCP\Comments\CommentsEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Group\Events\GroupDeletedEvent;
use OCP\IConfig;
@@ -91,7 +91,6 @@ class Application extends App implements IBootstrap {
public function boot(IBootContext $context): void {
$context->injectFn(Closure::fromCallable([$this, 'registerCommentsEntity']));
$context->injectFn(Closure::fromCallable([$this, 'registerCommentsEventHandler']));
$context->injectFn(Closure::fromCallable([$this, 'registerCollaborationResources']));
$context->injectFn(function (IManager $shareManager) {
@@ -141,6 +140,7 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(AclCreatedEvent::class, FullTextSearchEventListener::class);
$context->registerEventListener(AclUpdatedEvent::class, FullTextSearchEventListener::class);
$context->registerEventListener(AclDeletedEvent::class, FullTextSearchEventListener::class);
$context->registerEventListener(CommentsEvent::class, CommentEventListener::class);
// Handling cache invalidation for collections
$context->registerEventListener(AclCreatedEvent::class, ResourceListener::class);
@@ -184,12 +184,6 @@ class Application extends App implements IBootstrap {
});
}
protected function registerCommentsEventHandler(ICommentsManager $commentsManager): void {
$commentsManager->registerEventHandler(function () {
return $this->getContainer()->query(CommentEventHandler::class);
});
}
protected function registerCollaborationResources(IProviderManager $resourceManager): void {
$resourceManager->registerResourceProvider(ResourceProvider::class);
$resourceManager->registerResourceProvider(ResourceProviderCard::class);

View File

@@ -113,7 +113,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
return parent::update($cardUpdate);
}
public function find($id): Card {
public function find($id, bool $enhance = true): Card {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from('deck_cards')
@@ -122,9 +122,11 @@ class CardMapper extends QBMapper implements IPermissionMapper {
->addOrderBy('id');
/** @var Card $card */
$card = $this->findEntity($qb);
$labels = $this->labelMapper->findAssignedLabelsForCard($card->getId());
$card->setLabels($labels);
$this->mapOwner($card);
if ($enhance) {
$labels = $this->labelMapper->findAssignedLabelsForCard($card->getId());
$card->setLabels($labels);
$this->mapOwner($card);
}
return $card;
}

View File

@@ -1,43 +1,37 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Deck\Activity;
namespace OCA\Deck\Listeners;
use OCA\Deck\Activity\ActivityManager;
use OCA\Deck\Db\CardMapper;
use OCA\Deck\Db\ChangeHelper;
use OCA\Deck\Notification\NotificationHelper;
use OCP\Comments\CommentsEvent;
use OCP\Comments\IComment;
use OCP\Comments\ICommentsEventHandler;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
class CommentEventHandler implements ICommentsEventHandler {
/** @template-implements IEventListener<CommentsEvent|Event> */
class CommentEventListener implements IEventListener {
/** @var ActivityManager */
private $activityManager;
/** @var NotificationHelper */
private $notificationHelper;
/** @var CardMapper */
private $cardMapper;
/** @var ChangeHelper */
private $changeHelper;
public function __construct(ActivityManager $activityManager, NotificationHelper $notificationHelper, CardMapper $cardMapper, ChangeHelper $changeHelper) {
$this->notificationHelper = $notificationHelper;
$this->activityManager = $activityManager;
$this->cardMapper = $cardMapper;
$this->changeHelper = $changeHelper;
public function __construct(
private ActivityManager $activityManager,
private NotificationHelper $notificationHelper,
private CardMapper $cardMapper,
private ChangeHelper $changeHelper,
) {
}
/**
* @param CommentsEvent $event
*/
public function handle(CommentsEvent $event) {
public function handle(Event $event): void {
if (!$event instanceof CommentsEvent) {
return;
}
if ($event->getComment()->getObjectType() !== 'deckCard') {
return;
}
@@ -61,20 +55,13 @@ class CommentEventHandler implements ICommentsEventHandler {
}
}
/**
* @param CommentsEvent $event
*/
private function activityHandler(CommentsEvent $event) {
/** @var IComment $comment */
private function activityHandler(CommentsEvent $event): void {
$comment = $event->getComment();
$card = $this->cardMapper->find($comment->getObjectId());
$this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $card, ActivityManager::SUBJECT_CARD_COMMENT_CREATE, ['comment' => $comment]);
}
/**
* @param CommentsEvent $event
*/
private function notificationHandler(CommentsEvent $event) {
private function notificationHandler(CommentsEvent $event): void {
$this->notificationHelper->sendMention($event->getComment());
}
}

View File

@@ -119,7 +119,7 @@ class PermissionService {
if ($permissions[$permission] === true) {
if (!$allowDeletedCard && $mapper instanceof CardMapper) {
$card = $mapper->find((int)$id);
$card = $mapper->find((int)$id, false);
if ($card->getDeletedAt() > 0) {
throw new NoPermissionException('Card is deleted');
}

View File

@@ -831,7 +831,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider {
$pathSections = explode('/', $data['path'], 2);
// FIXME: would not detect rare md5'd home storage case properly
if ($pathSections[0] !== 'files'
&& in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) {
&& (strpos($data['storage_string_id'], 'home::') === 0 || strpos($data['storage_string_id'], 'object::user') === 0)) {
return false;
}
return true;

100
package-lock.json generated
View File

@@ -14,7 +14,7 @@
"@nextcloud/auth": "^2.3.0",
"@nextcloud/axios": "^2.5.0",
"@nextcloud/capabilities": "^1.2.0",
"@nextcloud/dialogs": "^5.3.3",
"@nextcloud/dialogs": "^5.3.4",
"@nextcloud/event-bus": "^3.3.1",
"@nextcloud/files": "^3.5.1",
"@nextcloud/initial-state": "^2.2.0",
@@ -22,7 +22,7 @@
"@nextcloud/moment": "^1.3.1",
"@nextcloud/notify_push": "^1.3.0",
"@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^8.12.0",
"@nextcloud/vue": "^8.13.0",
"blueimp-md5": "^2.19.0",
"chroma-js": "^2.4.2",
"dompurify": "^3.1.5",
@@ -52,7 +52,7 @@
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.0.0",
"@relative-ci/agent": "^4.2.8",
"@relative-ci/agent": "^4.2.9",
"@vue/test-utils": "^2.4.6",
"@vue/vue2-jest": "^29.2.6",
"cypress": "^13.12.0",
@@ -1994,9 +1994,9 @@
"dev": true
},
"node_modules/@bundle-stats/plugin-webpack-validate": {
"version": "4.13.2",
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.13.2.tgz",
"integrity": "sha512-Rfdipz+uBsAIIDUo1D+ylD0RxXLCcznaxpodz9QCcd0/P5tkD8gnWh1MZcfZmLFaCnxvTyJMdKJHyjIJ7xyCbA==",
"version": "4.13.3",
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.13.3.tgz",
"integrity": "sha512-R7qGmWsWq5rhv/Zu6pS+d1S29gV1rxogl/udmbH/L4LysX+TxcotFENsCKn9J7nNBlmLyqDVZpynfGm14ywXjg==",
"dev": true,
"dependencies": {
"lodash": "4.17.21",
@@ -3525,9 +3525,9 @@
}
},
"node_modules/@nextcloud/dialogs": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.3.3.tgz",
"integrity": "sha512-K5ZdwRch3vrt7ZQXp04rUHGid4GcSeRnG0SkvccwfhiVg85wut9YZd+i2YiMPw+VYURKEjr2ZOK7R5afnViWag==",
"version": "5.3.4",
"resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.3.4.tgz",
"integrity": "sha512-0oWLycHX/T68Ab7xMOlghg3nHZOOldbTwoOmNOSIbAg69Tmpcu90JlRtFa9LKiDf1pWQPqCoh9QeYj10SCEm0w==",
"dependencies": {
"@mdi/js": "^7.4.47",
"@nextcloud/auth": "^2.3.0",
@@ -3876,6 +3876,18 @@
"stylelint-config-recommended-vue": "^1.5.0"
}
},
"node_modules/@nextcloud/timezones": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@nextcloud/timezones/-/timezones-0.1.1.tgz",
"integrity": "sha512-ldLuLyz605sszetnp6jy6mtlThu4ICKsZThxHIZwn6t4QzjQH3xr+k8mRU7GIvKq9egUFDqBp4gBjxm3/ROZig==",
"dependencies": {
"ical.js": "^2.0.1"
},
"engines": {
"node": "^20.0.0",
"npm": "^10.0.0"
}
},
"node_modules/@nextcloud/typings": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.8.0.tgz",
@@ -3891,27 +3903,27 @@
}
},
"node_modules/@nextcloud/vue": {
"version": "8.12.0",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.12.0.tgz",
"integrity": "sha512-MHL12+XGIDvpsSdrJn79pYKYrTVUouEymc4No91lKTNZTWDN6bciDSprmMs553hECXrqj7sfwxu6sepj0zcR3Q==",
"version": "8.13.0",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.13.0.tgz",
"integrity": "sha512-FV0GWSbxkaDQ8S/bWc4XcCXzJfpHzJn4xj0pK/jEwSwdSleBdBFsFFGo+wLCAGoXH5Xf5mHE+LtATFh6wnX7VA==",
"dependencies": {
"@floating-ui/dom": "^1.1.0",
"@linusborg/vue-simple-portal": "^0.1.5",
"@nextcloud/auth": "^2.2.1",
"@nextcloud/axios": "^2.4.0",
"@nextcloud/browser-storage": "^0.4.0",
"@nextcloud/calendar-js": "^7.0.0",
"@nextcloud/capabilities": "^1.1.0",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/initial-state": "^2.1.0",
"@nextcloud/l10n": "^3.0.1",
"@nextcloud/logger": "^3.0.1",
"@nextcloud/router": "^3.0.0",
"@nextcloud/timezones": "^0.1.1",
"@nextcloud/vue-select": "^3.25.0",
"@vueuse/components": "^10.9.0",
"@vueuse/core": "^10.9.0",
"clone": "^2.1.2",
"debounce": "2.0.0",
"debounce": "2.1.0",
"dompurify": "^3.0.5",
"emoji-mart-vue-fast": "^15.0.1",
"escape-html": "^1.0.3",
@@ -3935,6 +3947,7 @@
"vue": "^2.7.16",
"vue-color": "^2.8.1",
"vue-frag": "^1.4.3",
"vue-router": "^3.6.5",
"vue2-datepicker": "^3.11.0"
},
"engines": {
@@ -3966,19 +3979,6 @@
"@floating-ui/core": "^1.0.5"
}
},
"node_modules/@nextcloud/vue/node_modules/@nextcloud/calendar-js": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@nextcloud/calendar-js/-/calendar-js-7.0.0.tgz",
"integrity": "sha512-CvCcO4hFPjMfIB2AKW0QLNYukGoHFS7QQVvIC8khJjzNfVGS6qMJd2oaZtD9Q9w1fLpvwp1X7orcYGYmosDkAA==",
"engines": {
"node": "^20.0.0",
"npm": "^10.0.0"
},
"peerDependencies": {
"ical.js": "^2.0.1",
"uuid": "^9.0.0"
}
},
"node_modules/@nextcloud/vue/node_modules/@types/unist": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz",
@@ -4062,19 +4062,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/@nextcloud/vue/node_modules/uuid": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"peer": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/@nextcloud/vue/node_modules/vfile": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz",
@@ -4200,16 +4187,16 @@
}
},
"node_modules/@relative-ci/agent": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/@relative-ci/agent/-/agent-4.2.8.tgz",
"integrity": "sha512-GbmBZ1LlMkLGkypOakINfSfsrI5l0USom7EFqv9EPHmcKhxWu0TIrnTBhIGPO29A8m9yLKIz9ZTzHCA1ROKF1Q==",
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/@relative-ci/agent/-/agent-4.2.9.tgz",
"integrity": "sha512-VrpE0eHi6DMVnfS5epTzo6Z9aGC3l7QuwqP/h2NQrpKMyXfLjqBrYNVzttHueIqxvLP9FzBXmpYm7OxjcTYJuQ==",
"dev": true,
"dependencies": {
"@bundle-stats/plugin-webpack-filter": "4.13.2",
"@bundle-stats/plugin-webpack-validate": "4.13.2",
"@bundle-stats/plugin-webpack-filter": "4.13.3",
"@bundle-stats/plugin-webpack-validate": "4.13.3",
"core-js": "3.37.1",
"cosmiconfig": "9.0.0",
"debug": "4.3.4",
"debug": "4.3.5",
"dotenv": "16.4.5",
"env-ci": "7.3.0",
"fs-extra": "11.2.0",
@@ -4233,9 +4220,9 @@
}
},
"node_modules/@relative-ci/agent/node_modules/@bundle-stats/plugin-webpack-filter": {
"version": "4.13.2",
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.13.2.tgz",
"integrity": "sha512-FU1i0DYBhIzY2hElvKSSEdazka4lpc9zP2zAYGmOmYkF6g4Omz+1DWH6a7MZv0cZhee8yIxaRNGkGy1R/llmtQ==",
"version": "4.13.3",
"resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.13.3.tgz",
"integrity": "sha512-jMMt2Hz5FgHMBT+52L2zsB14RJBLVjV9UxnFhpd8iH1JWgxTvQFmUG/FpubMdzhIXZx6QAHFslrtCSExgMYgtQ==",
"dev": true,
"engines": {
"node": ">= 14.0"
@@ -7996,9 +7983,9 @@
"license": "MIT"
},
"node_modules/debounce": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/debounce/-/debounce-2.0.0.tgz",
"integrity": "sha512-xRetU6gL1VJbs85Mc4FoEGSjQxzpdxRyFhe3lmWFyy2EzydIcD4xzUvRJMD+NPDfMwKNhxa3PvsIOU32luIWeA==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/debounce/-/debounce-2.1.0.tgz",
"integrity": "sha512-OkL3+0pPWCqoBc/nhO9u6TIQNTK44fnBnzuVtJAbp13Naxw9R6u21x+8tVTka87AhDZ3htqZ2pSSsZl9fqL2Wg==",
"engines": {
"node": ">=18"
},
@@ -8007,9 +7994,9 @@
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
"dependencies": {
"ms": "2.1.2"
},
@@ -11239,8 +11226,7 @@
"node_modules/ical.js": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ical.js/-/ical.js-2.0.1.tgz",
"integrity": "sha512-uYYb1CwTXbd9NP/xTtgQZ5ivv6bpUjQu9VM98s3X78L3XRu00uJW5ZtmnLwyxhztpf5fSiRyDpFW7ZNCePlaPw==",
"peer": true
"integrity": "sha512-uYYb1CwTXbd9NP/xTtgQZ5ivv6bpUjQu9VM98s3X78L3XRu00uJW5ZtmnLwyxhztpf5fSiRyDpFW7ZNCePlaPw=="
},
"node_modules/iconv-lite": {
"version": "0.4.24",

View File

@@ -35,7 +35,7 @@
"@nextcloud/auth": "^2.3.0",
"@nextcloud/axios": "^2.5.0",
"@nextcloud/capabilities": "^1.2.0",
"@nextcloud/dialogs": "^5.3.3",
"@nextcloud/dialogs": "^5.3.4",
"@nextcloud/event-bus": "^3.3.1",
"@nextcloud/files": "^3.5.1",
"@nextcloud/initial-state": "^2.2.0",
@@ -43,7 +43,7 @@
"@nextcloud/moment": "^1.3.1",
"@nextcloud/notify_push": "^1.3.0",
"@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^8.12.0",
"@nextcloud/vue": "^8.13.0",
"blueimp-md5": "^2.19.0",
"chroma-js": "^2.4.2",
"dompurify": "^3.1.5",
@@ -80,7 +80,7 @@
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.0.0",
"@relative-ci/agent": "^4.2.8",
"@relative-ci/agent": "^4.2.9",
"@vue/test-utils": "^2.4.6",
"@vue/vue2-jest": "^29.2.6",
"cypress": "^13.12.0",

View File

@@ -187,7 +187,6 @@ export default {
},
onUpdate: ({ markdown }) => {
if (this.description === markdown) {
this.descriptionLastEdit = 0
return
}
this.description = markdown
@@ -283,7 +282,9 @@ export default {
return
}
this.descriptionSaving = true
await this.$store.dispatch('updateCardDesc', { ...this.card, description: this.description })
if (this.card.id !== undefined) {
await this.$store.dispatch('updateCardDesc', { ...this.card, description: this.description })
}
this.$emit('change', this.description)
this.descriptionLastEdit = 0
this.descriptionSaving = false

View File

@@ -21,8 +21,9 @@
*
*/
namespace OCA\Deck\Activity;
namespace OCA\Deck\Listeners;
use OCA\Deck\Activity\ActivityManager;
use OCA\Deck\Db\Card;
use OCA\Deck\Db\CardMapper;
use OCA\Deck\Db\ChangeHelper;
@@ -31,9 +32,9 @@ use OCP\Comments\CommentsEvent;
use OCP\Comments\IComment;
use PHPUnit\Framework\TestCase;
class CommentEventHandlerTest extends TestCase {
class CommentEventListenerTest extends TestCase {
/** @var CommentEventHandler */
/** @var CommentEventListener */
private $commentEventHandler;
/** @var ActivityManager */
private $activityManager;
@@ -49,7 +50,7 @@ class CommentEventHandlerTest extends TestCase {
$this->notificationHelper = $this->createMock(NotificationHelper::class);
$this->cardMapper = $this->createMock(CardMapper::class);
$this->changeHelper = $this->createMock(ChangeHelper::class);
$this->commentEventHandler = new CommentEventHandler(
$this->commentEventHandler = new CommentEventListener(
$this->activityManager,
$this->notificationHelper,
$this->cardMapper,