Jump to content
Toggle menu
  • 3 articles
  • 75 files
  • 7 users
  • 37.9K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Effective protection level/doc: Difference between revisions

From Neodyland Wiki
m change source to syntaxhighlight
reflect latest changes
Line 5: Line 5:
This module provides a way to retrieve the group required to perform a given action on a page. It currently tests the following criteria:
This module provides a way to retrieve the group required to perform a given action on a page. It currently tests the following criteria:
* The page being pending-changes protected: autoconfirmed
* The page being pending-changes protected: autoconfirmed
* The page being a JavaScript or CSS subpage in userspace, or in the MediaWiki namespace: interfaceadmin
* The page being in the MediaWiki namespace: sysop
* The page being in the MediaWiki namespace: sysop
* The page being a JavaScript or CSS subpage in userspace: interfaceadmin
* The page being a JSON subpage in userspace: sysop
* The page being a JSON subpage in userspace: sysop
* The page being protected: sysop, templateeditor, extendedconfirmed, or autoconfirmed
* The page being protected: sysop, templateeditor, extendedconfirmed, or autoconfirmed
Line 26: Line 26:
</syntaxhighlight>
</syntaxhighlight>


The function accepts two parameters. The first is a string containing the action to check, which must be one of "edit", "create", "move", "upload", or "autoreview". The second is optional, and can either be the name of the page to check, or a title returned from the mw.title functions. If the second parameter is omitted, the page being displayed is the one checked against. The return value is a string containing the name of the group required to perform the given action.
The function accepts two parameters. The first is a string containing the action to check, which must be one of "edit", "create", "move", "upload", "undelete", or "autoreview". The second is optional, and can either be the name of the page to check, or a title returned from the mw.title functions. If the second parameter is omitted, the page being displayed is the one checked against. The return value is a string containing the name of the group required to perform the given action.


=== From wikitext ===
=== From wikitext ===
Cookies help us deliver our services. By using our services, you agree to our use of cookies.