Merlijn van Deen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/231769

Change subject: APISite: removed username check in getuserinfo
......................................................................

APISite: removed username check in getuserinfo

The old code compared the username in _userinfo
to the username /based on the groups is _userinfo/,
which caused repetitive requests in two cases:
 1) no username configured
 2) no sysopname configured and the normal username
    has sysop rights

Bug: T57192
Change-Id: I409bd268bf655c2a05d0f206e164d8db334b1311
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/69/231769/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index d750bcb..f3ac9d8 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1861,8 +1861,7 @@
         @type force: bool
         """
         if (not hasattr(self, '_userinfo') or force or
-                'rights' not in self._userinfo or
-                self._userinfo['name'] != self._username['sysop' in 
self._userinfo['groups']]):
+                'rights' not in self._userinfo):
             uirequest = self._simple_request(
                 action="query",
                 meta="userinfo",

-- 
To view, visit https://gerrit.wikimedia.org/r/231769
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I409bd268bf655c2a05d0f206e164d8db334b1311
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to