Saving data to Current User - Logged Out/Logged In/Logged Out

When a user is on the app and we use the make changes to thing to make changes to the ‘current user’ and add data to the different data fields on the user data type, these values are supposed to be saved to the ‘current user’, whether they are logged in or not. When a user is logged out, Bubble has cookies that saves this information.

Let’s say for example I have two data fields, the first is called ‘address’ and is of type geographic address, and the second is called ‘is-in-range’ and is of yes/no type. The user who is logged out, and not a registered user, can input their address and the system will evaluate if they are in range. If the user is in range the default value of no is changed to yes, but if they are not in range the value remains no. Also, the address is saved which has no default value.

Then afterward, the user signs up to the app. All of that data is saved on their user data type, and for the example the in range field is yes and address is saved.

Now, let’s say that same user logs out and refreshes their browser…

  1. Should the address field be empty?
  2. Should the is-in-range field be the default value of no?
  3. Should the is-in-range field be set to yes?

Also, let’s say that privacy rules make it such that ‘current user is this user’ and all fields are available, but for ‘everyone else’ the privacy rule makes it so the address field is not available.

  1. Should the now logged out user be able to see the address field value?
  2. Should the now logged out user after refreshing the browser be able to see the address field value?

I had always thought once the WF logs the user out they are immediately under the ‘everyone else’ privacy rule.

That is what I would have expected as well, and believe was typical behavior I’ve experienced in the past.

In an app right now, I suspect a bug. When a user is not logged in and creates the entries for address and the yes/no value changes to yes for ‘is-in-range’ and then subsequently registers for an account, and then later logs out, the address is still accessible even after refreshing browser, while the ‘is-in-range’ is the default value of no, which means the privacy rules are not being adhered to, since the ‘everyone else’ makes it such that the address is not available. But also strange is the ‘is-in-range’ is not yes as it should be if the address is still available.

When building yesterday, I experienced an issue with this, but now testing, it seems like the bug was fixed.