Authorization gem for a multi-tenancy application?
Are there are any authorization gems/examples for multi-tenancy applications?

I looked at CanCan and CanTango, but I wasn't able to find what I am looking for.

My app has Account, User, Relationship model. The relationship model has a `relationship_type` column which determines authorization level. Its value can be `owner`, `moderator`, `editor`, perhaps more in the future. Users can own/moderate many accounts, and an account can have many owners/moderators.

All the examples I found describe a single tenant application, whereas my app's authorization has to be scoped through the current account being viewed.

I'm starting to think my Relationship model is bad design and might have drawbacks, but I'm not sure what is a better alternative.
Authorization gem for a multi-tenancy application?
===

Are there are any authorization gems/examples for multi-tenancy applications?

I looked at CanCan and CanTango, but I wasn't able to find what I am looking for.

My app has Account, User, Relationship model. The relationship model has a `relationship_type` column which determines authorization level. Its value can be `owner`, `moderator`, `editor`, perhaps more in the future. Users can own/moderate many accounts, and an account can have many owners/moderators.

All the examples I found describe a single tenant application, whereas my app's authorization has to be scoped through the current account being viewed.

I'm starting to think my Relationship model is bad design and might have drawbacks, but I'm not sure what is a better alternative.