33 lines
2.0 KiB
Plaintext
33 lines
2.0 KiB
Plaintext
Kronic room-scoped media permissions v1
|
|
|
|
Target: Kronic original source + patches through kronic-media-history-v1.zip.
|
|
Extract in ~/mediaserver, NOT in its parent directory. Back up replaced files first.
|
|
Restart the media server and refresh/reopen desktop and mobile tabs.
|
|
No database migration or permission reset is required.
|
|
|
|
The previous implementation intersected the room templates and room_media_permissions
|
|
of all assigned rooms. The new HTTP authorization binds each request to a selected
|
|
room and verifies active membership. Instance account restrictions remain global.
|
|
Group media entitlement is checked only for the selected room's parent group.
|
|
Both template and per-user room restrictions are applied only in the selected room.
|
|
Requests without room context only fall back automatically for a single assigned room.
|
|
The browser sends X-Kronic-Room for API calls and kronic_room for local media URLs;
|
|
this ID is not trusted as authorization. Simultaneous tabs have independent scopes.
|
|
Existing platform administrator bypass remains intact.
|
|
|
|
Global library management, cast and unrestricted remote Balroc tools retain the
|
|
previous conservative cross-room restriction gate because they can alter shared
|
|
state and are not scoped to a room. Local AI access and searches are scoped to
|
|
selected-room permissions; local AI conversation identifiers are also room-bound.
|
|
Previously issued external M3U playback URLs no longer validate; regenerate them.
|
|
New signed URLs bind to the issuing account and room and recheck permissions.
|
|
They are still bearer URLs until expiry. Active streams are not forcibly cut off
|
|
when permissions change; subsequent requests recheck membership and permissions.
|
|
|
|
Tests: run with your usual Python environment from ~/mediaserver:
|
|
python test_room_access_scope.py
|
|
python test_admin_upgrade.py
|
|
python test_history_scopes.py
|
|
Tests use temporary SQLite databases and simulated request objects, not your live
|
|
account or media databases. This patch has not been browser-tested in your deployment.
|