1266 private vods are still publicly listed #1340
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
To prevent streams marked as "private" from being list anywhere (home page, course page and playlist) for a non course admin user. #1266 should be fixed with this.
(Currently they are listed, but unauthorized visiting of the stream is then blocked by a 403 page)
Description
Changes are done to backend APIs. Private streams of one course are filtered out in the responses, if the user is not admin of that course.
Steps for Testing
I tested using the example database setup, with:
(Note that VL 2 is more recent than VL 1)
Pre-steps:
Tests:
Additional tests:
Marking a stream without VoD (currently live, or planned in the future) as private is currently not supported, but can be done by direct edition in the database. If one does so, the private live stream / future lecture is as well then not listed
Screenshots
1. Home page
As admin:


As student:
2. Course page
As admin:


As student:
3. Playlist
As admin:


As student: