Help:Edit protection

From semantic-mediawiki.org
Fig 1. - Using the "protect" action via the user interface
Fig 2. - Note about the protection status on the protected page when trying to edit without permission
Fig 3. - Note that edit protection is inactive on the wiki
Fig 4. - Icon showing the protection status of the page

Semantic MediaWiki 2.5.0 provides an integration12 with MediaWiki's page protection functionality to help avoid changes to properties or other data sensitive pages from alterations that may cause data invalidations (e.g. change of a property type, inconsistent specifications etc.) or process disruptions.

Objective[edit]

The objective is to allow a data curator to promote an editing process that avoids accidental modifications and helps keeping specifications or data structures consistent to the point where it is changed by a user with an appropriate authorization.

For example, in case Semantic MediaWiki is used to create and manage ontologies3, protecting instances that describe those concepts from unauthorized changes is vital to ensure the stability of provided descriptions.

Features and limitations[edit]

In the following section, any references made to the right is done with an understanding that the $smwgEditProtectionRight configuration parameter contains an appropriate assignment (and for the examples below uses user right "smw-pageedit" as default).

  • The predefined special property "Is edit protected" 1 generally indicates the protection status against the assigned right and further allows pages to be queryable that contains an edit protection.
  • The protection level is checked against the user right "edit", "move", "delete", and "upload" to avoid changes to content that is protected by the assigned right.
  • The protection status is indicated with an lock icon on the top right of the respective page (see fig. 4). On property pages also and additional highlighted message is shown informing about the respective protection status (see figs. 2 and 3).

The expected behavior of the "protect" action (&action=protect) and special property "Is edit protected" are outlined as:

Using the "protect" action[edit]

  • If in the protect form the "smw-pageedit" level is selected then as a result, the subject is annotated with the value "true" for special property "Is edit protected".
  • An altered or deselected "smw-pageedit" protection forces the "Is edit protected" special property to be removed (no "false" value since the status is no longer associated with an edit protection) given that no manual annotation for special property "Is edit protected" exists.

Using the "Is edit protected" special property[edit]

  • In case [[Is edit protected::true]] was annotated and someone removes the annotation without resetting the protection status with e.g. [[Is edit protected::false]] prior to it then the protection stays enforced until a user removes the restriction using the "protect" action via the page menu (&action=protect).
  • If for some reason [[Is edit protected::true]] and [[Is edit protected::false]] are annotated at the same time on the same page then the protection stays enforced.
  • If the page contains the manually added annotation [[Is edit protected::true]] then any attempt to remove the protection using the "protect" action via the page menu (&action=protect) or to alter its level will fail, i.e. the "smw-pageedit" protection continues to get enforced for as long as [[Is edit protected::true]] is stored on the page. The page will continue to be uneditable by users without the "smw-pageedit" user right.
  • If the page contains the manually added annotation [[Is edit protected::false]] then any attempt to add a protection using the "protect" action via the page menu (&action=protect) will fail, i.e. the "smw-pageedit" protection does not get enforced as for as long as [[Is edit protected::false]] is stored on the page. The page will continue to be editable by any user.

See also[edit]

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:2232
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:2249
  3. ^  "This report gives an overview about Open Source web applications to create, manage, and publish Knowledge Organization Systems (KOS)" retrieved from: http://coli-conc.gbv.de/publications/tr7.html