Extension:PageOwnership


MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
PageOwnership
Release status: stable
Implementation Hook , Special page
Description Implements page ownership based on users and groups through a user-friendly interface, supports transclusion, cache and Semantic MediaWiki
Author(s) (thomas-topway-ittalk)
Latest version 1.0.2 (2022-10-22)
MediaWiki 1.35+
License GNU General Public License 2.0 or later
Download
Quarterly downloads 8 (Ranked 159th)
Translate the PageOwnership extension if it is available at translatewiki.net

PageOwnership implements page ownership of standard Wiki articles based on users and groups through a user-friendly interface, supports transclusion, cache and Semantic MediaWiki.

When a page is assigned to one or more "owner", by default the page becomes accessible only to users who have been granted with read or edit permissions through the interface below.

The extension also defines the right "Can edit unassigned pages (Page Ownership)" in order to allow sysops (or members of the group "editor of unassigned pages (Page Ownership)") to determine which users are allowed to edit or create unassigned pages.

By this way, the entire wiki becomes virtually composed on the one hand of all of the pages explicitly managed by specific users (namely "owned" by them) and on the other of all the unassigned pages managed by sysops or users with specific rights (find out more in the section #Implicit moderation & use-cases)

PageOwnership-menutop.png


InstallationEdit

Download and place the file(s) in a directory called PageOwnership in your extensions/ folder.

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.


  Warning: Do not use this extension to secure sensitive information! It has not been designed to do so and data could be accessed elsewhere. When used to prevent access to specific pages, only use it as a way to moderate contents before their actual publishing!


FeaturesEdit

PageOwnership allows to assign pages and sub-pages to specific users, specific groups or any combination of the two, with specific roles and permissions, through a user-friendly control panel.

This also allows to enforce an implicit moderation on your wiki. You don't directly moderate pages (or page versions) as in FlaggedRevs or Approved Revs, instead, you assign a page and its sub-pages to authorized user(s) or group(s) which can edit them. When the page is ready for publishing, either you grant the access to it to everybody (assigning '*' as reader), or you provide the actual editors with admin privileges related to that page.


Assigning permissionsEdit

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", and "subpages". (of course when the role is "admin" the options are enabled by default, and when the role is "editor" they are all disabled except "subpages"). Finally, an "admin", by contrast to an "editor", can assign other users with permissions on the related page.

 



List of permissionsEdit

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.



 

(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.

 



Navigation panelEdit

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.

 



Implicit moderation & use-casesEdit

Moderation or the safeguard of "protected spaces" is a critical aspect for many WIKIs. PageOwnership allows to enforce an implicit moderation on your wiki using the same mechanism used for privileges, plus optionally the use of the global parameter $wgPageOwnership­OnCreate­UnassignedPage­AssignTo, by which newly created pages can be automatically assigned both to one or more admins, and to the user who is creating the page as an editor. By this way, the page remains only accessible to admins or editors of the page until other users are not granted with the reader privilege.

Here are some use-cases for the extension.

  • (Permissive) Standard users can create new unassigned pages (pages which haven't been assigned to anyone) and once created they will be visible to everyone
$wgGroupPermissions['*']['pageownership-caneditunassignedpages'] = true;
$wgGroupPermissions['user']['pageownership-caneditunassignedpages'] = true;
  • (implicit moderation) Registered users can create new unassigned pages and they will be accessible and editable only by them and the auto-assigned admins. When you are happy with those pages the admins can grant the access to everyone or grant the auto-assigned editors with admins privileges.
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['pageownership-caneditunassignedpages'] = false;
$wgGroupPermissions['user']['pageownership-caneditunassignedpages'] = false;
$wgPageOwnershipOnCreateUnassignedPageAssignTo = 'sysop';
  • (restrictive) Standard users cannot create new pages. You have to provide a form from which to collect the requests for "new ownership" from users and then to assign the permissions to them manually.
$wgGroupPermissions['*']['pageownership-caneditunassignedpages'] = false;
$wgGroupPermissions['user']['pageownership-caneditunassignedpages'] = false;
  • (subpages) Settings as above, but you create a set of owned subpages (for instance assigned to an admin) with create privilege, so new users can create new pages only in specific paths of your wiki.


Magic word/parser functionEdit

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.

ConfigurationEdit

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)


Global parameters

variable description default
$wgPageOwnershipAdmins array of usernames or groups with all permissions sysop
$wgPageOwnershipOnCreateUnassignedPageAssignTo array of usernames or groups to which a newly created unassigned page will be automatically assigned null

See alsoEdit