Feature Request: Disable Privacy Rules if URL Contains a text (such as a token)

Would be good to be able to load a page without privacy rules when the url contains a paramater or access token.

3 Likes

Hi @JustinC,

I was thinking about having some sort of code generated and save to it to the database so in the privacy rules you have something like “when the code is not empty” show the values.

What do you think?

[edit] solved it!

When you change data in Bubble - its a server side action so the data is fetched again. That being said after step 5 you have to make change the data of the Thing in some way to apply new privacy rule. The crucial thing is that is has to be after making changes to Current User.

The step 6 below is not necessary anymore. Data change is enough.

so anybody with the link will have access to the data but everybody else will not

see the editor below

hope it helps


bumping the topic up as I do have the same problem

What I did is this:

  1. Created field type on Thing called Token set it to text.

  2. Created field type on User called Token set it to text.

  3. Created privacy rule: When this Thing token is Current user token

  4. I send the link with access to the page which is set to type is Thing so the url looks like this: app.bubble.io/thing/21415521609x124092910420

  • when sending the link setting the token of the Think to = unique_id:truncated from end to 6
  1. On the page load:
    Make changes to the Current User: token = Current page url truncated from end to 6

  2. Create a custom event that will display the same data AGAIN, schedule it on the page load +100ms

it works but not always not sure why :confused: The privacy rules work before you display the data (on the search) so on the first load user cannot access the date, so there is a need to search for data again or page refresh

it looks like it only works when the browser does not block the cookies, as they are essential here

it works on the first load in the incognito mode on chrome but not on safari :thinking:

any ideas? @ryanck @JustinC

Have a look

2 Likes