开发者

How to make Ruby on Rails authorization?

开发者 https://www.devze.com 2023-01-27 14:01 出处:网络
I have this problem for my social network website. I want to make an authorization for members based on the member level, if the member\'s level is below then the others, he can\'t chat or seeing the

I have this problem for my social network website. I want to make an authorization for members based on the member level, if the member's level is below then the others, he can't chat or seeing the profile picture. Is there any plug in that can handle 开发者_StackOverflow社区it?


Declarative Authorization. Very powerful. Would definitely recommend it. There's even an awesome railscast on this by Ryan Bates.


I've used the following (both can be found on GitHub):

CanCan--pretty straightforward and well-documented. The author is Ryan Bates of Railscasts fame. One nice thing about it is you can identify all of your permissions within a single file.

RESTful_ACL--not as popular but easy to implement. Permissions are defined in each model you want to protect. I wrote a series on implementing RESTful_ACL in my Rails blog: http://everydayrails.com/2010/06/16/authorization-restful-acl-1.html


Try Aegis - http://www.agileweboperations.com/role-based-permissions-for-your-ruby-on-rails-application

0

精彩评论

暂无评论...
验证码 换一张
取 消