Skip to content

Population does not work for Users in Users-Permissions #11957

@kamal-choudhary

Description

@kamal-choudhary

Bug report

When we try to populate the relational fields on the user-permissions => users model, the response doesn't populate the relational fields.

Steps to reproduce the behavior

  1. Create a user in the Users-Permissions
  2. Create some other collection type and link it with user
  3. Enable public find permission on both
  4. Send a GET request to the /users with "?populate=*"
  5. Response won't contain the relational field

Expected behavior

Appending ?populate=* to the API request to the user-permissions => users model, the response should contain the relational fields.

System

  • Node.js version: 14.15.3
  • NPM version: 6.14.9
  • Strapi version: 4.0.0
  • Database: MariaDB
  • Operating system: MacOS

Additional context

PR #11795 is about fixing filtering on the same User-permissions => users model. I have also added that new code changes to my project. Filtering does work, but the population doesn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: highIf it breaks the basic use of the productsource: plugin:users-permissionsSource is plugin/users-permissions packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    Status

    Archived

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions