Page MenuHomePhabricator

Add check for publically available revisions
Closed, ResolvedPublic

Description

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.

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?

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?

Will be needed once synthesizing depends on page rather than passed text.

Lokal_Profil changed the point value for this task from 16 to 8.Mar 19 2020, 9:35 AM

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

https://gerrit.wikimedia.org/r/623983

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

https://gerrit.wikimedia.org/r/623654

Lokal_Profil changed the task status from Stalled to Open.Sep 3 2020, 9:52 AM

Change 623983 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Add note about access responsibility

https://gerrit.wikimedia.org/r/623983

Change 623654 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Allow listening to page even if edited

https://gerrit.wikimedia.org/r/623654