Page MenuHomePhabricator

Restrict access to Wikispeech functionality to certain users
Closed, ResolvedPublic1 Estimated Story Points

Description

This was touched on in T180015.

Allow limiting who can use the Wikispeech function through user rights. This will only cover player for now.

This task deals with the MediaWiki side of this while T238327 is for server side.

Remaining Steps

  • Review
  • Update documentation
  • Deploy

Related Objects

Event Timeline

I've done some experimenting with user rights and that part seems pretty straight forward.

I did some more experimenting, this time on calling the TTS server through the wiki. This wasn't too hard to do, by creating a new API action that just sends requests through to the server. This should be able to limit the access if 1) you can limit who is allowed to use certain API actions on the wiki and 2) you can restrict requests to the TTS server to only be allowed from the wiki. I haven't looked into these yet, but I feel like they should be doable.

At least 1) looks doable:

There are several ways to restrict usage of (certain parts of) the API to certain groups of users, or to disable it altogether.

https://www.mediawiki.org/wiki/API:Restricting_API_usage

I think that I've managed to limit the access to the API, but I'm not 100% this is how you're supposed to do it. I posted on Discourse hoping to get some help on this.

I got help from @Tgr and will use the ApiCheckCanExecute-hook.

Sebastian_Berlin-WMSE renamed this task from Restrict access to Wikispeech functionality and TTS-server to Restrict access to Wikispeech functionality to certain users.Dec 3 2019, 11:32 AM
Sebastian_Berlin-WMSE updated the task description. (Show Details)

I have what looks like a working WIP locally. It still needs cleaning up and tests.

Is it possible to allow every user, even if not registered?

Yes, you can give the rights to the "*" group to allow that.

Change 570042 had a related patch set uploaded (by Sebastian Berlin (WMSE); owner: Sebastian Berlin (WMSE)):
[mediawiki/extensions/Wikispeech@master] Add API action for requesting speech synthesis

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

Sebastian_Berlin-WMSE changed the point value for this task from 12 to 8.Mar 19 2020, 9:46 AM
Sebastian_Berlin-WMSE changed the point value for this task from 8 to 4.Mar 31 2020, 7:51 AM
Sebastian_Berlin-WMSE changed the point value for this task from 4 to 1.Apr 2 2020, 9:01 AM

Change 570042 merged by jenkins-bot:
[mediawiki/extensions/Wikispeech@master] Add API action for requesting speech synthesis

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