firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.13k stars 185 forks source link

Prevent entity duplication in collection - Entity actions customization #598

Open kmatsuleva opened 8 months ago

kmatsuleva commented 8 months ago

Issue Overview: I have a "Users" collection and I need to prevent the duplication of entities within it. However, I want to maintain permissions for create and edit operations.

Current Approach: I'm currently using the onPreSave callback to check if the status is 'copy', and if so, I throw an error to prevent the duplication.

Desired Solution: While the current approach prevents duplication during the save operation, I'd like to explore additional options to enhance the user experience. Specifically, I'd like to hide the 'Copy' option altogether for entities in the "Users" collection.

image

Is it possible?

Any help would be appreciated.

fgatti675 commented 8 months ago

Hi Katerina, thanks for reaching out! This is not currently possible in v2. We are revamping entity actions in v3, and you will be able to customise them altogether. Keeping this ticket open as a feature request