Implement a check for if a given revision id is publicly available, i.e. not hidden by RevisionDelete. This will be used in several places when synthesizing utterances and presenting them to the user. This will likely be the first function to be implemented in SpeechStore.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Lokal_Profil | T246080 ☂Re-architecture storage of utterances | |||
Resolved | Sebastian_Berlin-WMSE | T248162 Use revision and segment ID as input for synthesizing speech | |||
Resolved | Lokal_Profil | T246084 Add check for publically available revisions |
Event Timeline
I have implemented a check for revision visibility. It became clear when I looked at the segmenting API that it's not needed here, which was the first place it would be used. It uses functions that already checks visibility (WikiPage::getLatest()).
The new will most likely be used later on, so it should be saved somewhere that isn't just locally. I don't know how this can be done in Gerrit. Maybe a WIP branch?
For now, make a patch of what's been implemented so far and mark it as WIP in Gerrit.
Update on the current situation.
- Segmenter will only segment current versions of a page, BUT it allows already segmented cached revisions to be accessed. It does NOT provide a check to see if the user has the right to view these. If no revisionId is provided the current version is used. Segmenter is only publically accessible through ApiWikispeech and ApiWikispeechListen.
- ApiWikispeech calls Segmenter but only provides the page title, not the revisionId. As a result there is no access to deleted/suppressed revisions.
- ApiWikispeechListen calls Segmenter with a revisionId BUT checks that the revision is the current one. As a result there is no access to deleted/suppressed revisions.
Future:
- With T261753: Allow listening to page even if edited ApiWikispeechListen will need to provide access to older revisions. This needs to be implemented in a way which does not give access to deleted/suppressed revisions.
- A comment should be added to Segmenter.segmentPage() to clarify that the caller is responsible for making sure the user has the right to view the page/revision.
Change 623983 had a related patch set uploaded (by Lokal Profil; owner: Lokal Profil):
[mediawiki/extensions/Wikispeech@master] Add note about access responsibility
Change 623654 had a related patch set uploaded (by Lokal Profil; owner: Lokal Profil):
[mediawiki/extensions/Wikispeech@master] [WIP]Allow listening to article post edit
Change 623983 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Add note about access responsibility
Change 623654 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Allow listening to page even if edited