How to configure privacy- Anyone can view but need to sign in to do [action]?

Hi, how to configure in privacy: Anyone can view but need to sign in to do [action] ?
view

This is pretty common in websites where they let you view stuff but once you want to checkout/post something you need to sign in. How do i achieve this ? (I’m on free plan) thanks

Hi! Optional sign-in I think
During action edit you need to check user email is signed-in user , may be not empty.
But of course each edit action must be custom configured

1 Like

Use Optional Sign In.


Hmm

  1. Ok I think I found this advanced action and
  2. it seems is on the component level and only applies to certain components
  3. I can’t find this action elsewhere, am i missing something? How do I find this action to be on the website level?

You only want users to be able to add a post if they are signed in, yes?

If that’s the case, add a condition to your Title Bar (Add) action.
The condition should be “User Profile → Email is not empty”

1 Like

Thanks, here’s another problem.
This setting here, trigger this outcome, which is good (my expected outcome) When a non-signed in user click on Post, it asks them to sign in.
image

But after the user is signed in, my button is gone. :laughing:

By the way,
The setting above doesn’t make sense to me, but it works for the first part.What i thought it should be is :zap:Sign in, Allow action when Email isn’t signed-in user

You only have one action on that button, which is to Sign in. Once a user signs in, then there is no need for the button.

Instead, you need to change that action to a custom action. Inside that custom action you will add an IF condition to check if a user is signed in. If they are, then call the action to show a form. If they are not signed in, then call the action for them to sign in.

3 Likes

Great it works ! Thank you!~ by the way additional question,


What’s the difference between these two?

  • is not empty
  • is signed-in user
1 Like

When a user is signed in, they will be attached to a user profile row.
If they are not signed in, they will not be attached to any user row.

I guess to me, it only makes sense to check for ‘is signed in user’ if you are checking an email in a table other than the user table. Or cases where the email could be different. If you are checking in the user table, then the email is always going to be the signed in users email, because they are attached to their own user row. It might work in this case if a user is not signed in, but logically, it’s kind of weird.

It makes more sense to me to check if user email is empty. It’s more straightforward. If the user email is empty, then they are not signed in. If it’s not empty then they are signed in.

Hope that makes sense.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.