https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
Web browser: --- Bug ID: 58789 Summary: page.Save() does not support sysop parameter Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: valhallasw@arctus.nl Classification: Unclassified Mobile Platform: ---
In compat, page.Save can be passed sysop=True to force a sysop edit; in core, the edit just errors out:
"pywikibot.exceptions.PageNotSaved: [[MediaWiki:Gadget-false-blue-links.js]]: protectednamespace-interface: You're not allowed to edit interface messages"
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |55880
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nullzero.free@gmail.com
--- Comment #1 from Sorawee Porncharoenwase nullzero.free@gmail.com --- It doesn't work because of "@must_be(group='user')" on top of Site.editpage(). Should I create a new function like Site.editpage_sysop()? Or should I remove "@must_be(group='user')"?
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #2 from Sorawee Porncharoenwase nullzero.free@gmail.com --- By the way, here is my workaround. It's ugly, though
# In APISite def performAsSysop(self, user) self.logout() self._username[False] = user self.login(False)
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- I think we should adapt the must_be decorator to take a new runtime parameter (e.g. as_group), which would override the group defined by the original function.
(this would adapt kwargs inside must_be.decorator.callee)
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #4 from Sorawee Porncharoenwase nullzero.free@gmail.com --- I think that new parameter would not be necessary. If we call some functions whose group='user' and there is the parameter sysop=True, obviously we want to call that function as sysop but in user manner (like editing).
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 111943 had a related patch set uploaded by Nullzero: Support editing as a sysop
https://gerrit.wikimedia.org/r/111943
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #6 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 111943 merged by jenkins-bot: Support editing as a sysop
https://gerrit.wikimedia.org/r/111943
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #7 from Sorawee Porncharoenwase nullzero.free@gmail.com --- How to change the status to RESOLVED FIXED?
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |NEW
--- Comment #8 from Merlijn van Deen valhallasw@arctus.nl --- There should be a selection box below the comment box ('Status: [PATCH_TO_REVIEW v]'). If not, ask Andre (aklapper@wikimedia.org) for 'editbugs' rights.
However, I'm keeping this open, as def save should either get a working 'sysop=...' parameter or a @deprecated('sysop', 'as_group="sysop"') decorator.
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #9 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 112299 had a related patch set uploaded by Nullzero: Switch sysop parameter to as_group='sysop'
https://gerrit.wikimedia.org/r/112299
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
--- Comment #10 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 112299 merged by jenkins-bot: Mark sysop parameter as deprecated
https://gerrit.wikimedia.org/r/112299
https://bugzilla.wikimedia.org/show_bug.cgi?id=58789
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org