Extension talk:PrivatePageProtection
Contents
| Thread title | Replies | Last modified |
|---|---|---|
| Can't find snapshot. | 1 | 09:06, 22 March 2013 |
| Extension not working | 1 | 09:43, 23 February 2013 |
| Bug Resolved | 0 | 08:44, 22 October 2012 |
| Suggestion: information about restriction in footer (or similar) | 0 | 14:18, 11 June 2012 |
| Wrong vartype on db result | 0 | 19:35, 11 May 2012 |
| Doesn't Work | 0 | 04:12, 30 January 2012 |
Can't find snapshot on provided link.
Is there any change in name or this extension is just removed from mediawiki repo?
Hi. I followed the installation instructions. PrivatePageProtection is shown under the Special Pages:Version section.
This is the test I made:
Users: User A: administrator User B: non-administrator
I created a page and added: {{#allow-groups:sysop}}
User B can still access the page. Not sure what I'm doing wrong here..
I also created a new group called group1 by adding this line to LocalSettins.php:
wgGroupPermissions['group1']['read'] = false;
I added User A to group1, and then tried to restrict access to the page by including:
{{#allow-groups:group1}}
However, I can't even save the page.. seems like the extension doesn't recognize this custom-made group.
Please help.
Thanks!
Hi, I think it should be wgGroupPermissions['group1']['read'] = true;. Cheers,
Open PrivatePageProtection.php
under the function:
function privateppGetAccessError( $groups, $user ) {
under line 115:
if ( is_string( $groups ) ) $groups = explode('|', $groups);
add
if(! is_string( $groups ) && strpos($groups[0], '|') !== false) $groups = explode('|', $groups[0]);
then the extension works fine.
Hi,
what do you think about an information in the footer, telling me the allowed groups permanently? Currently I have to edit the page each time, to find out the allowed groups. It will be great, if you can show it for example in the footer or elsewhere. Perhaps you can tell me, how to get it.
Thank you!
Hello Duesentrieb,
there is a bug in your actual code. The db result from privateppGetAllowedGroups returns as an array, but the calling methods expect a string. After fixing this problem (return $result[0] instead of return $result), the extension runs fine.
Ver: MW 1.18.1 OS: Windows and Linux
It doesn't work. You can goto https://offgridops.org/foreclosurepedia/index.php/A2ZFS to better understand. In the view source it posts:
{{#allow-groups:fcpd}}
You do not have permission to edit this page, for the following reasons: The action you have requested is limited to users in one of the groups: Users, fcpd. The action you have requested is limited to users in the group: fcpd.
Yes, I set the group up:
$wgGroupPermissions['fcpd']['move'] = true; $wgGroupPermissions['fcpd']['move-subpages'] = true; $wgGroupPermissions['fcpd']['move-rootuserpages'] = true; // can move root userpages //$wgGroupPermissions['user']['movefile'] = true; // Disabled for now due to possible bugs and security concerns $wgGroupPermissions['fcpd']['read'] = true; $wgGroupPermissions['fcpd']['edit'] = true; $wgGroupPermissions['fcpd']['createpage'] = true; $wgGroupPermissions['fcpd']['createtalk'] = true; $wgGroupPermissions['fcpd']['writeapi'] = true; $wgGroupPermissions['fcpd']['upload'] = true; $wgGroupPermissions['fcpd']['reupload'] = true; $wgGroupPermissions['fcpd']['reupload-shared'] = true; $wgGroupPermissions['fcpd']['minoredit'] = true; $wgGroupPermissions['fcpd']['purge'] = true; // can use ?action=purge without clicking "ok" $wgGroupPermissions['fcpd']['sendemail'] = true;