jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/532704 )
Change subject: Check a user's rights rather than group memberships ......................................................................
Check a user's rights rather than group memberships
This is a continuation to ee2d6d664c30
Bug: T231263 Change-Id: I5f6d71c0d004b8b13937d7c193d93b79186b2b37 --- M pywikibot/page.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index e1cd72c..33176bf 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1918,8 +1918,8 @@ pywikibot.output('Deleting %s.' % (self.title(as_link=True))) reason = pywikibot.input('Please enter a reason for the deletion:')
- # If user is a sysop, delete the page - if self.site.username(sysop=True): + # If user has 'delete' right, delete the page + if 'delete' in self.site.userinfo['rights']: answer = 'y' if prompt and not hasattr(self.site, '_noDeletePrompt'): answer = pywikibot.input_choice(
pywikibot-commits@lists.wikimedia.org