After reading this article you will know:

  • What impersonation is
  • How to use impersonation

When using different user roles in your application it would be handy to check how things would look for another user with a different role. Instead of having to log out and log back in again as another user, Betty Blocks has a neat function where you can pretend like you are another user while still logged in as yourself!

How to use impersonation

Impersonation is done super easy, by clicking on your account on the top left of the screen a menu will slide down. Within this menu, there will be a dropdown field that displays quick user switch. You can choose the user that you want to impersonate in this dropdown. Keep in mind that every user is visible in this dropdown, even the users that don't have access to the Back Office of your application. If this is the case a You do not have access to the application screen will pop up. By going to the previous page you will go back to your own user account.

When choosing a new user to impersonate the page will reload. If everything is done right you will see the application in the same way as that user would see it. As you can see in the image above, the avatar and role of the impersonated user is displayed as an overlay over the account section. Also, it is not possible for this user to see the user and user roles, just the way we want it to be. To stop impersonating, simply click on the Stop impersonation button within the user menu. The application will reload and you will be yourself again!

Of course, not every user that has access to the Back Office should be able to use this function. Luckily you can enable impersonation for each role separately by editing or creating a role within the Back Office, as you can see in the image above.

Did this answer your question?