Skip to content

Collapse Filtering Logic for Batch and Single User #476

@andrewkrug

Description

@andrewkrug

The endpoint: https://person.api.sso.mozilla.com/v2/user/primary_email/ and /v2/users /v2/users have slightly different filtering logic implemented.

Need to collapse the code from getUser and getUsers logic into shared code to ensure consistency.

As a bonus work item:

Cover the test case from the autonag setup.

    scope = {
        "classification": [
            "mozilla_confidential",
            "workgroup:staff_only",
            "public",
            "workgroup",
        ],
        "display": ["staff", "ndaed", "vouched", "authenticated", "public", "none"],
    }
    scope = " ".join(
        f"{key}:{value}" for key, values in scope.items() for value in values
    )

Where the caller is passing the following scopes and display levels to the API and failing to get staff information sometimes from /v2/users

Theory: This may only apply to contractors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions