Published Docs: Show or Hide content based on whether user is logged in or not

I want to try and make my task tracker a published doc, so third parties can access and use it without all of the access and ability to copy that a ‘shared’ user might have.

Right now when users view their tasks, the view is the task table, filtered to only show tasks that are assigned to them. So when the doc is published, the table shows all tasks.

My first attempts were to try and discern if the user was logged in by checking if(user().email.isblank(). This gives me true when the user is logged in and a false when I view the published doc not logged in. I then prepended to my table filter: If(User().Email.IsBlank(),false , {rest of filter}.

This works when logged in, it hides everything. However in my published doc, everything is still showing. Any ideas on why this isn’t working or another approach?

1 Like

possible for you to share url to your published doc?

I believe that if you assign a person to each row (which I’m guessing you are already doing), all you have to do is have a filter looking for “if(User() = UserColumn ,true ,false)”. This will only show the user’s rows.

However one thing that I have noticed is that anyone can access anyone else’s data whenever. If they have access to any text input all you have to do is put an @ symbol and you can see any row in the doc including ones not owned by you. This can also be a problem because people can @ other people’s names to get their email addresses. This is a problem I’m trying to solve myself, since I’m making an application that I want to give to the internet without making available everyone’s email to the internet

1 Like

Any luck with this since last year?

Nothing from me at least so far. I have just tried to design the site such that all the information can be public, and have used play mode. I’ve used embedded forms to collect information specific to users, and have just asked them to put in their email address for each embedded form when I need to link it to users. I’ve considered a “log-in” feature where people put their email into a text control, and this prepopulates the forms via url parameters, but that’s as far as I’ve gotten.