Page MenuHomePhabricator

SpecialPage.php: function SpecialPage.php 2nd parameter restriction should use permission keys
Closed, InvalidPublic

Description

The function SpecialPage in module SpecialPage.php currently uses restriction (Minimum user level). IMHO this
should be changed to use (probably an array of) permission key(s).

Example:
to suppress to show "User list", if the user hasn't the 'listusers' permission key of bugzilla 3294 (Introducing
new permissionkeys 'listusers' and 'listcontributions'). Using the current function call, this cannot be achieved
by passing the permission key to it.

  • @param string $restriction Minimum user level required, e.g. "sysop" or "developer".
  • @param boolean $listed Whether the page is listed in Special:Specialpages
  • @param string $function Function called by execute(). By default it is constructed from $name
  • @param string $file File which is included by execute(). It is also constructed from $name by default
	 */ 
 	function SpecialPage( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default',

$includable = false ) {


Version: 1.6.x
Severity: normal

Details

Reference
bz4230

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:57 PM
bzimport set Reference to bz4230.
bzimport added a subscriber: Unknown Object (MLST).