[New Feature] Running an app as a given user

We just deployed the option to run the app as one of our users. When you’re in the database view (Data Tab → App Data section), you can see a new column when you’re viewing the list of users. Clicking on ‘Run as →’ will let you run the app as the user you picked, without having to enter this password (or ask for it, which is never great).

This is especially useful when you want to debug privacy stuff, etc. Please not that until you log out (or you run as somebody else), you’ll be logged in as this user.

22 Likes

Couldn’t it be a privacy problem, since you can access personal data?

1 Like

As an admin you can access all data, that’s what the admin data tab is for. So it doesn’t change anything privacy/security wise. And if you use the link but aren’t the app owner it won’t work.

2 Likes

Love this, this will definitely be an asset! Can’t wait for the next announcement :smile:

Just an FYI on this… When I use this feature the Bar at the bottom for testing isn’t there… No ability to inspect or anything.

You can add ?debug_mode=true in the URL (but we’ll look into adding it automatically).

3 Likes

This will be awesome!

1 Like

Time saving, using a lot today, very useful.

this feature not working, when i click run as a new tab opens with home page and not logged in.

@hindidubbedmovies94 I did for me when I used it last night.

Not working for me
I get directed to index page

Running the app as a user will always open the index page. You need to navigate to whatever page you want to check as that user.

If you keep getting redirected to index there is probably a workflow check you have that is doing that.

What this function does is create a session based on the user you selected. The rest will depend on how you designed your app.

1 Like

And it seems like @hindidubbedmovies94 found out one of his users can’t see anything when logged in :wink: Best to open the debugger @hindidubbedmovies94 and see if you can spot the issue there.

I am having trouble with this feature also with it always loading the index page where I need a password. I have looked at all my workflows for each page and what happens when page is loaded. I have removed any workflows that redirects user back to the index. What workflows should I be looking at to ensure I can run as a user to see what he/she is seeing and sort out their issues?

@motorhome You are in fact logged in as the user, so you just need to navigate to the page you want either by typing in the page name in the URL or using a menu navigation (if available) on your index page.

It is intentionally going to index when you use Run As. You could also add a workflow to your index page to redirect logged in users “inside” but only if that makes sense for your app.

1 Like

Gaby @romanmg - thanks so much - this did the trick. Now that I understand this I will do a workflow to suit if I can figure one out

1 Like

I’d love, during the development phase at last, to be able to add buttons (or even a dropdown) to quickly “run as” different user types and test the behavior of my app. Is there a way to do that from my app’s page (and not the editor) please?

Switch to Live Database and Select User Table and click any user “Run As” it will be taken to Live Version

Thank you - i wasn’t very clear but found a solution to my need. To be more specific, I created N accounts (one for each user type), then added a dropdown with the user types, with a workflow “login the user”, hardcoding the corresponding user’s passwords. I can then easily login as a XX, as a YY (user types). It’s only for development / testing perspective, but I’ll delete that before going to prod.

I love this feature. Is there any way to run it from the front end of an app? I ask because I’d like to make it available to customer support users for which I don’t want to give access to back-end.

9 Likes