Remove hardcoded restriction on non-admins closing discsussions with >50 pages#112
Remove hardcoded restriction on non-admins closing discsussions with >50 pages#112Qwerfjkl wants to merge 2 commits intowikimedia-gadgets:masterfrom
Conversation
|
Thanks. Will double check consensus at https://en.wikipedia.org/wiki/Wikipedia_talk:XFDcloser#Proposal_to_allow_non-admins_to_close_huge_XFDs_(%3E50_pages) . If no objections in a few days, happy to move forward. I imagine XFDcloser already detects and handles non-admins, and changes its behavior appropriately (i.e. doing something besides deleting since non-admins can't delete). This would just increase the quantity of pages they could do it on. |
|
@NovemLinguae seems to have no objections after 3 months, can this be moved forward? Have come across this many times while relisting/closing CfDs, so would be useful to have deployed :) |
|
What are the steps to test this one? I did the following and was able to close it as a non-admin even before applying this patch. So I think I am missing something.
var xfdcDevUrl = "http://localhost:8125/dist/loader-dev.js";
mw.loader.getScript(xfdcDevUrl).catch(function(e) {
e.message += " " + xfdcDevUrl;
console.error(e);
});
|
|
@NovemLinguae That is not the same result I am getting. Logged in using BunnysBot, a non-admin on testwiki, and got the Too many pages message for another CfD from Dec 12, see below: @Qwerfjkl This PR seems to allow my non-admin account on testwiki to open the dialog to close the script, but something else stops me from actually closing the discussion, this may or may not be a problem from my end. |
|
I was also able to close the Category:Kurdish Iranian people on Dec 19 without admin and from the master branch. Looks the page counting for the discussion might be a bit weird. |
There was a problem hiding this comment.
We can ignore the previous bug I mentioned. Seems unrelated. I found a new bug in this patch though:
Steps to reproduce:
- checkout your patch
npm startto build and start a localhost test server- log in as a non admin user (NovemBot)
- on testwiki, add the localhost test server to my User:NovemBot/common.js file using:
var xfdcDevUrl = "http://localhost:8125/dist/loader-dev.js";
mw.loader.getScript(xfdcDevUrl).catch(function(e) {
e.message += " " + xfdcDevUrl;
console.error(e);
});- visit https://test.wikipedia.org/wiki/Wikipedia:Categories_for_discussion/Log/2025_December_12
- on the second entry ("People of West Asian descent", the one that has 69 entries), click "Close"
- click "Keep"
- for rationale, type "test"
- click "Next"
- select "No automated actions"
- click "Save"
- "Mass actions will be performed (69 nominated pages detected)". Click Continue.
What happens?
- Nothing. Silent error. User stuck on same screen without the CFD being closed.
- JavaScript console error:
Please fix :)
|
(small note that I found this issue with the same discussion in my prior comment, although I did not document it clearly) |
|
I think this should only be allowed if "No automated actions" is checked. As there are at least two automated actions per page (removing tag + adding {{old xfd}} to the talk page) and non-admins are subject to rate limits of 90/min, allowing it for large bundled XfDs will lead to botched closes with some edits failing. |
Sounds reasonable. Can this patch be reworked to check if the user is a non-admin, and if so, remove / not show the "Remove nomination templates, tag talk pages" option in the dropdown? And perhaps also add a note outside the dropdown in red text that says "Can't remove nomination templates and tag talk pages. Too many actions for non-admin. Will hit the rate limit."? Then after that, I can re-test and see if the bug in #112 (review) is still present. |
|
Apologies for not responding here earlier. |
|
Come to think of it, we might have already added it in #87 . Do you think that patch of yours would handle what siddharthvp is concerned about? |
|
No, that's for the 50 page limit; this is for the separate editing ratelimit. |

I've modified the test to behave identically to admin as well.