Extension talk:PageOwnership
The Add Permission Page is not loading when it is clicked
editWhen going to any aspect of wiki_name/Special:PageOwnershipPermissions and hitting the add permissions button, it only reloads the page.
Tevarm (talk) 20:41, 10 April 2023 (UTC)
- Also, having checked out the MySQL server, while the table has been created, despite having assigned a user to PageOwnership_admin in the user rights folder, nothing has been changed in the database. The extension looks very interesting though & I hope I can get it to work. Tevarm (talk) 23:29, 10 April 2023 (UTC)
- @Tevarm I'm sorry, I haven't noticed the message until now, I will check it as soon as possible Thomas-topway-it (talk) 08:20, 1 May 2023 (UTC)
- @Tevarm what version of MW are you using, and what skin ? Thomas-topway-it (talk) 08:22, 1 May 2023 (UTC)
- Sorry I hadn't logged in in a while, I was (And still am) on 1.39.2, I ran the update.php to add the relevant stuff to the database, but I was getting a mix of lack of responses & database errors when I tried using the extension. When I tried checking out what was going on in the database it seemed like the skeleton of the extensions requirements was created, but nothing actually happened in the database when I did things on the website.
- I've moved on to using other methods/extensions etc at this point so I sadly can't get you a completely accurate rundown of what happens when I use the extension now or what it looked like when I was testing it. Tevarm (talk) 03:08, 11 May 2023 (UTC)
- @Tevarm I have tested on a fresh installation (although not yet on 1.39.2) and for me it works well. Are you using postgres ? I understand that you have switched to another extension, however in order to solve this I need to have the PHP & Javascript console debug stack trace. Also, for some reason I'm not receiving notifications from your messages, so it got delayed Thomas-topway-it (talk) 07:50, 13 May 2023 (UTC)
- @Tevarm I've uploaded a new version for MW 1.39.3 that should fix the issue. Here is the link to test it Thomas-topway-it (talk) 08:52, 20 May 2023 (UTC)
Remove "My pages" sidebar
editHow can I remove the 'My pages' sidebar? I have a list that has become too long in the 'My pages' sidebar. Zjnlive (talk) 17:42, 30 August 2023 (UTC)
- @Zjnlive I'm sorry, I did not receive this message. I'll publish an update with an additional parameter to hide "my pages" as soon as possible Thomas-topway-it (talk) 13:06, 24 October 2023 (UTC)
- @Zjnlive added a global parameter to disable this in the latest version, see here Extension:PageOwnership#Global parameters Thomas-topway-it (talk) 17:15, 17 December 2023 (UTC)
Subpages not working
editI set the following permissions for a certain page:
username or groups | Permissions type | Additional rights | Add permissions | Remove permissions |
---|---|---|---|---|
(all), Users | ||||
Foouser | Reading, Editing, Management, Administration, Technical |
In my understanding the page should only be accessible from Foouser, but subpages should not. In addition no other user should be able to access the page itself (including subpages).
In fact Foouser can access subpages. In addition other users cannot access the page itself, but subpages are accessible!
Additional info:
- Mediawiki: 1.40.0 (also tested with V1.39.2)
- PHP: 8.0 (also tested with 7.4)
- PageOwnership: V1.1.0b
- Permissions in LocalSettings.php:
- $wgGroupPermissions['*']['createaccount'] = false;
- $wgGroupPermissions['*']['edit'] = false;
- $wgGroupPermissions['*']['read'] = false;
212.186.241.162 23:53, 3 September 2023 (UTC)
- @212.186.241.162 I did not see this message, I'll double check and publish an update as soon as possible Thomas-topway-it (talk) 13:07, 24 October 2023 (UTC)
- @212.186.241.162
- fixed, I'm sorry for the delayhttps://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/PageOwnership/+/ebafdaa357dcb9b9a46dabdf49c49d39f614bbd0
- I have simplified how subpages permissions work, now there is only 1 additional permission to set, "pageownership-include-subpages", to inherit the permission of parent page Thomas-topway-it (talk) 22:40, 11 December 2023 (UTC)
- Hi Thomas, I can't get the subpages to work.
- Page i have are Main Page, Page1 under Main Page and Page2 under Page1
- Users i have are TestNegative which is only in users group and TestPositive which is in the TestPP and users groups.
- I have set the following permissions
- Users | | | | | | (to stop any users from doing anything)
- Users |Reading | | | Main Page | (to allow all users to read the top/main page)
- TestPP | Reading, Editing | Includes subpages (Page Ownership) | | | Page1 | (to allow users in this group to read/edit this page and its subpages)
- Both users can read the Main Page (correct),
- TestNegative can do nothing else (correct),
- TestPositive can follow the link to Page1 and no other links under Main Page (correct)
- TestPositive cannot follow the link to Page2 from Page1 (not correct).
- Have i configured this incorrectly? Df232 (talk) 18:04, 23 February 2024 (UTC)
- @Df232 in the file includes/PageOwnership.php can you try to change the following
foreach ( $row['permissions_by_type'] as $type ) {
if ( in_array( $right, self::$PermissionsByType[$type] ) ) {
$ret = true;
break 2;
}
}
- with the following
foreach ( $row['permissions_by_type'] as $type ) {
if ( in_array( $right, self::$PermissionsByType[$type] ) ) {
$ret = true;
break 3;
}
}
- I'm uploading a patch right now Thomas-topway-it (talk) 12:56, 24 February 2024 (UTC)
- and below
break
tobreak 2
Thomas-topway-it (talk) 13:01, 24 February 2024 (UTC)- https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/PageOwnership/+/69c4debfa8df658f0da0d2b06c897e4224c255ea Thomas-topway-it (talk) 13:12, 24 February 2024 (UTC)
- thanks for this however it still doesn't appear to work. I have changed break 2 to break 3 as above. I can access the first level down of subpage but not the 2nd 176.35.99.249 18:54, 12 March 2024 (UTC)
- have you tried to download the last version ? If it does not work can you please post a screenshot with the permissions setting for each page/subpage ? thank you Thomas-topway-it (talk) 09:40, 13 March 2024 (UTC)
- (or send it to my email address) Thomas-topway-it (talk) 08:45, 16 March 2024 (UTC)
- Thanks Thomas, it is sorted. Needed to create subpages and not assume that pages under a page are automatically subpages. 31.125.97.219 18:22, 23 July 2024 (UTC)
- so with "under a page" you rather mean "a page linked to by the calling page", is it correct ? So a subpage is a page which shares the portion before the slash with the parent page, for instance "page a/page b" is subpage of "page a" if "page a" exists Thomas-topway-it (talk) 18:57, 23 July 2024 (UTC)
- Thanks Thomas, it is sorted. Needed to create subpages and not assume that pages under a page are automatically subpages. 31.125.97.219 18:22, 23 July 2024 (UTC)
- (or send it to my email address) Thomas-topway-it (talk) 08:45, 16 March 2024 (UTC)
- have you tried to download the last version ? If it does not work can you please post a screenshot with the permissions setting for each page/subpage ? thank you Thomas-topway-it (talk) 09:40, 13 March 2024 (UTC)
- thanks for this however it still doesn't appear to work. I have changed break 2 to break 3 as above. I can access the first level down of subpage but not the 2nd 176.35.99.249 18:54, 12 March 2024 (UTC)
- https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/PageOwnership/+/69c4debfa8df658f0da0d2b06c897e4224c255ea Thomas-topway-it (talk) 13:12, 24 February 2024 (UTC)
- and below
Undefined property notice
editI do not know if this is connected to the issue above (subpages not working), but when activating this extension I get these warning(s). When deactivating they are gone, so I assume it is something within the extension. I get this with 1.39.2 and with 1.40.0 (same installation as above).
Notice: Undefined property: MediaWiki\Title\Title::$getText in ...wikidir.../includes/debug/DeprecationHelper.php on line 211
Notice: Undefined property: MediaWiki\Title\Title::$getText in ...wikidir.../includes/debug/DeprecationHelper.php on line 211
Notice: Undefined property: MediaWiki\Title\Title::$getText in ...wikidir.../includes/debug/DeprecationHelper.php on line 211
212.186.241.162 07:32, 4 September 2023 (UTC)
Doesn't seem to apply permissions to user.
editusername or groups | Permissions type | Additional rights | Add permissions | Remove permissions | |
---|---|---|---|---|---|
Username | Reading, Editing, Management, Administration | Perform CAPTCHA-triggering actions without having to go through the CAPTCHA |
I have these permissions set on a page. With these, I would expect that the user would have the option to delete the page and edit permissions on it, but those options don't appear for the user. The user is in the users and autoconfirmed users group. Am I maybe missing some prerequisite configurations? Alex.allgood (talk) 17:03, 4 April 2024 (UTC)
- @Alex.allgood sorry for late reply. Regarding edit permissions you have to add
Can edit permissions (Page Ownership)
(Additional rights), while regarding the delete permissions, you are right, I have identified the issue, which is the following
$checks = [ [ $this, 'checkQuickPermissions' ], [ $this, 'checkPermissionHooks' ], [ $this, 'checkSpecialsAndNSPermissions' ], [ $this, 'checkSiteConfigPermissions' ], ];
(MediaWiki\Permissions\PermissionManager) 'checkQuickPermissions', which overrides 'checkPermissionHooks' (PageOwnership), I think I have now found a solution Thomas-topway-it (talk) 19:22, 20 April 2024 (UTC)
- @Alex.allgood It should now be fixed (latest version) Thomas-topway-it (talk) 05:28, 21 April 2024 (UTC)
SQLite not supported?
editHello, Is this extension not supported for sqlite? Pandrlak9 (talk) 20:41, 8 May 2024 (UTC)
- it should, but there could be issues if the wiki tables use a prefix Thomas-topway-it (talk) 06:43, 9 May 2024 (UTC)
- I have also not been able to get this working with SQLite. Running the maintenance/update.php script does not initialize the extension, and attempting to use the extension results in a database error.
- This is on a fresh install of MW 1.41.1. Agentdoge (talk) 20:40, 22 May 2024 (UTC)
- I was able to get it running with manually creating file specified for sqlite sql for the table creation. However, the whole extension seem to be working with "sets", which isn't built in sqlite implementation, so I abandoned the extension. Pandrlak9 (talk) 16:00, 26 May 2024 (UTC)
- Did you find an alternative extension that fit your needs? Agentdoge (talk) 17:39, 29 May 2024 (UTC)
- @Pandrlak9 @Pandrlak9 the extension could support sqllite as well, see here https://stackoverflow.com/questions/6979813/alternative-to-find-in-set-in-sqlite currently I don't plan to implement it, but if you would like to implement it feel free to contact me at the email address support at topway.it Thomas-topway-it (talk) 07:15, 6 June 2024 (UTC)
- Did you find an alternative extension that fit your needs? Agentdoge (talk) 17:39, 29 May 2024 (UTC)
- I was able to get it running with manually creating file specified for sqlite sql for the table creation. However, the whole extension seem to be working with "sets", which isn't built in sqlite implementation, so I abandoned the extension. Pandrlak9 (talk) 16:00, 26 May 2024 (UTC)
Read permissions don't work??
editIn my LocalSettings.php I have users set to not be able to view0 pages (except whitelisted ones) by removing their read
permission. I then have a group with no rights by default defined by the PageOwnership extension so that when a user is added to this group, they can view the pages specified in the permissions menu. However, even after adding the user to the group, the user still can't view the page. Am I doing something wrong, or is the extension bugged? 2601:58B:4800:4D6D:EE99:E4DB:E03F:CA8B 18:16, 14 June 2024 (UTC)
- if the group has not rights (including read) they shouldn't be able to read pages. Could you send a screenshot with the current set of permissions ? Thomas-topway-it (talk) 07:38, 15 June 2024 (UTC)
- I later found the issue: the PageOwnership plugin works via restricting permissions granted by default; not by granting permissions denied by default. Cool plugin however!!! 2601:58B:4801:C090:596B:A6F8:CEDF:B055 03:04, 24 June 2024 (UTC)