# Authorization framework?

**URL:** <https://www.ruby-forum.com/t/authorization-framework/54428>\
**Category:** Rails\
**Created:** [March 4, 2006, 3:07pm UTC](https://www.ruby-forum.com/t/authorization-framework/54428 "2006-03-04T15:07:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 4, 2006, 3:07pm UTC](https://www.ruby-forum.com/t/authorization-framework/54428/1 "2006-03-04T15:07:45Z")

</div>

There are a number of good authentication frameworks for rails - has  
anyone  
developed a generic authorization framework?

I’m thinking of something that included the concept of roles, mapped  
roles  
to both actions and users and could be used to wrap actions before their  
invocation.

Extra good would be some way to check data permissions (as in, “yes you  
can  
perform the ‘Edit Dog’ action but only for beagles and chessies”), but i  
don’t know if it’s possible to do that well in a general way.

thanks.

Larry

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 4, 2006, 3:59pm UTC](https://www.ruby-forum.com/t/authorization-framework/54428/2 "2006-03-04T15:59:08Z")

</div>

You could combine Ezra’s acl plugin with the new Edge Rails nested  
scopes to  
accomplish this. How is left as an exercise for the reader.

You can learn more about the acl plugin here:

[http://www.brainspl.at/articles/2006/02/20/new-plugin-acl\_system](http://www.brainspl.at/articles/2006/02/20/new-plugin-acl_system)

and the nested scope stuff here:

[http://blog.caboo.se/articles/2006/02/22/nested-with\_scope](http://blog.caboo.se/articles/2006/02/22/nested-with_scope)

Bob S.

[http://www.railtie.net/](http://www.railtie.net/)

* * *

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Larry W.  
Sent: Saturday, March 04, 2006 6:07 AM  
To: removed\_email\_address@domain.invalid  
Subject: [Rails] authorization framework?

There are a number of good authentication frameworks for rails - has  
anyone  
developed a generic authorization framework?

I’m thinking of something that included the concept of roles, mapped  
roles  
to both actions and users and could be used to wrap actions before their  
invocation.

Extra good would be some way to check data permissions (as in, “yes you  
can  
perform the ‘Edit Dog’ action but only for beagles and chessies”), but i  
don’t know if it’s possible to do that well in a general way.

thanks.

Larry

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 4, 2006, 4:20pm UTC](https://www.ruby-forum.com/t/authorization-framework/54428/3 "2006-03-04T16:20:16Z")

</div>

On 3/4/06, Bob S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> You could combine Ezra’s acl plugin with the new Edge Rails nested scopes  
> to accomplish this. How is left as an exercise for the reader.

Thanks. My doctor said I needed more exercise.

* * *

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 4, 2006, 6:21pm UTC](https://www.ruby-forum.com/t/authorization-framework/54428/4 "2006-03-04T18:21:11Z")

</div>

What Bob said 😉 Actually I am working on integrating the nested  
with\_scope stuff into my acl\_system plugin. I think it looks like the  
best way to protect model records. I’ll let you know when its ready.

-Ezra

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 4, 2006, 6:39pm UTC](https://www.ruby-forum.com/t/authorization-framework/54428/5 "2006-03-04T18:39:27Z")

</div>

Cool. Thank you.
