jenkins-bot has submitted this change and it was merged.

Change subject: Show error on GlobalGroupPerms. for group without rights
......................................................................


Show error on GlobalGroupPerms. for group without rights

Bug: 40119
Change-Id: I8c6a54c9b9b0fc014d9bbebdc15481bba0db8511
---
M i18n/en.json
M i18n/qqq.json
M specials/SpecialGlobalGroupPermissions.php
3 files changed, 6 insertions(+), 0 deletions(-)

Approvals:
  PiRSquared17: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index 913d00a..d81ad05 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -268,6 +268,7 @@
     "centralauth-editgroup-success-text": "Successfully updated the global 
group $1.\n[[Special:GlobalGroupPermissions|Return to group management]]",
     "centralauth-editgroup-editsets": "([[Special:EditWikiSets|edit]])",
     "centralauth-editgroup-nowikiset": "None, applies to all wikis.",
+    "centralauth-editgroup-nonexistent": "The global group \"$1\" does not 
currently exist.",
     "centralauth-globalgrouppermissions-knownwiki": "Wiki on which they have 
an account:",
     "centralauth-globalgroupmembership-badknownwiki": "The global account 
'''$1''' is not active on the wiki you specified ('' $2 '').\nYou may be 
attempting to assign rights to the wrong user!",
     "centralauth-editset": "Wiki sets",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ad7fad2..626c741 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -282,6 +282,7 @@
        "centralauth-editgroup-subtitle-readonly": "Subtitle for 
Special:GlobalGroupPermissions for users without edit right.\nParameters:\n* $1 
- Name of the group",
        "centralauth-editgroup-fieldset": "Used as fieldset label. 
Parameters:\n* $1 - group name",
        "centralauth-editgroup-name": "Used as label for \"Global group name\" 
input box.",
+       "centralauth-editgroup-nonexistent": "Error shown when a global group 
does not exist (i.e., has no rights assigned).\n\nParameters:\n* $1 - group 
name",
        "centralauth-editgroup-display": "This is a label for a localised group 
name.",
        "centralauth-editgroup-display-edit": "\"edit\" is link 
text.\n\nParameters:\n* $1 - group name\n* $2 - group name (localized) e.g. 
{{msg-mw|group-editor}}, {{msg-mw|group-sysop}}",
        "centralauth-editgroup-invalid-name": "Error shown in case the name 
given for the global group is invalid",
diff --git a/specials/SpecialGlobalGroupPermissions.php 
b/specials/SpecialGlobalGroupPermissions.php
index 9276e6f..d3202c6 100644
--- a/specials/SpecialGlobalGroupPermissions.php
+++ b/specials/SpecialGlobalGroupPermissions.php
@@ -222,6 +222,10 @@
 
                if ( !$editable ) {
                        $attribs['disabled'] = 'disabled';
+                       if ( !$assignedRights ) {
+                               $this->getOutput()->wrapWikiMsg( '<div 
class="error">$1</div>',
+                                       array( 
'centralauth-editgroup-nonexistent', $group ) );
+                       }
                }
 
                foreach ( $rights as $right ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c6a54c9b9b0fc014d9bbebdc15481bba0db8511
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: PiRSquared17 <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to