Web Posts

1 post tagged with web

Have you ever needed to test multiple user accounts in your web app?

If you need to check your permissions are working correctly, you might find you are constantly switching users by logging in and logging out. Or you could have an admin user signed in to Chrome, and another user signed in to Firefox. Either way, its a bit of a pain.

Here's a simpler solution; define multiple aliases to in your /etc/hosts file. That way you can have one tab open at http://adminuser:8000/ and another open at http://user1:8000/ with two entirely different user accounts.

This assumes of course that you have a development server running locally, and that your app is configured to serve to these 'domains'.

For example (append this to /etc/hosts):