When uploading images, there is no check whether an image is protected until you hit the "upload image" button. Can I suggest that either 1) the "upload new version" button is hidden if protection is applied (like happens with the "edit" button on articles), or 2) the message appears as soon as you hit the button and go to the upload screen.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Protection: Rework on how cascade-protection are applied to files | mediawiki/core | master | +80 -41 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T109410 Introduce earlier check for cascade protected images when uploading | |||
Open | None | T109435 Disregard "edit" permission when uploading to an existing file |
Event Timeline
Which button do you mean?
For a upload-protected file such as File:Commons-logo.svg, I don't see any "upload new version" button, but instead there is "You cannot overwrite this file."
https://commons.wikimedia.org/wiki/File:Ruby_Laffoon_Portrait.png is the image in this context that I tested on, as well as a few others (these appear to be cascade protected)
Related: T24521;
getCascadeProtectionSources is broken; the check of whether you're able to upload or not says true, when you actually need to be able to edit the description page to upload (another broken logic).
Change 233207 had a related patch set uploaded (by Zhuyifei1999):
Cascade-protection: Fixes for files
Change 233207 abandoned by Zhuyifei1999:
Protection: Rework on how cascade-protection are applied to files
Reason:
I currently have no interest to fix this any time soon. If anyone else wish to work on this, feel free to restore.