Sharing sidebar offers federated users when Deck federation is disabled

Đang mở
#8,793 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
Nửa ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, php
Lĩnh vực
backend, frontend

Hướng nghiên cứu

The sharee search types are hard-coded in src/stores/settings.js around line 103, so start there and check where type 6 is added. The payload also points to ConfigService::getAll(), which exposes federationEnabled only to admins, and to lib/Capabilities.php as a place to publish a flag for all users. Done means that with federation disabled, the sharing sidebar no longer offers type 6 results, and that the frontend reads the flag the backend now provides. The fix location is untested, so confirm it by reproducing on a local instance first.

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

Mô tả

Describe the bug
The sharee search always requests share types [0, 1, 6, 7], so federated users (type 6) are offered even when Deck federation is disabled:
https://github.com/nextcloud/deck/blob/bf65da22e13a366c70c72391beaee00ed2152810/src/stores/settings.js#L103

Selecting one fails with "Federation is disabled" (400), and the sidebar only shows "Failed to create share with …".

To Reproduce

  1. Leave Deck federation disabled.
  2. In a board's sharing sidebar, type a federated cloud ID such as [email protected].
  3. It is offered as a result; selecting it fails.

Expected behavior
Federated users are only offered when Deck federation is enabled.

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

The frontend cannot see the setting today: ConfigService::getAll() only returns federationEnabled to admins. Expose it to every user, for example as a federationEnabled flag in the deck capability (lib/Capabilities.php) or by returning it from getAll() for all users. Whether federation is enabled is not sensitive. Then only include share type 6 in src/stores/settings.js when the flag is true.

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.