开发者

rails_admin: control on admin users signup

开发者 https://www.devze.com 2023-02-06 12:55 出处:网络
I installed rails_admin first with model name as rails_admin_user. The first time I logged in, I clicked \'s开发者_运维技巧ign up\' and created admin user account.

I installed rails_admin first with model name as rails_admin_user. The first time I logged in, I clicked 's开发者_运维技巧ign up' and created admin user account. Now every time I want to login; there is a 'sign up' link still there.

Seems that anyone can create account for admin interface of rails_admin.

If this is true, please let me know how to restrict admin user creation process.


Hey, here is how you do it. Go to your user or member model, depending on how you set up devise, and remove registerable from devise attributes. This way the sign up link will disappear.


Late but still good to share I think. You could do this to show signup for first user only, which will hopefully be you.

devise :registerable if User.empty?

0

精彩评论

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