简体   繁体   English

如何使用Devise以管理员身份浏览用户的帐户?

[英]How to browse users' accounts as an admin with Devise?

My app is built with Devise and sometimes some users report a problem, so I would like to be able so log in with their accounts and see the dashboard (the website in general) as they do (as a regular member). 我的应用程序是使用Devise构建的,有时有些用户会报告问题,所以我希望能够使用其帐户登录并像他们一样(作为普通会员)查看仪表板(通常是网站)。

How to do that with Devise? 如何用Devise做到这一点? Is there any feature for this? 有什么功能吗?

Use a field role to define user access. 使用field role定义用户访问权限。 In case of other users just assign as guest . 如果是其他用户,则只需分配为guest Make a admin role for your user entry. 为您的用户输入设置管理员角色。 Now instead to logging into others account, create a custom option in dashboard which can be accessed only by admin, provide a option to change users which helps in viewing different dashboards depending on users. 现在,要登录其他帐户,请在仪表板中创建一个自定义选项,该选项只能由管理员访问,并提供更改用户的选项,该选项有助于根据用户查看不同的仪表板。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM