Page MenuHomePhabricator

botMayEdit should know about template redirects
Open, MediumPublic

Description

On Czech Wikipedia template {{Archivováno}} is a redirect to {{Archiv}}. But if you try:

pywikibot.Page(cswiki, 'Page with Archivováno').botMayEdit()

it returns True.

(for pywikibot.Page(cswiki, 'Page with Archiv').botMayEdit() it correctly returns False)

Solution 1: Add all redirects to edit_restricted_templates - uhh, sometimes there can be too many redirects
Solution 2: Process all redirects to templates listed in edit_restricted_templates automatically from page.py

Event Timeline

Dalba triaged this task as Low priority.Apr 27 2018, 5:54 AM
Dalba subscribed.

Solution 2: Process all redirects to templates listed in edit_restricted_templates automatically from page.py

This will cost an additional API request and since botMayEdit is checked on every edit, it'll have a negative influence on the total time of the first edit on the site.
I'm not sure if that can be considered insignificant.

Dalba raised the priority of this task from Low to Medium.Apr 27 2018, 5:56 AM

Solution 2: Process all redirects to templates listed in edit_restricted_templates automatically from page.py

This will cost an additional API request and since botMayEdit is checked on every edit, it'll have a negative influence on the total time of the first edit on the site.
I'm not sure if that can be considered insignificant.

SO probably cache the result?