Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse Filtering Logic for Batch and Single User #476

Open
andrewkrug opened this issue Nov 19, 2019 · 1 comment
Open

Collapse Filtering Logic for Batch and Single User #476

andrewkrug opened this issue Nov 19, 2019 · 1 comment

Comments

@andrewkrug
Copy link
Contributor

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.

@andrewkrug
Copy link
Contributor Author

This turns out to be the incorrect implementation of scopes on the client side. For integrity purposes though the issue will remain open to collapse the filtering logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant