[英]acl9 trying to set it up
Anyone have experience with this plugin? 任何人都有使用此插件的经验吗? I have it installed but I have no idea how to implement it. 我已经安装了它,但是我不知道如何实现它。 How do I define the different roles? 如何定义不同的角色?
自述文件中有很多文档: http : //github.com/be9/acl9您不了解哪一部分?
Their readme is in fact really good. 他们的自述文件实际上非常好。
I just set it up and these are the steps: 我只是设置好了,这些是步骤:
You can now assign roles to your user by current_user.has_role! 您现在可以通过current_user.has_role向您的用户分配角色! :admin :管理员
You can check if a user has a certain role by calling eg current_user.has_role? 您可以通过调用current_user.has_role?检查用户是否具有特定角色。 :admin :管理员
There are lots of examples in the readme. 自述文件中有很多示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.