-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: highIf it breaks the basic use of the productIf it breaks the basic use of the productsource: core:strapiSource is core/strapi packageSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Bug report
Describe the bug
In v4.0.0 relations inside API responses do not show up if the API key is set to «read-only». For this it does not matter how the populate query param is formatted (e.g. populate=* or populate[0]=authors&populate[1]=categories). This solution for deeply nested relations does not work either.
The only solution so far is to set the type of the API key to «Full Access». While this might be fine in some circumstances, it is not in other. (E.g. I’m currently building an 11ty site with Strapi as a CMS and the 11ty build should only have read access.
Steps to reproduce the behavior
- Go to Settings ->
- Create a new API key with read-only permissions
- Create a new model w/ some relations (the restaurant example from the docs or this one).
- Request the page in Paw or another API client, using the API token, and the
populate=*query param - Relations are not showing up
Expected behavior
Relations should be populated
Screenshots
Figure 1: API response with a read-only API key

Figure 2: API response with a full access API key (expected behaviour)

System
- Node.js version: v14.5.0/v16.13.1
- NPM version: v6.14.5/v.8.1.2
- Strapi version: v4.0.0
- Database: Postgres
- Operating system: macOS/Ubuntu
hs737, pbelzek-cq, christofer-km, abdonrd and JonasGruenwald
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: highIf it breaks the basic use of the productIf it breaks the basic use of the productsource: core:strapiSource is core/strapi packageSource is core/strapi packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members