Want to restrict certain rows in specific collection of my database from deletion

Hi,

I have a database named D1 and there are several collections inside that. For a particular collection C1 i want that no one can delete specific rows R1, R2 and R3 out of thousands of rows from either MongoDB Compass, MongoDB Shell or any other mechanism.
The only way to delete them is to stop mongodb services, removing authorization in mongodb.conf file and deleting the user and creating new user for the same.

Thanks

Users are able to delete most records except some rows in the same table?

i don’t recall mongodb has such built-in support in authZ field.

What you may do is to put a proxy in front of mongodb servers and inspect the delete commands on your own, with an allow/deny list.