audiobookshelf/client/store
zriddle 464b720d9e Add canStream user permission to control streaming access
Adds a per-user "Can Stream" permission mirroring the existing "Can Download"
pattern. Server admins can now disable streaming for specific users, encouraging
local downloads instead. Addresses #2572.

Changes:
- User model: stream permission in mapping, defaults, and getter
- ApiKey model: stream permission in defaults
- Controller: 403 enforcement on playback session creation endpoints
- Frontend: permission toggle in admin UI, play button gated by canStream,
  download button shown when streaming disabled, message when neither allowed
- Tests: 11 Mocha tests (model + controller), 1 Cypress test (card UI)
- Localization: English strings for toggle label and fallback message

The getter uses !== false (rather than !!) so existing users without the
stream key in their permissions JSON default to allowed on upgrade.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 14:12:08 -06:00
..
globals.js Fix Cover modal showing error image for items with no cover, update placeholder cover url to all come from global store 2025-03-27 17:37:25 -05:00
index.js Update item image in audio player when updated on item #4025 2025-04-01 17:32:21 -05:00
libraries.js Remove custom providers from library fetch action 2025-10-19 11:40:40 +03:00
scanners.js Merge provider actions and mutations, add loaded state 2025-10-19 11:39:10 +03:00
tasks.js Fixes + add progress to m4b and embed tools 2024-07-20 12:28:06 +03:00
user.js Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
users.js Fix:Users table activity & cleanup 2022-11-24 14:44:09 -06:00