Incoming federated board stays in the database after the receiving user is deleted

Đang mở
#8,794 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

Start with ParticipantCleanupListener, which handles UserDeletedEvent and calls cleanupByParticipant after deleting the user's owned boards. Incoming boards (rows in deck_boards with external_id set) are owned by the remote user and are skipped there. Check how ACL rows for the deleted user are removed. Done means that after the user is deleted, incoming boards with no remaining ACL are also removed, and this is covered by a test. The optional OCM owner notification is a separate step and needs maintainer input.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug
When a user who received a federated board is deleted, their ACL is removed, but the incoming board itself (a deck_boards row with external_id set and the remote owner) stays. Nobody can see it, and it is never cleaned up.

To Reproduce

  1. Share a board from instance A with a user on instance B.
  2. Delete that user on instance B (occ user:delete).
  3. deck_boards on instance B still contains the board with external_id set and no ACL.

Expected behavior
Incoming boards without any remaining local participant are removed.

Suggested fix
Not tested; a direction based on the current code.

ParticipantCleanupListener handles UserDeletedEvent: it deletes the boards the user owns and then calls cleanupByParticipant(Acl::PERMISSION_TYPE_USER, $userId). Incoming boards are owned by the remote user, so they are skipped. After the ACL cleanup, also delete incoming boards (external_id set) that no longer have an ACL. Optionally notify the owner, so the owner's remote participant is removed as well; that would use the same kind of OCM notification as in #8789 (revoking a share).

Server details

Two instances, both Docker, MariaDB 11.8 / MySQL, PHP 8.5.13:

  • Instance A: Nextcloud 35.0.3, Deck 1.19.2
  • Instance B: Nextcloud 34.0.6, Deck 1.18.7

The code paths are unchanged on main (bf65da22e).


This report was drafted with AI assistance (Claude Code) and reproduced on the two instances above.

Ngôn ngữ chính
JavaScript
Star
1.4k
Fork
380
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
72

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/deck

Tất cả issue của nextcloud/deck

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.