Last modified: 2014-08-14 13:28:01 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.
Related links are: https://en.wikipedia.org/wiki/Wikipedia:AWB/B#.22Delete.22_button_not_enabled_for_eliminators_on_ptwiki https://bugzilla.wikimedia.org/show_bug.cgi?id=24623
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
(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