node-casbin/mongoose-adapter

Not supported mongo shard cluster?

Closed this issue · 2 comments

version

  • casbin: 5.26.1
  • casbin-mongoose-adapter: 5.3.0

problem

const casbinMongooseAdapter = await MongooseAdapter.newAdapter(
          URL,
          option
        );
const casbin = await newEnforcer(
          model,
          casbinMongooseAdapter
        );

The above code works fine and connects to mongo. but casbin.addPolicy execute and create policy and casbin.getPolicy().
Under usual circumstances, get created data from casbin.getPolicy() but cannot get it. I saw the database and created data inserted.
I don`t know why it does not get data even if inserted into the DB.

@taitasu555 why close?