Page MenuHomePhabricator

Restrict access to Wikispeech functionality to certain users
Open, Needs TriagePublic12 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.

Event Timeline

Lokal_Profil updated the task description. (Show Details)Aug 30 2018, 2:16 PM

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.Tue, Dec 3, 11:32 AM
Sebastian_Berlin-WMSE updated the task description. (Show Details)
Sebastian_Berlin-WMSE set the point value for this task to 12.Mon, Dec 9, 8:50 AM

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.