Would be good to be able to load a page without privacy rules when the url contains a paramater or access token.
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:
-
Created field type on Thing called Token set it to text.
-
Created field type on User called Token set it to text.
-
Created privacy rule: When this Thing token is Current user token
-
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
-
On the page load:
Make changes to the Current User: token = Current page url truncated from end to 6 -
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 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
Have a look