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

前端 未结 3 555
走了就别回头了
走了就别回头了 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条回答
  •  Happy的楠姐
    2021-02-06 17:31

    You can try the rails_admin gem in conjunction with Devise to handle any admin-specific tasks. You'll need to add more code to set it up, but at least you avoid hacking around the solution in terms of changing your interactions with Devise.

提交回复
热议问题