views:

35

answers:

2

I want to implement declarative authorization with mongoid. But cannot succeeded. It seems like declarative authorization works with ActiveRecord Only. Can I let it work with MOngoid and MongoDB? Any Ideas.

A: 

Declarative Authorization is a conceptual model for explaining who has access to data. It's also a ruby plugin that implements this conceptual model.

The plugin probably doesn't apply to MongoDB directly. So you'll need an ActiveRecord provider form Mongo. There is one here. Then you can use the Declarative Authorization plugin with the ActiveRecord provider.

Gates VP
A: 

I had found a fork that could integrate declarative authorization and mongoid. Here is it: http://github.com/opusmagnum/declarative_authorization/commit/79ccff34233b2371299c3ff66a18ad37be08d9c6

kshil