Last modified: 2014-08-14 13:28:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71530, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69530 - Eliminator rights
Eliminator rights
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-14 11:19 UTC by Marios Magioladitis
Modified: 2014-08-14 13:28 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Marios Magioladitis 2014-08-14 11:19:36 UTC
After a request in AWB's bug talk to allow "eliminator" to delete pages via AWB in Portuguese Wikipedia I tried to replace

!TheSession.User.IsSysop

with

!TheSession.User.IsSysop || !TheSession.User.IsEliminator


It turns this can't work as a global change since it seems Eliminator user rights are not globally defined and sysop does not have eliminator rights.

As a result, after this change in AWB's code, trying to delete a page as a sysop results in program not allowing it.

I suggest that eliminator rights should be defined globally and in Wikipedias with no eliminator group, sysop get eliminator rights as default.
Comment 2 Marios Magioladitis 2014-08-14 11:59:49 UTC
Patch that should work in AWB is

Index: AWB/Main.cs
===================================================================
--- AWB/Main.cs	(revision 10370)
+++ AWB/Main.cs	(working copy)
@@ -4506,7 +4506,7 @@
                     return;
                 }
 
-                if (!TheSession.User.IsSysop)
+                if (!TheSession.User.IsSysop || !TheSession.User.IsEliminator)
                 {
                     MessageBox.Show(
                         "Current user doesn't have enough rights to delete \"" + TheSession.Page.Title + "\"",
Index: WikiFunctions/API/UserInfo.cs
===================================================================
--- WikiFunctions/API/UserInfo.cs	(revision 10370)
+++ WikiFunctions/API/UserInfo.cs	(working copy)
@@ -51,6 +51,12 @@
         { get { return IsInGroup("sysop"); } }
 
         /// <summary>
+        /// Whether the current user is an administrator
+        /// </summary>
+        public bool IsEliminator
+        { get { return IsInGroup("eliminator"); } }
+
+        /// <summary>
         /// Whether the current user is a flagged bot
         /// </summary>
         public bool IsBot
Comment 3 Sam Reed (reedy) 2014-08-14 13:28:01 UTC
(In reply to Marios Magioladitis from comment #0)
> I suggest that eliminator rights should be defined globally and in
> Wikipedias with no eliminator group, sysop get eliminator rights as default.

That's really not going to happen.

We should just change to using HasRight('delete')/HasRight('undelete'). And then add a CanDeletePage in the UserInfo class, something similar to the CanEditPage method that's there already

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links