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

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
bzimport raised the priority of this task from to Low.
bzimport set Reference to bz46911.
bzimport added a subscriber: Unknown Object (MLST).
TTO created this task.Apr 5 2013, 1:43 AM
Anomie added a comment.Apr 5 2013, 2:17 AM

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.

TTO added a comment.Apr 5 2013, 4:54 AM

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.

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Feb 19 2015, 7:06 PM