Logged off user bypass privacy rules

I have an app that acts as a calculator. When you are done it saves the equation to the db and that data type is protected just for the creator.

So, I’d like new/logged off users to test the calculator and create equations without being necessarily logged in (up to certain extent).

My question is: Is it possible to workaround such an scenario so that users can use the calc without being logged in?

Also, after uses logs in all that data would go to the respective user.

Privacy rules only apply to accessing data - not to creating it.

So, unless you’ve specifically added some logic to prevent users who aren’t logged in from creating data, then they will be able to do so.

If you’re talking about new Users (i.e. a logged out user who creates some data, and then subsequently signs up to the app) any data they created will be associated with them automatically - that’s the standard Bubble behaviour (at least, within a 3 day window).

If you’re talking about (logged out) users who already have an account, and then log in, then you’ll need to handle that yourself, using local storage (or a cookie).

I’m talking about new users, who will eventually play around with that data (autobinding and modifying equations - like an excel).

So, yeah they can create it but then I need them to be able to manipulate and “assign” as to say that to them.

Right now I’m trying the Cookie plugin (assign a cookie to the data type and add a privacy rule that if the data type has a cookie then it’s available for everyone to modify it) but any native solution is welcome.

In that case, you don’t need to do anything… Bubble does that that automatically.

That is, the data’s creator will be the current user.

If you want to set that data to fields on the User datatype just make changes to the current User.

(but, as I said, it won’t work for Users who already have an account).

1 Like

Thanks for the clarifitication and your time @adamhholmes!! Indeed Bubble does the heavylifting for you.

Yeah, this case scenario is for new users who might want to try the app.

So, yeah even though the logged off user were to create a data type, Bubble wouldn’t allow me modifying it with a new(logged off) user, and when I checked the “Creator” field was empty.

What I did:

  1. I created a cookie field (on the data type, let’s call it TimeCardEntry) and assigned the user’s cookie to it (previously set & read with a plugin).

  2. Added a new Privacy Rule: "If TimeCardEntry Cookie is not Empty → completely public)

  3. I displayed those TimeCardEntries with the user’s cookie to the respective user.

  4. I assigned those Timecards to the user once they logged in (overkill of course since Bubble does it).

But just meats that ANYONE can access the dat, so you might s week not have preachy rules at all..

As I said, you don’t need to do any of that - bubble automatically assigns the current user to created data - even if their logged out.