Page MenuHomePhabricator

Cascading protection doesn't work for custom user levels
Closed, DeclinedPublic

Description

The custom level code is
<pre>$wgGroupPermissions['steward']['steward'] = true;
$wgGroupPermissions['steward']['protect'] = true
$wgGroupPermissions['staff']['steward'] = true;
$wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop', 'steward');
$wgRestrictionTypes = array( 'edit', 'move', 'delete' ); </pre>

When setting protection to [move:steward,edit:sysop,delete:steward, [CASCADING]] the protection works but doesn't cascade.

Please fix, or let me know how to fix.

Thanks,
Mww113


Version: 1.13.x
Severity: normal

Details

Reference
bz14627

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:09 PM
bzimport set Reference to bz14627.
bzimport added a subscriber: Unknown Object (MLST).

I think fixing this will require the reversion of r36519.

It would seem so(In reply to comment #1)

I think fixing this will require the reversion of r36519.

Judging that if ($this->mCascade && ($edit_restriction != 'protect') &&

	  	                         !(isset($wgGroupPermissions[$edit_restriction]['protect']) && $wgGroupPermissions[$edit_restriction]['protect'] ) )
	  	                         $this->mCascade = false;

that was removed from the code, I would think so

Also, currently you can check the box to cascade, but that only adds a useless protection log entry (if the only change was the failed attempt to add cascade) and not actually sets cascade.

alexfusco5 wrote:

If this is not possible, how about a configuration setting instead of dependency on the protect right. It can be something like $wgCascadeRestrictionLevels and the default can be array(sysop);

Fixing this bug should be as easy as reverting r36519 for now. Although such a setting sounds like a good idea. :)

I don't have the dead [cascade] issue and the JS doesn't let you check it if on as well.

At any rate, this is disabled due to the possibility of people transcluding pages to protect them, without protect rights.