Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private wiki support? #89

Open
heaveaxy opened this issue Apr 17, 2024 · 7 comments
Open

Private wiki support? #89

heaveaxy opened this issue Apr 17, 2024 · 7 comments

Comments

@heaveaxy
Copy link

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:

  1. I create a bot inside my account on MW.
  2. In extension settings I wrote username and password got on previous step.
  3. Check and correct all other settings - host name, usr schema, api endpoint etc.
  4. Open new tab, write some wikitext.
  5. 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.

@Frederisk
Copy link
Owner

First try Ctrl+Shift+P and then choose Wikitext:Login. Then perform a preview. This should solve the problem.

@heaveaxy
Copy link
Author

Yes, it solved the problem. Thanks!
It will be good to have a note about it in "Usage" section of README.

@heaveaxy
Copy link
Author

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?

@heaveaxy heaveaxy reopened this Apr 19, 2024
@Frederisk
Copy link
Owner

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.

@Frederisk
Copy link
Owner

I might consider releasing a private wiki version later.🤔

@threddast
Copy link

threddast commented Jun 14, 2024

Would it be possible to use this with the OpenIDConnect extension?

threddast added a commit to threddast/Wikitext-Extension-Gadget that referenced this issue Jun 17, 2024
@Frederisk
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants