permissionscontent-management-systemrolesstrapi

Strapi User data access in api


users in strapi see all the blogs that created by all users. i want to CREATE, READ, UPDATE and DELETE on the users create that blog

how can i implement this. I want the user who create that blog(for example) can only READ, UPDATE and DELETE his created blog and not other, same also to the others users. what I'm trying to do is to make users responsible for their data they created.


Solution

  • Here I assume that you are talking about the actions from the Admin Panel and not from the API.

    In that case, you will have to go in the Admin Panel Then click on the settings Then on Roles, and select the Role you want to edit. Then hover the Content Type you want to manage and a Settings button should appear on the right of the CT line. Click on it Then you will have the possibility to set some conditions per actions. Set IsCreator.

    Save and voilĂ .

    Here is a short video of that to help you: https://www.loom.com/share/cd8f52eac91a45dc90d222b9254a23bf?sid=b72769a2-5106-4bb7-b871-b7577aa78a14

    Have a good one.