audiobookshelf/client
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
..
assets Add base style for button for cursor:pointer, update default btn bg and confirm yes btn color 2025-03-25 17:47:11 -05:00
components Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
cypress Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
layouts Remove providers prefetch, refresh on custom provider add/remove 2025-10-19 11:47:17 +03:00
middleware Add:Series filters #712 2022-10-29 15:33:38 -05:00
mixins 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
pages Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
players Update HLS stream endpoints to not include user token 2025-05-06 17:28:19 -05:00
plugins Merge pull request #5071 from pavel-miniutka/master 2026-02-22 16:19:19 -06:00
static Update material symbols icon font 2024-08-16 16:57:17 -05:00
store Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
strings Add canStream user permission to control streaming access 2026-04-02 14:12:08 -06:00
cypress.config.js Move test files to a separate directory 2024-04-30 11:30:00 +03:00
nuxt.config.js Implement new JWT auth 2025-06-29 17:22:58 -05:00
package-lock.json Version bump v2.33.1 2026-03-19 17:09:14 -05:00
package.json Version bump v2.33.1 2026-03-19 17:09:14 -05:00
postcss.config.js Use separate postcss.config and remove from nuxt.config, uninstall autoprefixer 2025-03-21 09:25:29 -05:00