Delete only for the user who has created the item

The ability for the user who has created the page to delete it. Today it is possible to display the delete button a the screen for one item, but I guess this button will be visible for all users. The request is to make it visible only for the user who have created the item (a product in my case).

Note that I will link the user table to the product table, hence having a “user” property (relation) in the product table.

Hey Julien! Welcome to the NotionApps community! That sounds like a fair request. Quick question, do you want other users to see the product created by this user?

Hello Jatin,

Yes. Definitely :+1:

You could solve this using our “user-specific” data permissions. You can read about it here, https://docs.notionapps.com/users/personalize-data.

Hi Jatin,

I understand that this solution restricts who can view the list of products to the current user (using its email). This is not what I want to do. I want all my users to see the list of products but only the user who has created a specific product to be able to delete it.

Let me know if I miss something.

I will discuss this feature internally and get back to you, Julien! However, a workaround is possible if one could hide/show components based on the logged-in user properties. With this, one could create a status property input and only the owner of the order could see it. The owner can then mark the status as DELETE. I’ll keep you posted once we start working on it.

Hi Jatin,

I like your approach. I think that having a Role Base Access Control (RBAC) approach would be powerful and will allow addressing various use cases.

That being said, I was thinking about an alternative that is probably even better for my specific application: Apply a filter on the “Update items” screen (and only on this specific screen, not on the “View items” screen as the user see all products published by all users) so that the user can view only the product he has created (and not the one created by other users). From there, the user can access and update each individual product (“Update item” screen) or delete the whole product (I’ll add a Delete button). I believe that this will be cleaner (and a more standard pattern) in my specific case.

Hope that makes sense. Let me know if you have any questions. Happy to provide any details needed. Thank you!