You can paywall certain pages or restrict some pages for the Admin using a simple Yes/No field. No plugins or third-party software is needed.
You need a Yes/No field in the database which will store the user role value. It can also be a text field if you have multiple tiers like an Admin role, free member, lifetime member etc. To keep things simple, I've chosen a Yes/No field.
I've created field called Paying member and I want to restrict certain pages to only the users who are a member. In short, I need a paywall.
Go to the workflow section and click on 'Add an event'. Under the 'General' section, choose 'On page load'.
We'll add a new action in this workflow which will redirect the user away to the Index page if the Paying member field is No.
On the other hand, if the Paying member is Yes, the user will stay on the same page.
The setup is not restricted to a Yes/No field, it's entirely up to you to. You can use a number field, date field, text field or anything else.
If you have sensitive content on a page, you can either create conditions on the elements to be visible only when the current user's role is correct, or you can create a generic blank loading page. Before going to the restricted page, you can navigate the user to a blank loading and create the above workflows on that page.
This way, the user will only see a blank page while Bubble decides which page the user should be redirected to.
As with everything in Bubble, there is no single way to do things. You can do things differently and achieve the same results depending upon your use case.
One alternate method that you can use is instead of using the "On page load" action, you can use the "Do when" condition as well.