mickhansen / ssacl-attribute-roles

Simple attribute whitelisting/blacklisting with roles for Sequelize
MIT License
62 stars 10 forks source link

Fixes #1 with Test #2

Closed lauzierj closed 9 years ago

mickhansen commented 9 years ago

I'm sort of surprised this wouldn't be passing before since the test above passes.

lauzierj commented 9 years ago

Internally Sequelize doesn’t pass the options with the role through to the get call for the included instance’s attributes.

On Wed, Apr 29, 2015 at 2:07 PM, Mick Hansen notifications@github.com wrote:

I'm sort of surprised this wouldn't be passing before since the test above passes.

Reply to this email directly or view it on GitHub: https://github.com/mickhansen/ssacl-attribute-roles/pull/2#issuecomment-97525166

lauzierj commented 9 years ago

So any attributes on an included instance that has a role specified will return nothing — regardless of the specified role.

On Wed, Apr 29, 2015 at 2:08 PM, Jacob Lauzier lauzierj@gmail.com wrote:

Internally Sequelize doesn’t pass the options with the role through to the get call for the included instance’s attributes.

mickhansen commented 9 years ago

Ah right, and expect(values.company.price).not.to.be.ok(); still passes because default is no role (so only matches attributes without roles).

mickhansen commented 9 years ago

Released as 0.0.4