Sharing sidebar offers federated users when Deck federation is disabled

Aperta
#8,793 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, php
Ambito
backend, frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
1.4k
Fork
380
Merge medio
1g 17h
PR unite (30g)
72

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/deck

Tutte le issue di nextcloud/deck

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.