audiobookshelf/client/components
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
..
app Update Confirm component to support allowHtml prompt option 2026-03-18 16:51:51 -05:00
cards Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
content Fix item page text overlap on details #4187 2025-04-07 17:19:48 -05:00
controls Display localized/styled text for selected filter. 2025-12-28 11:28:36 -06:00
covers Implement new JWT auth 2025-06-29 17:22:58 -05:00
modals Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
player Fix aria-label for jumpBackward button 2026-01-09 14:26:56 +00:00
prompt Update Confirm component to support allowHtml prompt option 2026-03-18 16:51:51 -05:00
readers Fix epub toc search input colors for themes 2025-07-25 17:31:59 -05:00
stats Update tooltip with plaintext prop 2025-12-12 17:24:01 -06:00
tables Merge branch 'master' into jwt_auth_refactor 2025-07-07 16:50:58 -05:00
ui Merge pull request #4649 from votex001/multi-select-item-fix 2025-12-21 14:58:04 -06:00
widgets Fix item edit modal show next/prev arrows when opening from Files or Match context menu item #4718 2025-10-08 14:52:14 -05:00