Devise/Rails - How to allow only admin to create account for others?

前端 未结 3 459
走了就别回头了
走了就别回头了 2021-02-06 16:33

I am using devise as my authentication solution and now i am thinking about authorization. In my project I (the admin) is the only person authorized to create account for others

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-06 17:29

    It actually looks like in the later versions of Devise you can just remove the "registerable" declaration from your model and it will take care of this for you.

提交回复
热议问题