In honor of RailsConf, I’m releasing an authorization plugin with 3
test apps that show you how to use the system. A reasonably lengthy
description can be found here:
I will also be talking about the plugin’s architecture in my RailsConf
talk on Saturday.
Nice English-like way of expressing permissions through roles and
the objects which give the scope of the roles. You can say things
permit “(matz or dhh) and interested in Answers”
The plugin easily handles roles associated with particular model
instances. You can handle a moderator of meeting #23 as easily as you
can handle a user being a general “site admin”.
You can choose how much database you’ll use for the roles (and the
complexity of your authorization system) through a choice of mixins.
Each mixin provides “acts_as_authorized_user” for your User-like
object and “acts_as_authorizable” for your authorizable objects.
The test apps include an integration test with a simple DSL
developed after reading Chad F.'s most excellent Rails Recipe
book. The object_roles_test app might be useful as a scaffold for new
apps that want authentication and authorization.
It’s reasonably easy to hook into existing authentication systems.