Wikitext-VSCode-Extension
Wikitext-VSCode-Extension copied to clipboard
Private wiki support?
Hi,
Is it possible to use extension with private wiki where "all" group doesn't have read right? LocalSettings.php contains
$wgGroupPermission['*']['read'] = false;
which cause an error "readapidenied" when trying to use extension. If change it to true extensions works properly.
Steps to reproduce:
- I create a bot inside my account on MW.
- In extension settings I wrote username and password got on previous step.
- Check and correct all other settings - host name, usr schema, api endpoint etc.
- Open new tab, write some wikitext.
- Trying to preview - error "readapidenied".
MW 1.40
In logs of webserver I see one query to api.php every time I run preview. As I know mediawiki requires several queries - one to get token, another one to authorize and finally useful query.
First try Ctrl+Shift+P and then choose Wikitext:Login. Then perform a preview. This should solve the problem.
Yes, it solved the problem. Thanks! It will be good to have a note about it in "Usage" section of README.
Still, there is a problem with authentication when you open arcticle using Wikitext-Extension-Gadget it shows same error even if authentication has prepared using Ctrl+Shift+P and Wikitext:Login. Some additional actions needed?
This part can be a little complicated. Because I originally designed these extensions mainly to provide support for some public wikis.
You need to delete or comment out the following three lines here:
// RemoteBot: ...
// TransferProtocol: ...
// SiteHost: ...
Then recompile it and add the compiled snippet to your preferences.
I might consider releasing a private wiki version later.🤔
Would it be possible to use this with the OpenIDConnect extension?
@heaveaxy @threddast Sorry to bother you, but I would be very grateful if you cloud help me test it.
Instead of doing what I'm saying here. Just change this line to:
RemoteBot: 'false',
Compile and add it to the user script and check if it works properly in a private wiki. If any problems occur, please let me know. Thanks.