New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protect: prompt if the user has asked the protecting admin about the … #586
Conversation
…protection when requesting unprotection Prevent tracking down logs of circular page moves, some refactoring Record if there was a stable log even if it's not currently pc protected
0fe4e21
to
3525a11
Compare
@Amorymeltzer Alright here you are :) Sorry it took me a month to respond to you, and moreover for that major major fuckup of force-pushing back to origin/master (which I've since fixed)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MusikAnimal Here's what I got, now that moves enter the PC log (https://phabricator.wikimedia.org/T59912). The timing is fortuitous — I fixed up some redirects from a pending changes-protected page move vandal the other day, so this was fresh on my mind.
Having just done all this, I noticed it was a main repo branch so I could've just pushed on top of that. Or uploaded a file here? Alas. If you'd prefer looking over my changes that way, can do!
@@ -1159,7 +1214,11 @@ Twinkle.protect.callback.evaluate = function twinkleprotectCallbackEvaluate(e) { | |||
typename = 'create protection'; | |||
break; | |||
case 'unprotect': | |||
/* falls through */ | |||
var admins = $.map(Twinkle.protect.currentProtectionLevels, function(pl) { return pl.admin ? 'User:' + pl.admin : null; }); | |||
if (admins.length && !confirm('Have you attempted to contact the protecting admins (' + $.unique(admins).join(', ') + ') first?' )) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about doing a whole thing here for admin vs admins, but most of the good functions are in ES6 and it's just not really worth it.
@@ -132,6 +157,10 @@ Twinkle.protect.fetchProtectionLevel = function twinkleprotectFetchProtectionLev | |||
expiry: protection.expiry, | |||
cascade: protection.cascade === '' | |||
}; | |||
// logs report last admin who made changes to either edit/move/create protection, regardless if they only modified one of them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I look forward to getting a bug report about this!
…protection when requesting unprotection Prevent tracking down logs of circular page moves, some refactoring Record if there was a stable log even if it's not currently pc protected As noted, logevents reports the sysop who last modified protection for both edit and move, even if they only modified one Close wikimedia-gadgets#586
…protection when requesting unprotection
Prevent tracking down logs of circular page moves, some refactoring
Record if there was a stable log even if it's not currently pc protected