directus / directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.
https://directus.io
Other
28.26k stars 3.94k forks source link

Forbidden error when creating a M2A Relationship. You don't have permission to access this. #8978

Closed ajboni closed 3 years ago

ajboni commented 3 years ago

Preflight Checklist

Describe the Bug

Forbidden error when creating a M2A You don't have permission to access this. Tried with npx with sqlite and docker with postgress. Same behaviour.

To Reproduce

  1. Set up 2 models.
  2. Add a M2A field on model A. follow the wizard, and set a related collection.
  3. Finish wizard. See error.

Errors Shown

{
  "errors": [
    {
      "message": "You don't have permission to access this.",
      "extensions": {
        "code": "FORBIDDEN"
      }
    }
  ]
}

5 post request are generated, 3 of them failing due to 403 unauthorized.

image

What version of Directus are you using?

v9.0.0-rc.98

What version of Node.js are you using?

v14.17.6

What database are you using?

Postress / SQLlite

What browser are you using?

Firefox / Chrome / Brave

What operating system are you using?

Linux

How are you deploying Directus?

npx. docker

joselcvarela commented 3 years ago

Hello @ajboni Although it's not exactly the same, I am going to mark as duplicate of https://github.com/directus/directus/issues/8866, since https://github.com/directus/directus/pull/8881 fixes both scenarios.