This post originated from an RSS feed registered with Ruby Buzz
by David Anderson.
Original Post: Users, Roles, Rights and Sights
Feed Title: def..end
Feed URL: http://feeds.feedburner.com/Defend
Feed Description: Ruby, Rails, and a smattering of other cruft from the back of Dave's mind.
Chad Fowler's Rails Recipes book lays out authorization as the interrogation of the many-to-many connections between users and roles, and between roles and rights, a right being a named controller-action pair. The many-to-many relationships are established using roles_users and rights_roles tables in the database.
This indirection makes bulk assignment of rights easy, simply by assigning roles