What's the best way to implement ACLs to a Rails application?
Asked Answered
B

3

8

I just wanted to compare different solutions used when implementing ACLs in Rails.

Boondoggle answered 22/9, 2008 at 23:40 Comment(0)
K
4

I use the authorization plugin (Created by Bill Katz):

Roles can be authorized for the entire application, a model class, or a specific object. The plugin provides a way of checking authorization at the class or instance method level using permit and permit? methods. It also provides english-like dynamic methods like "user.is_manager_of project" (where "user" acts as authorized, "manager" is a role, and "project" is an authorizable model). You can specify how control is redirected if authorization is denied. (quote source)

Homepage: http://www.writertopia.com/developers/authorization

Docs: http://github.com/DocSavage/rails-authorization-plugin/tree/master/authorization/README.rdoc


You might also be interested in reading this comparison (from last year but still somewhat useful; it's where I got the above quote from): http://www.vaporbase.com/postings/Authorization_in_Rails

And a more recent comparison: http://steffenbartsch.com/blog/2008/08/rails-authorization-plugins/

Karlkarla answered 23/9, 2008 at 4:25 Comment(0)
P
2

The best I've found is role_requirement. It plugs straight into the restful_authentication plugin.

Pintle answered 23/9, 2008 at 0:21 Comment(0)
G
1

There's a plugin called acl_system2 which operates by having a users table and a roles table. There's a lot more useful information in the README and the project is on github too.

Galilee answered 23/9, 2008 at 0:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.