loopback icon indicating copy to clipboard operation
loopback copied to clipboard

ACL test fail with mongoDB

Open haio opened this issue 12 years ago • 3 comments

I change the datasource to mongoDB in file loopback/test/acl.test.js,

var ds = this.ds = loopback.createDataSource({connector: require('loopback-connector-mongodb')});

But the test output show error:

  8 passing (483ms)
  1 failing

  1) security ACLs should allow access to models by exception:
     Uncaught AssertionError: false == true

It's ok when use the default memory db. I don't know why it fails, is anything different between memory db and mongoDB. Thanks!

haio avatar Apr 27 '14 15:04 haio

Got solved, close it.

haio avatar Apr 30 '14 03:04 haio

What was the issue?

ritch avatar May 06 '14 20:05 ritch

The principalId is the ACL model is string. ObjectID needs to be converted to string.

It's fixed by https://github.com/strongloop/loopback/pull/246.

raymondfeng avatar May 06 '14 20:05 raymondfeng