Topic on Extension talk:Semantic ACL

Override mediawiki group permissions on private wikis?

4
Sneakers-the-rat (talkcontribs)

Hello again! The extension works great for removing permissions on public wikis (making some pages private), but I can't get the opposite to work - making some pages public on a default private wiki (mw 1.39.1 but i can upgrade!).

I've made the wiki private in the standard way - $wgGroupPermissions['*']['read'] = false;

I've gone through and confirmed that the extension is correctly computing the permission and the expected hooks are called, but still no dice. From reading the PermissionManager.php source, it seems like negative permissions are handled differently - eg. if there is any single check that says permission is denied, then that overrides the rest of them saying permission should be granted.

I know that Lockdown also says that it can only be used to restrict, not grant permissions, but I just have to believe that there is some way to override the permissions checking process! Maybe we would want to put that behind a config variable to check "yes i want Semantic ACL to completely override the rest of the permissions checking process."

Barring that, it should also be possible to remove the GroupPermissions setting if there was a way of setting a default ACL setting - so Semantic ACL controls all permissions, but by default (when unspecified) pages are set to [[Visible to::user]] (or whatever one sets the default permission to be).

Let me know if this is possible! I am willing to PR as well :)

Tinss (talkcontribs)

Browsing through PermissionManager.php, it seems there are enough hooks around to maybe do that. Howerver, I cannot say for sure without actually trying...

The other option would actually be to replace that class with one that is custom to this extension and overrides any method that gets in the way of managing permissions the way we want. That will however make the extension harder to maintain and more prone to breaking when they make updates to MW's core.

That being said, my MW installation defaults to public, so I would not have an easy way to test that code.

Would you be willing to provide a patch ? I will be willing to make sure it does not break existing functionnalities and validate your code.

Sneakers-the-rat (talkcontribs)

Sorry i am yet again seeing this four months later - i'll try again on a patch since permissions have been modified in recent mediawiki versions :)

Tinss (talkcontribs)

Let me know when you're ready for review.

Reply to "Override mediawiki group permissions on private wikis?"