How to recognize Admin acting as user

In parts of my app I track how many times something was clicked on by users in a general number field… number of clicks.

Sometimes I will login in as a user for testing or troubleshooting… how can I make sure that those click counts aren’t tracked when I’m logged in as a user? Is Bubble smart enough to know it’s an admin logged in as a user and offer that as a conditional? I wasn’t able to find a “User is actual user and not admin impersonating user” expression in workflows.

The short answer is no. If you’re running your app logged in as a user, bubble thinks you are the user. So if you have a workflow that triggers an addition to a DB field then it will act the same as if the user you are simulating is actually using the software.

How come you’re simulating your user’s in production?

1 Like

It is simple…

You can have a field in your user database called “Admin” (Type yes/no).
By default, everyone will be not an admin. Just change this flag to “yes” in your user and, when couting the number of clicks, ignore clicks given by users where Admin is Yes.

1 Like

To make this a little more productive, just add a field called ‘isTesting (yes/no)" and whenever you jump onto someones account, add that "istesting’ flag to yes, and add conditions for that. Pretty simple, but also going back to bubblealex, you really shouldnt be testing users in production. its a much safer alternative to make some dummy accounts and play with them that way

1 Like

All great responses! Thanks @bubblealex @rpetribu @GhostCodes .

I will use the Testing Yes/No field.

I do have dummy accounts I use… but sometimes there is an issue with one user and not another… so I like to be able to test drive from that user’s account to see if there are specific variables.

A good way to make users feel more secure is to provide an access code you verify before jumping into their account, I do know that in my privacy statement I let users know that I’m not able to access their account without a support code.

To add more, you can still obviously “run-as” but I am actually creating a new variant of using another users account through an access code eventually.

1 Like

Maybe I’m off base on this… but I would expect the makers of an app to have full visibility into my account/details if I create an account on their platform. Basically my right to privacy extends to where I place my info right? So if I put my info in your app… I would expect you to see it, but not share it with others that I haven’t given permission to see it.

I guess I’m confused on why I would need to let users know when I am logging in as them to trouble shoot. Help me understand lol!!!

Depends on the type of Data you harvest. For instance, someone’s app has financial information on it, or even apps with crypto wallets. Users demand security for those types of applications. I know that there are quite a few services that cannot edit or view my account’s information until I verify with them.

1 Like