We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可以使用
before_filter
设置注册页面,以进行适当授权的身份验证,以便随机人员无法创建新用户。我推荐 CanCan,它是管理角色能力的一种乐趣,并且拒绝除管理员之外的所有人创建新用户。 CanCan 还可以自动授权控制器操作,如果未经授权,甚至不允许获取注册表单。
You can set up the sign-up page with a
before_filter
for authentication with proper authorization so that random people can not create new users.I recommend CanCan which is a joy to manage Role abilities and denying all but admins to create new users. CanCan can also automatically authorize Controller actions and will not allow even to acquire the signup form if not authorized.