Extension:PrivatePageProtection
![]() | MediaWiki was not designed to support per-page or partial-page access restrictions. If you require this level of control, you are strongly advised to use a content management system that supports it natively.
Patches or third-party extensions claiming to provide access control may contain security flaws, potentially exposing confidential data. Use them at your own risk. Neither the MediaWiki developers nor the Wikimedia Foundation are responsible for any data leaks that may result. This message is added to all extensions of this nature and may not reflect the actual security status of this extension. For more information, see Security issues with authorization extensions . |
![]() Release status: betaCategory:Beta status extensions |
|
---|---|
Implementation | User rightsCategory:User rights extensions, Parser extensionCategory:Parser extensions |
Description | Implements per-page access permissions based on user groups |
Author(s) | Daniel Kinzler (Duesentriebtalk) |
Latest version | 1.2 (2023-10-14) |
MediaWiki | 1.39+Category:Extensions with manual MediaWiki version |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | Category:Extensions in Wikimedia version control |
Translate the PrivatePageProtection extension if it is available at translatewiki.net |
The PrivatePageProtection extension implements a way to restrict access to specific pages using a parser function. Using that parser function, the user groups that should have access to the page can be listed directly in the page.
Usage
To restrict access to a page, add this text to the top of the article you want to restrict access to:
{{#allow-groups:sysop}}
would restrict access to the sysop group.
{{#allow-groups:autoconfirmed|emailconfirmed}}
restricts access to members of the autoconfirmed and emailconfirmed groups.
Installation
- Download and move the extracted
PrivatePageProtection
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PrivatePageProtection
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'PrivatePageProtection' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
See also
- Extension:Lockdown for locking entire namespaces, special pages and actions.