Extension:PageOwnership
![]() | If you need per-page or partial page access restrictions, you are advised to install an appropriate content management package. MediaWiki was not written to provide per-page access restrictions, and almost all hacks or patches promising to add them will likely have flaws somewhere, which could lead to exposure of confidential data. We are not responsible for anything being leaked.
For further details, see Security issues with authorization extensions |
![]() Release status: beta |
|
---|---|
Implementation | Hook , Special page |
Description | Implements page ownership based on users and groups through a user-friendly interface, supports cache and Semantic MediaWiki |
Author(s) | (thomas-topway-ittalk) |
Latest version | 1.0.0 (2022-02-15) |
MediaWiki | 1.35+ |
License | GNU General Public License 2.0 or later |
Download | GitHub: Note: |
|
|
|
|
PageOwnership implements page ownership of standard Wiki articles based on users and groups through a user-friendly interface, supports transclusion, cache and Semantic MediaWiki.
Installation[edit]
- Download from Github and place the file(s) in a directory called
PageOwnership
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'PageOwnership' );
- Run
php maintenance/update.php
(this will install the required tables) Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Features[edit]
Assigning permissions[edit]
Permissions can be set through a user-friendly interface. It is possible to assign multiple sets of permissions to specific pages. Each set of permissions contains the list of users or groups granted with the same privileges, the role (editor, reader, admin) and some options, specifically "edit", "create", "manage properties" and "subpages". The option "manage properties" is available only if the extension PageProperties is installed, and of course when the role is "admin" the options are enabled by default and they are disabled (except "subpages") when the role is "reader". (an "admin", by contrast to an "editor", can assign other users with permissions on the related page)
List of permissions[edit]
In the List of permissions page (accessible both from the action menu on top of Wiki articles and from the list of Special:SpecialPages of the Wiki) you can find the list of assigned permissions related to that specific page or throughout all the Wiki (when accessed from the list of Special Pages) and of course to assign new permissions and editing existing ones.
![]() | Once you assign a permission to a page, that page is considered an "owned page", and therefore it will be only accessible/editable by the granted users! |
(in the scenario above the editing of the page has been granted to the group "Interface-admin" plus to 2 specific users, and the access to the page has been granted to all visitors)
The centralized list of permissions (when accessed from the list of Special Pages instead than from the action menu on top of Wiki articles) can be filtered and includes fields with the related page and the user who created the permission.
[edit]
PageOwnership creates a list of pages to which logged-in registered users have been assigned (as users, not as members of a group) in the standard navigation panel, so that they can quickly navigate to such pages.
Magic word/parser function[edit]
PageOwnership includes a Magic word/parser function (called either using {{pageownership userpages}}
or {{#pageownership userpages:}}
) (case insensitive) to display the list of pages assigned to the logged-in registered user. This can be used by other templates for various purposes.
Configuration[edit]
Besides protection based on ownership of specific pages, PageOwnership allows to set additional permissions to regular pages (i.e. pages on the main namespace which have not been assigned to anyone). To do so, just grant desired users or groups with the right pageownership-caneditunassignedpages
$wgGroupPermissions['*']['pageownership-caneditunassignedpages'] = false;
$wgGroupPermissions['user']['pageownership-caneditunassignedpages'] = true;
(the settings above will deny anonymous users from editing regular pages, while it will be allowed to registered users)
![]() | You can also set restrictive permissions on LocalSettings.php and then assigning specific users to the group "admin (Page Ownership)" or "editor of unassigned pages (Page Ownership)" through the standard Special:UserRights page! |
See also[edit]
- Page specific user rights extensions
- Beta status extensions
- Hook extensions
- Special page extensions
- GPL licensed extensions
- Extensions in GitHub version control
- ArticleDeleteComplete extensions
- BeforePageDisplay extensions
- BeforeParserFetchTemplateRevisionRecord extensions
- LoadExtensionSchemaUpdates extensions
- MagicWordwgVariableIDs extensions
- PageRenderingHash extensions
- PageSaveComplete extensions
- ParserFetchTemplate extensions
- ParserFirstCallInit extensions
- ParserGetVariableValueSwitch extensions
- ParserOptionsRegister extensions
- RejectParserCacheValue extensions
- SMW::Store::AfterQueryResultLookupComplete extensions
- SkinBuildSidebar extensions
- SkinTemplateNavigation extensions
- GetUserPermissionsErrors extensions
- All extensions
- Semantic MediaWiki extensions