This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(dashboard-sharing): notifications + bulk management + delete cascade#64
Merged
rubenvdlinde merged 1 commit intoApr 30, 2026
Merged
Conversation
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 20:03 UTC
Download the full PDF report from the workflow artifacts.
…cade per REQ-SHARE-008..013
Adds Nextcloud-native push notifications on share events, PUT /api/dashboard/{id}/shares
(atomic replace-all) and DELETE /api/sharees/{shareType}/{shareWith} (revoke-all-for-recipient),
plus UserDeletedListener that transfers dashboard ownership to the highest-permission sharer
or deletes orphaned dashboards when no fallback owner exists.
acc9455 to
f275fa5
Compare
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 342/342 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-04-30 20:05 UTC
Download the full PDF report from the workflow artifacts.
This was referenced May 1, 2026
rubenvdlinde
added a commit
that referenced
this pull request
May 3, 2026
…cade per REQ-SHARE-008..013 (#64) Adds Nextcloud-native push notifications on share events, PUT /api/dashboard/{id}/shares (atomic replace-all) and DELETE /api/sharees/{shareType}/{shareWith} (revoke-all-for-recipient), plus UserDeletedListener that transfers dashboard ownership to the highest-permission sharer or deletes orphaned dashboards when no fallback owner exists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
INotifier(bell + email) when a dashboard is shared or ownership is transferredPUT /api/dashboard/{id}/shares(atomic replace-all) andDELETE /api/sharees/{shareType}/{shareWith}(revoke-all-for-recipient owned by caller)UserDeletedListeneronUserDeletedEvent: transfers dashboard ownership to highest-permission sharer (user-type → oldest share first; group fallback → alphabetically first group/member) or cascades deletion when no fallback owner existsVersion001006Date20260430130000createsmydash_dashboard_sharestable with optional orphan-cleanup step gated bymydash.cleanup_orphan_sharesadmin configNew files
lib/Db/DashboardShare.php— Entitylib/Db/DashboardShareMapper.php— QBMapper withdeleteNotIn,deleteByOwnerAndRecipient,deleteByRecipientUserlib/Service/DashboardShareService.php— Business logic:replaceShares,revokeAllForRecipient,transferOwnership,notifyShared/notifyOwnershipTransferredlib/Controller/DashboardShareApiController.php—index,create,destroy,replace,revokeForRecipientlib/Listener/UserDeletedListener.php— Event-driven cascade + admin-pool selectionlib/Notification/Notifier.php— Translatable rich notificationslib/Migration/Version001006Date20260430130000.php— Schema migrationtests/Unit/— 15 new PHPUnit tests (all passing)Test plan
composer check:strict— PHPCS, PHPMD, Psalm, PHPStan must pass./vendor/bin/phpunit tests/Unit/Controller/DashboardShareApiControllerFollowupsTest.php tests/Unit/Service/DashboardShareServiceFollowupsTest.php tests/Unit/Listener/UserDeletedListenerTest.php— 15/15 greenPUT /api/dashboard/{id}/shareswith new set → verify diff is applied atomicallyDELETE /api/sharees/user/bob→ verify only caller-owned shares for bob are removedmydash.cleanup_orphan_shares = true→ run upgrade → verify orphan rows removed