Page MenuHomePhabricator

action=protect requires all protected actions be specified, even if they are not being changed
Open, LowPublicFeature

Description

When using action=protect, you can apply edit protection by itself (protections=edit=sysop, for example. But this will also remove any move protection already applied to the page. This is confusing behaviour and should be rectified.


Version: 1.22.0
Severity: enhancement

Details

Reference
bz46911

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:14 AM
bzimport set Reference to bz46911.
bzimport added a subscriber: Unknown Object (MLST).

It's not that confusing, depending on how you think about it. You're specifying the set of protections that are to apply to the page, not just the set of protections you're wanting to modify.

But the big question is how would you do this in a backwards-compatible manner? We can't suddenly change the current behavior for clients that are *expecting* "protections=edit=sysop" to remove the move protection. Perhaps a boolean "modify", or something like that, to select the new behavior.

IMO it was implemented poorly to begin with. There should be a separate parameter for edit, move, upload etc. protection, rather than using one confusing parameter for everything.

Maybe we can have this as part of the API 2.0 project?

(In reply to comment #2)

IMO it was implemented poorly to begin with. There should be a separate
parameter for edit, move, upload etc. protection, rather than using one
confusing parameter for everything.

Maybe we can have this as part of the API 2.0 project?

That is hard to do, because MediaWiki can have more protections than edit, move, upload (and create).

A boolean parameter, so the protections are only overwrites the existing ones is a good idea.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM