Account level authorization across multipe accounts

Struggling to figure this out… any tips would be helpful.

My app has Account, User, and Relationship models. Relationship model has a relationship_type column that determines authorization level: “owner”, “moderator”, etc…

I’m not how to scope the relationship model in the context of an account. For example, one user can own two accounts, be a moderator on one, and a guest on several others. I looked at CanCan, but it does not take my approach to authorization; in that, the having an extra relationship_type column in the Relationship model to determine authorization. So I’m not sure if my approach is flawed…

You have not explained (for me anyway) exactly what you are having
difficulty with. Your models seem to do precisely what you want. Can
you explain exactly what you cannot see how to do?

Colin

Thanks, Colin. I figured it out. It turns out CanCan does support what I want.