I found out that in order to delete a document from the system.roles collection, the user needs to be given explicit permission for the collection. The admin user might not have those privileges on custom databases.
However, we can instead use dropRole on the database embedded in the stateId to delete the role.
Fixes #22
I found out that in order to delete a document from the
system.roles
collection, the user needs to be given explicit permission for the collection. The admin user might not have those privileges on custom databases.However, we can instead use
dropRole
on thedatabase
embedded in thestateId
to delete the role.