Page MenuHomePhabricator

Please add local group info to `meta=globaluserinfo` API
Closed, ResolvedPublic

Description

I need to get the list of wikis where the given user is in sysop group. Special:CentralAuth returns all groups for each wiki, which suits my needs. But the [[ https://www.mediawiki.org/wiki/Extension:CentralAuth/API#query+globaluserinfo | meta=globaluserinfo ]] API call lacks this info. Could it be added there?

Event Timeline

Change 394817 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/CentralAuth@master] Add local groups to meta=globaluserinfo output

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

{
    "batchcomplete": "",
    "query": {
        "globaluserinfo": {
            "home": "wiki",
            "id": 1,
            "registration": "2017-12-02T23:37:26Z",
            "name": "Admin",
            "groups": [],
            "merged": [
                {
                    "wiki": "wiki",
                    "url": "http://dev.wiki.local.wmftest.net:8080",
                    "timestamp": "2017-12-02T23:37:26Z",
                    "method": "primary",
                    "editcount": 0,
                    "registration": "2017-11-06T21:49:50Z",
                    "groups": [
                        "bureaucrat",
                        "steward",
                        "suppress",
                        "sysop"
                    ]
                }
            ],
            "unattached": [
                {
                    "wiki": "centralauthtestwiki",
                    "editcount": "0",
                    "registration": "2017-12-02T23:35:00Z",
                    "groups": [
                        "bureaucrat",
                        "sysop"
                    ]
                },
                {
                    "wiki": "loginwiki",
                    "editcount": "0",
                    "registration": "2017-12-02T23:34:56Z",
                    "groups": [
                        "bureaucrat",
                        "sysop"
                    ]
                }
            ]
        }
    }
}

Change 394817 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Add local groups to meta=globaluserinfo output

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

Reedy claimed this task.
Reedy removed a project: Patch-For-Review.

I tested it and it works. Thanks a lot, that was really quick!