简体   繁体   中英

What's the best way to implement roles in Rails 4?

I remember a long time ago I was using CanCan , but as is possible to see from their Github, it hasn't been touched for more than two years.

What's the best approach now, in 2015, to implement different user roles? What I actually need - I have a system where are users and admins. And I need to have different roles for admins.

对于创建用户角色和管理它们(添加/删除/搜索),您可以使用Rolify宝石授权从你的控制器,你可以使用这些角色权威人士的宝石,因为它超过cancancan组织(轨道4版的康康舞)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM