Closed pverdile closed 1 year ago
The removeFilteredPolicy creates a new object using the CasbinRule class,
https://github.com/juicycleff/casbin-mongodb-adapter/blob/793909c68f6ecf146021d3d3261b34b4792f95de/src/lib/adapter.ts#L222
which create a instance with the properties createdAt and updatedAt
createdAt
updatedAt
https://github.com/juicycleff/casbin-mongodb-adapter/blob/793909c68f6ecf146021d3d3261b34b4792f95de/src/lib/casbin-rule.entity.ts#L28
providing a object which will use to in the deleteMany in the following format
{ createdAt: '2021-06-18T20:47:52.585Z', updatedAt: '2021-06-18T20:47:52.585Z', ptype: 'p', v0: 'user', v1: 'pietro.verdile', v2: 1, v3: 'library', v4: 'systemTags', v5: 'eq;lib_60ccdfa5bc9e5400376a03ac' }
This object never will match any document in MongoDB due the properties createdAt and updatedAt.
The removeFilteredPolicy creates a new object using the CasbinRule class,
https://github.com/juicycleff/casbin-mongodb-adapter/blob/793909c68f6ecf146021d3d3261b34b4792f95de/src/lib/adapter.ts#L222
which create a instance with the properties
createdAt
andupdatedAt
https://github.com/juicycleff/casbin-mongodb-adapter/blob/793909c68f6ecf146021d3d3261b34b4792f95de/src/lib/casbin-rule.entity.ts#L28
providing a object which will use to in the deleteMany in the following format
This object never will match any document in MongoDB due the properties createdAt and updatedAt.