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

fix: user field returning all publicly queryable users #165

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

jasonbahl
Copy link
Contributor

@jasonbahl jasonbahl commented Feb 5, 2024

What does this implement/fix? Explain your changes.

Fixes a bug where the "user" field would return all public users when an array of IDs were stored as the meta value.

Does this close any currently open issues?

closes #162

Any other comments?

When saving specific users in a user field:

CleanShot 2024-02-05 at 13 15 34

BEFORE

Querying would return all publicly queryable users

CleanShot 2024-02-05 at 13 17 17

AFTER

Querying returns just the selected users

CleanShot 2024-02-05 at 13 17 35

…on a node

- update test suite to add a published post by editor and published post by author so that more than 1 user are public in the environment
- update textFieldTest to test querying the text field on a post
- update UserFieldTest to test querying the user field (failing test)
@jasonbahl jasonbahl self-assigned this Feb 5, 2024
@jasonbahl jasonbahl requested a review from josephfusco February 5, 2024 20:18
@coveralls
Copy link

Pull Request Test Coverage Report for Build e652a10e2d4dcff26882063ea14365f5eed7c8a2-PR-165

  • -1 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 62.435%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/FieldType/User.php 2 3 66.67%
Totals Coverage Status
Change from base Build 122d9ed2f63a329d37ca980feb001502f92d8639: -0.007%
Covered Lines: 2026
Relevant Lines: 3245

💛 - Coveralls

@jasonbahl jasonbahl merged commit 42bab29 into develop Feb 8, 2024
This was referenced Feb 8, 2024
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

Successfully merging this pull request may close these issues.

User field is returning all users
2 participants