在Rails应用程序中实现ACL的最佳方法是什么? [英] What's the best way to implement ACLs to a Rails application?

查看:92
本文介绍了在Rails应用程序中实现ACL的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想比较在Rails中实现ACL时使用的不同解决方案。

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

推荐答案

我使用授权插件(由比尔·卡兹(Bill Katz)):

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


可以为整个应用程序,模型类或特定对象授权角色。插件提供了一种使用许可和许可在类或实例方法级别检查授权的方法。方法。它还提供了类似于英语的动态方法,例如 user.is_manager_of project(其中 user充当已授权, manager是角色, project是可授权模型)。您可以指定在拒绝授权的情况下如何重定向控件。 (引用来源

首页:
http://www.writertopia.com/developers / authorization

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

您可能也有兴趣阅读此比较(从去年开始,但仍然有些用处;这是我从上面获得的报价):
http://www.vaporbase.com/postings/Authorization_in_Rails

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

和最近的比较:
http://steffenbartsch.com/blog/2008/08/rails-authorization-plugins/

这篇关于在Rails应用程序中实现ACL的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆