rails 3认证 [英] rails 3 authentication

查看:132
本文介绍了rails 3认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用rails3建立自己的博客,并使用devise gem进行身份验证。问题是,我只想要一个用户在这里---管理员用户,并且禁止其他人注册,我该怎么办?

i'm currently buidling my own blog using rails 3. and use devise gem for authentication. the problem is , i want only one user out here --- the admin user, and prehibits others from signing up, how can I achive that?

推荐答案

有什么理由不能使用基本Http身份验证的? IMHO设计似乎是这个用例的过分。

Is there any reason why you can not use Basic Http Authentication? IMHO devise seems to be an overkill for this usecase.

这篇关于rails 3认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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