fedora-infra / fas

Fedora Account System
https://admin.fedoraproject.org/accounts
GNU General Public License v2.0
40 stars 50 forks source link

[FAS3] Discussion - Dump people result total shows less than amount returned #216

Closed skrzepto closed 3 years ago

skrzepto commented 7 years ago

There are 5 users total, one user is disabled and another is pending so 3 active users. When I call /settings/dump/people I get the following json below. I'm just a little confused by the key total in the json response because rows returns 5 users. I suggest renaming total to total_active to clarify things since 3 is related to the amount of active users.

{
    "rows": [{
        "username": "bob",
        "status": 8,
        "avatar": "https://seccdn.libravatar.org/avatar/c961431faea38ed65bfd982cf2e31bd0",
        "gpg_fingerprint": null,
        "timezone": "UTC",
        "fullname": "bob",
        "ircnick": null,
        "creation_date": "2011-11-28T14:46:44+00:00",
        "id": 0,
        "email": "bob@email.com"
    }, {
        "username": "fasadmin",
        "status": 1,
        "avatar": null,
        "gpg_fingerprint": null,
        "timezone": "UTC",
        "fullname": "FAS Administrator",
        "ircnick": null,
        "creation_date": "2016-11-30T23:38:38.559473+00:00",
        "id": 7,
        "email": "fasadmin@fedoraproject.org"
    }, {
        "username": "jbezorg",
        "status": 1,
        "avatar": "https://seccdn.libravatar.org/avatar/a1505e2288b666f4741685f92352ec97",
        "gpg_fingerprint": null,
        "timezone": "UTC",
        "fullname": "Jean-Baptiste Emanuel Zorg",
        "ircnick": null,
        "creation_date": "2016-11-30T23:38:38.559473+00:00",
        "id": 999,
        "email": "88c144de@opayq.com"
    }, {
        "username": "jerry",
        "status": 1,
        "avatar": "https://seccdn.libravatar.org/avatar/284459354f2531f6923b7e4e57c06792",
        "gpg_fingerprint": null,
        "timezone": "UTC",
        "fullname": "jerry",
        "ircnick": null,
        "creation_date": "2013-08-28T14:46:44+00:00",
        "id": 1,
        "email": "jerbear@test.com"
    }, {
        "username": "mike",
        "status": 3,
        "avatar": null,
        "gpg_fingerprint": null,
        "timezone": "UTC",
        "fullname": "mike",
        "ircnick": null,
        "creation_date": "2016-02-28T14:46:44+00:00",
        "id": 2,
        "email": "m@ike.com"
    }],
    "total": 3
}
laxathom commented 7 years ago

This route /settings/dump/people is an internal xhr request for the UI which is why it returns the whole list of users (requires admin rights). Total's value is indeed not correct and should reflect the length from keyword row. will fix this asap.

ryanlerch commented 3 years ago

Closing this issue as the FAS project is now archived, not actively developed, and unmaintained.

FAS was replaced in March 2021 by Fedora Accounts (https://accounts.fedoraproject.org).

If this issue is a Feature Request that you forsee might be beneficial to Fedora Accounts, please refile it against Noggin