开发者

how to do authentication on different type of users using devise

开发者 https://www.devze.com 2023-01-31 19:23 出处:网络
first of all, I avoid using the term \"role\" here. because there is a similar post answered by ---\"looking into cancan\".

first of all, I avoid using the term "role" here. because there is a similar post answered by ---"looking into cancan".

The problem I need to sovle is that I need to do authentication on two开发者_如何学运维 different type of users, and the attributes of the two users are so different that each of them has their own model and corresdonding table.

If we treat devise's work as access control to the model, my question can be rephrased as does devise support multiple models authentication?I'm quite suspious of that, because look at the file name, under app/views/devise/ , none of them contails "model" info in it. But anyway, need a confirmative answer from you guys.


All is explain on this todo : https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role

The model in devise library is an include so can be include on several Model of your application.

0

精彩评论

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