[08:57:48] hmm wonder if I could use OpenSearch instead of ES for Elastica/CirrusSearch [18:34:48] Is there a way to prevent any user from editing pages in a namespace using the wiki UI and restrict editing to API-only? [18:38:45] I'll be writing a Web app for editing, I would like to have the edit links go to that app [18:53:48] you'd have to use a hook, https://www.mediawiki.org/wiki/Manual:Hooks/getUserPermissionsErrorsExpensive would probably work [18:55:24] Okay [19:02:33] Why does the hook name say "expensive"? [19:02:38] Will it slow the wiki down? [19:03:15] I guess I could just tell users "don't edit the Blog namespace"; there will probably never be more than 50 users and I have to create their accounts [19:03:31] no [19:03:57] there are two permissions hooks, getUserPermissions and getUserPermissionsExpensive [19:04:40] getUserPermissionsExpensive is for when you want to check if a use absolutely definitely can or can't do something, because they're currently trying to do it [19:05:20] getUserPermissions is for things like UI buttons, where it doesn't matter exactly if we show someone "Edit" instead of "View source" [19:05:58] s/getUserPermissions/getUserPermissionsErrors/g [19:08:04] it's not expensive to use the hook, but you can use expensive queries in the handler [19:13:07] Oh okay [19:14:24] So my code would check if the page was in the Blog namespace (if not it should allow the edit), and then chech if it was an API edit (if the page is in the Blog namespace, only API edits should be allowed)? [19:14:46] It's not for security; it's just to prevent accidental changes [19:16:28] in that case it might be easier to only hide the "Edit" tab, instead of messing with permissions [19:16:33] using https://www.mediawiki.org/wiki/Manual:Hooks/SkinTemplateNavigation::Universal [19:16:50] Oh okay, that would work [19:16:56] and do something like: unset( $links['actions']['edit'] ); [19:17:00] Could I change the URL to point to my web app? [19:17:02] (i hope tht works, i haven't tested) [19:17:14] yeah, you could change $links['actions']['edit']['href'] [19:17:23] Okay, thank you! [19:17:34] at least i think so! haven't tested :D [19:17:43] Okay, no problem. [19:18:15] If the web app is hosted on the same domain as the wiki, will it be possible to use the API without dealing with authentication? [20:11:07] kj7rrv: yes [20:23:53] Okay thank you!