March 12, 2010
Annotation based security for rails
AnnotationSecurity is a ruby gem which provides a security layer for rails applications. It defines the security model as actions which can be performed on resources. In separate files you define user-resource-relations and rights.
Controllers are tagged with a description what action is carried out by them. Using this description the layer evaluates security rules automatically for a rails app, keeping your controllers and views free from any security logic.
AnnotationSecurity relies on the ActionAnnotation gem whichs documentation can be found here. To learn more about the annotation_security gem, consult its docs.
The current version of the gem can always be installed using
gem install annotation_security
To wire it together with a rails app, write
annotation_security —rails RAILS_HOME